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 _ from 'lodash'\nimport {\n COMPANY_LISTS__LISTS_LOADED,\n COMPANY_LISTS__SELECT,\n COMPANY_LISTS__COMPANIES_LOADED,\n COMPANY_LISTS__FILTER,\n COMPANY_LISTS__ORDER,\n} from '../../actions'\n\nimport { RECENT } from './Filte...
javascript
edit
0
6
mit
48978a106d024a06951ca058e56185b5c9c2c9e4
uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend
src/client/components/CompanyLists/reducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ArgumentError = require('./ArgumentError');\nvar topiarist = require('topiarist');\n\nfunction verifierMethod(verifierMethod) {\n return function(arg) {\n if(!this.skipVerification) {\n if(this.argValue === undefined) throw...
javascript
edit
0
4
apache-2.0
5e2220ad642d7f87382b3e454984199ba0f9db50
dchambers/typester
lib/ArgVerifier.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @constructor\n */\nfunction Hitokotonushi() {}\n\n/**\n * @param {object} settings\n */\nHitokotonushi.prototype.setSettings = function(settings) {\n this.settings = settings;\n};\n\n/**\n * @param {string} mod...
javascript
edit
0
1
mit
1c95fa66025cd230f837aaac6dafff90453e6459
shimomo/hitokotonushi,shimomo/hitokotonushi
lib/hitokotonushi.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst React = require('react');\nconst {string, func} = React.PropTypes;\n\nconst InventoryDetail = React.createClass({\n displayName: 'InventoryDetail',\n propTypes: {\n\n // state\n name: string.isRequired,\n ...
javascript
edit
0
1
mit
44eb6a2f115345953e84dc0ce0f8a3c68488d90b
jevakallio/blackout,jevakallio/blackout
src/components/inventory-detail.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'jquery',\n 'DoughBaseComponent'\n], function (\n $,\n DoughBaseComponent\n) {\n 'use strict';\n\n var UnsavedChangesPromptProto,\n defaultConfig = {\n defaultMessage: 'You have unsaved changes.'\n };\n...
javascript
edit
0
1
mit
4aff5527cb3324828e8b96958ac40617e539a9b9
moneyadviceservice/cms,moneyadviceservice/cms,moneyadviceservice/cms,moneyadviceservice/cms
app/assets/javascripts/comfortable_mexican_sofa/admin/modules/UnsavedChangesPrompt.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nprocess.env.NODE_ENV = 'test'\nconst {MongoClient} = require('mongodb'),\n N = require('nitroglycerin')\n\n\nvar db = null\nconst getDb = (done) => {\n if (db) return done(db)\n MongoClient.connect(\"mongodb://localhost:27017/exo...
javascript
edit
0
3
mit
e4c831127e397b1bef3b2e91dfc70f8349de1074
Originate/exosphere,Originate/exosphere,Originate/exosphere,Originate/exosphere
exosphere-shared/templates/add-service/exoservice-es6-mongodb/features/support/env.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (root, factory) {\n 'use strict';\n if (typeof define === 'function' && define.amd) {\n define([], function () {\n return (root.bubbleSort = factory());\n });\n } else if (typeof exports === 'object') {\n modu...
javascript
edit
0
4
mit
bedb742dd6084b9fc2e3c83c7431f08b015adbbf
Tyriar/js-sorting
src/bubble-sort.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nApp.module(\"Predictor\", function(Mod, App, Backbone, Marionette, $, _) {\n\n\tMod.PredictionModel = Backbone.Model.extend({\n\t\tdefaults: {\n\t\t\t'launchTime': Date.now(),\n\t\t\t'brand': 'Kaymont',\n\t\t\t'size': 0.6,\n\t\t\t'mass'...
javascript
edit
0
1
bsd-3-clause
8af45b66a36290e70f04b2bd66d0899a9161df16
AerodyneLabs/Stratocast,AerodyneLabs/Stratocast,AerodyneLabs/Stratocast,AerodyneLabs/Stratocast,AerodyneLabs/Stratocast
app/modules/predictor/models/predictionModel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar selftest = require('../tool-testing/selftest.js');\nvar Sandbox = selftest.Sandbox;\n\nselftest.define(\"'meteor test --port' accepts/rejects proper values\", function () {\n var s = new Sandbox();\n var run;\n\n s.createApp(\"my...
javascript
edit
0
1
mit
3cfea0c71ddd46a31f4864ee500bcdebde60eb12
Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor,Hansoft/meteor
tools/tests/test-modes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar MsgsModel = require('../models/msgs');\nvar easySession = require('easy-session');\n\nmodule.exports = function (router) {\n\n var model = new MsgsModel();\n\n router.get('/', easySession.isLoggedIn(), functio...
javascript
edit
0
3
mit
8f298b898d882112b528ae87bf31d14bda19a5cf
uahengojr/NCA-Web-App,uahengojr/NCA-Web-App
WebApp/controllers/msgs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst low = require(\"lowdb\");\nconst userDb = low('./data/userdb.json');\nconst dataDb = low('./data/datadb.json');\nconst Requester = require('../controllers/requester');\nconst Parser = require('../controllers/parser');\n\n\nconst T...
javascript
edit
0
1
mit
23446368ec96218f6d1ec152e55b2dd66693e6c7
amoshydra/nus-notify,amoshydra/nus-notify
controllers/taskRunner.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { connectFromRoute } from '../routes'\nimport { sparqlConnect } from '../sparql/configure-sparql'\nimport { LOADED } from 'sparql-connect'\nimport ServicesByGSBPMSubProcess from './services-by-gsbpm-sub...
javascript
edit
0
1
mit
28394acb60b956cc5f2d319749ebc92a6afb8152
UNECE/Model-Explorer,UNECE/Model-Explorer
src/js/components/gsbpm-subprocess-details.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n// vim: set ts=2 et:\n\nvar express = require('express'),\n app = express(),\n http = require('http').createServer(app),\n io = require('socket.io').listen(http),\n PeerServer = require('peer').PeerServe...
javascript
edit
0
1
mit
1bf70e6068b53ff8178547e1117359a6cc93ac94
pbanaszkiewicz/pitt
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ntetra.view.register('card', {\n\tscope: 'card',\n\n\tconstr: function(me, app, _) {\n\t\t'use strict';\n\n\t\treturn {\n\t\t\tevents: {\n\t\t\t\tuser: {\n\t\t\t\t\t'click': {\n\t\t\t\t\t\t'.bx-flip .bx-flip-turn': function (e, elm) {\n\...
javascript
edit
0
1
mit
006708f3e0871ab211b45a37f6cffaf403120bc7
viadeo/tetra-ui,viadeo/tetra-ui,slyg/tetra-ui,slyg/tetra-ui,slyg/tetra-ui
src/js/coremvc/comps/flipbox/view/flipbox.ui.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst { mergeWith, reduce } = require('lodash')\nconst mergeProps = require('../util/merge-props')\n\nfunction createFlow (directories) {\n function flow (str) {\n return reduce(directories, function (acc, directory)...
javascript
edit
0
1
mit
b1d52d1438eb848732a14f7b81abccfde20ed867
windtoday/windtoday-core,windtoday/windtoday-core
core/directory/create-flow.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nprocess.env.NODE_CONFIG_DIR = __dirname + '/config';\nif (!process.env.NODE_ENV) {\n process.env.NODE_ENV = 'development';\n}\n\nvar config = require('config');\n\nrequire('./lib/preparations');\n\nvar connect ...
javascript
edit
0
0
mit
8ef829442a3d2f2b40ced1aa1bac7cf5c23e87d8
berlinonline/converjon,neffets/converjon,neffets/converjon,berlinonline/converjon,berlinonline/converjon
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Moebooru = {\n '__slug__': {}\n};\nvar Moe = jQuery(Moebooru);\n\nMoebooru.addData = function (data) {\n if (data.posts)\n Moe.trigger(\"post:add\", [data.posts]);\n if (data.tags)\n Moe.trigger(\"tag:add\", [data.tags]);\n...
javascript
edit
0
6
isc
bf61998dca5e42ee321d069f72ae4599c7f6e8ac
euank/moebooru-thin,moebooru/moebooru,moebooru/moebooru,euank/moebooru-thin,nanaya/moebooru,euank/moebooru-thin,nanaya/moebooru,moebooru/moebooru,moebooru/moebooru,nanaya/moebooru,euank/moebooru-thin,euank/moebooru-thin,nanaya/moebooru,moebooru/moebooru,nanaya/moebooru
app/assets/javascripts/01moebooru.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([], function() {\n\n return [\"$timeout\", \"$rootScope\", \"api\", function($timeout, $rootScope, api) {\n\n return {\n scope: {\n state: \"=\",\n questionDoc: \"=\",\n ...
javascript
edit
0
4
mit
1b261627e3ed964727ceb98f35ea068157f1e50e
ucam-cl-dtg/isaac-app,ucam-cl-dtg/isaac-app,ucam-cl-dtg/isaac-app,ucam-cl-dtg/isaac-app
app/js/app/directives/equation_editor/EquationInput.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\npandaConfig = {\n system: {\n webGL: true\n },\n storage: {\n id: 'com.innojam8.game'\n }\n};\n```\n\nApply this change: Set canvas size to 1080p" }, { "role": "assistant", "content": "pandaConfig =...
javascript
edit
0
0
mit
f36739d2a5926e833cc729a6cec7b4bcc91d81ed
svenstaro/innojam8,svenstaro/innojam8
src/game/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\n\nexport default DS.Model.extend({\n prev: DS.attr(),\n next: DS.attr(),\n elements: DS.hasMany('element')\n});\n\n```\n\nApply this change: Use an index instead of prev/next pointers" }, { "role...
javascript
edit
0
0
bsd-3-clause
f010ac324951d8d3022a5e067004ca00c1a33142
SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder,SanaMobile/sana.protocol_builder
src-frontend/app/models/page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by Omnius on 6/15/16.\n */\n'use strict';\n\nconst Boom = require('boom');\n\nexports.register = (server, options, next) => {\n\n server.auth.strategy('hawk-login-auth-strategy', 'hawk', {\n getCredentialsFunc:...
javascript
edit
0
3
mit
67fa9ac54356b17db5b7e5b4d00a59ad5403386a
identityclash/hapi-login-test,identityclash/hapi-login-test
server/auth/hawk/hawkAuth.js
rejected_duplicate
Near-duplicate of sample 96298
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { render } from \"inferno\";\nimport { h as hyper } from \"inferno-hyperscript\";\nimport { setup } from \"../common\";\nimport { sv } from \"seview\";\n\nconst processAttrs = (attrs = {}) => {\n Object.keys(attrs).forEach(key =...
javascript
edit
0
2
mit
b46e7c7b9c67780a6d7e411064b36b3cc3486eba
foxdonut/meiosis-examples,foxdonut/meiosis-examples
examples/setup/inferno/setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar path = require('path');\nvar runSequence = require('run-sequence');\nvar tslint = require('gulp-tslint');\nvar typescript = require('gulp-typescript');\n\nvar dirs = {\n build: path.join(__dirname, 'bui...
javascript
edit
0
1
mit
b626f5c535c4a0ffb280d5b45d13bb84aa65e6a6
Asana/typed-react,hnney/typed-react
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar react = require('gulp-react');\nvar jshint = require('gulp-jshint');\n\nvar jsFiles = [\n 'app/**/*.js',\n 'test/**/*.js',\n '*.js'\n];\n\ngulp.task('jshint', function(cb) {\n var stream = gulp.src(j...
javascript
edit
0
2
bsd-2-clause
2c495e14a235e2297f8335df4bf1d2de14bb26a2
tidepool-org/blip,hichameyessou/blip,hichameyessou/blip,hichameyessou/blip,tidepool-org/blip,tidepool-org/blip
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { Segment, Message } from 'semantic-ui-react'\nimport JSONTree from 'react-json-tree'\n\ntype Props = {\n loading: boolean,\n expanded: boolean,\n response: any,\n error: ?Error,\n}\n\nconst Respons...
javascript
edit
null
null
apache-2.0
51fe25d5772bcec52739ac607bf68bd48da19d4c
phenyl-js/phenyl,phenyl-js/phenyl,phenyl-js/phenyl,phenyl-js/phenyl
modules/phenyl-api-explorer/src/client/src/components/OperationResult/Response.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ClearButton from '../buttons/ClearButton'\nimport React, {PropTypes} from 'react'\nimport FormBuilderPropTypes from '../FormBuilderPropTypes'\nimport equals from 'shallow-equals'\nimport styles from './styles/Text.css'\n\n\nexpor...
javascript
edit
0
2
mit
41447fe0ef2b876b7d1225059f373afa05c036e3
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
src/inputs/Text.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n postcss = require('gulp-postcss'),\n importCss = require('gulp-import-css'),\n cssimport = require(\"gulp-cssimport\"),\n cssnext = require(\"gulp-cssnext\"),\n processors = [\n requir...
javascript
edit
0
1
mit
9ccfed1f16181ddd3c4114f3b5637d49bf8397a1
kmh3785/PostCSS-Starter-Kit,kmh3785/PostCSS-Starter-Kit
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This file is another configuration-type file. We need to reference `import`\n// statements directly so that browserify can find all of the plugins for\n// client-side compilation.\n\n//import ads from 'reddit-mobile-plugin-ads';\nimp...
javascript
edit
0
0
mit
47ac6b5da25dcef5503df9492f5c60f664674229
madbook/reddit-mobile,uzi/reddit-mobile,dwick/reddit-mobile,uzi/reddit-mobile,DogPawHat/reddit-mobile,gynsolomon/reddit-mobile,madbook/reddit-mobile,curioussavage/reddit-mobile,devypt/reddit-mobile,kieranjones/reddit-mobile,muratsu/reddit-mobile,madbook/reddit-mobile,DogPawHat/reddit-mobile,danehansen/reddit-mobile,cur...
src/plugins.es6.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { wait } from '../utils';\n\n\nexport async function listTables (server, databaseName, eventHandler) {\n eventHandler.onTunnelConnecting();\n await wait(1000);\n eventHandler.onTunnelConnected();\n eventHandler.onServerConnec...
javascript
edit
0
5
mit
e4d35afdf309411af256175b197487f811a559eb
sqlectron/sqlectron-term
src/services/db.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n var mainMenu = document.getElementById('header-nav');\n\n $(mainMenu).bind('scroll', mainMenuDropShadow);\n $(window).bind('resize', function() {\n mainMenuDropShadow.apply(mainMenu);\n mainMenuR...
javascript
edit
0
4
mit
f21e8828ac538e983ed32e883049b0d3114d5277
ogizanagi/EasyAdminBundle,thomasbeaujean/EasyAdminBundle,OskarStark/EasyAdminBundle,gabiudrescu/EasyAdminBundle,datagit/EasyAdminBundle,ogizanagi/EasyAdminBundle,seydu/EasyAdminBundle,javiereguiluz/EasyAdminBundle,yceruto/EasyAdminBundle,datagit/EasyAdminBundle,thomasbeaujean/EasyAdminBundle,gabiudrescu/EasyAdminBundle...
Resources/public/javascript/admin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport function uuidv4() {\n return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>\n (c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16)\n );\n}\n\nexport function createEmp...
javascript
edit
0
6
cc0-1.0
a5194baf4e12c3e5a7f5e043e68f65604208b3cc
anotherletter/N,anotherletter/N,anotherletter/N
src/utils/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst FaviconsWebpackPlugin = require('favicons-webpack-plugin');\n\nmodule.exports.onCreateWebpackConfig = ({ actions, stage, getConfig }, { logo, icons = {}, title, background }) => {\n if (stage === 'develop-html' || stage === 'buil...
javascript
edit
0
5
mit
63f57fc147c7a42aeb383da45c987c02ca5a46f0
Creatiwity/gatsby-plugin-favicon
gatsby-node.js
rejected_duplicate
Near-duplicate of sample 90190
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n /**\n @class\n <p>A basic filter score function, which mathces a filter and applies a\n weight.</p>\n\n @name ejs.FilterScoreFunction\n @ejs scorefunction\n @borrows ejs.ScoreFunctionMixin.filter as filter\n @borr...
javascript
edit
0
3
mit
f386dca01e48fb596183256945d55d9a69ea05c0
ErwanPigneul/elastic.js,arowla/elastic.js,arowla/elastic.js
src/query/functions/FilterScoreFunction.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mongoClient = require('mongodb').MongoClient;\nconst env = require('./env');\n\nconst URI = env.MONGOLAB_URI || 'mongodb://localhost:27017/review-bot';\n\nmodule.exports = {\n\n connect: (uri) => {\n uri = uri || URI;\n\n r...
javascript
edit
0
2
mit
156b01f3bdb0f4aa876a3771238276aeeb92bb7b
NSAppsTeam/nickel-bot
src/db.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nasync function activemq_service(args) {\n/*\ndescription(\"ActiveMQ Service\")\nbase_component_id(\"activemq_service\")\nload_once_from_file(true)\nonly_run_on_server(true)\n*/\n var promise = new Promise(async function(returnfn) {\n...
javascript
edit
0
2
mit
5409bb1d374ef5984587e4e7e6ff331c2a9a3685
zubairq/gosharedata,zubairq/yazz,zubairq/gosharedata,zubairq/yazz
public/visifile_drivers/services/activemq_service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Get our NPM stuff.\nvar Future = Npm.require(\"fibers/future\");\nrequest = Npm.require(\"request\");\n\n// This is our main wrapping function, using Fibers.\nvar requestSync = function(uri, options) {\n\tvar future = new Future();\n...
javascript
edit
0
2
mit
b7e5328913c05a016ec760dc47431c7320af514a
froatsnook/meteor-request
server/lib/meteor-request.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert'),\n Lapidus = require('../index.js'),\n spawnSync = require('child_process').spawnSync,\n fs = require('fs');\n\ndescribe('MySQL', function () {\n\n it('connects to MySQL valid backends', functi...
javascript
edit
0
1
mit
4dc7de89a6f60684afe9b666211b89334640c1ed
JarvusInnovations/lapidus
test/mysql.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n //grunt-svgmin\n grunt.config('svgmin', {\n dist: {\n files: [{\n expand: true,\n cwd: '<%= config.sprite.svg.dir %>',\n src: [...
javascript
edit
0
1
mit
c99f0b7b232b66bd32686cb13f728ea6a0b2a63a
SnceGroup/grunt-config-for-websites,SnceGroup/grunt-config-for-websites
grunt/image.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nset_readmore(\n document.getElementById('olga_readmore'),\n document.getElementById('olga_readmore_btn'),\n 'Leggi tutto', 'Meno'\n)\nset_readmore(\n document.getElementById('yana_readmore'),\n document.getElementById('...
javascript
edit
0
5
unlicense
f785b15ced2414466b2c4ebfd00d9fffc54483ca
DmitryMyadzelets/porticodelleparole,DmitryMyadzelets/porticodelleparole,DmitryMyadzelets/porticodelleparole,DmitryMyadzelets/porticodelleparole
js/readmore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Base from './base';\n\nclass Save extends Base {\n constructor(props) {\n props._type = 'Save';\n super(props);\n\n var save = this;\n\n this.validators = {\n id: function() {\n var id = this.get('id');\n...
javascript
edit
0
2
mit
5bbdd944c75dc46b9727095f6f8eadbf46bd9e49
reddit/node-api-client,reddit/snoode
models/save.es6.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Initialize the Joyride demo on the KitchenSink demo" }, { "role": "assistant", "content": "// Foundation JavaScript\n// Documentation can be found at: http://foundation.zurb.com/docs\n$(document).foundation();\n\n// trigger f...
javascript
new_file
0
1
mit
c0d9f8eb19222f4c5eb6e1b38c110b9d00b8b26f
ryanwachtl/silverstripe-foundation-theme,exebit/theme-foundation,ryanwachtl/silverstripe-foundation-theme,exebit/theme-foundation
javascript/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// We don't want the sidebar to include list of examples, that's just\n// much. This simple script tries to select those items and hide them.\n// \"aside\" selects sidebar elements, and \"href\" narrows it down to the\n// list of exampl...
javascript
edit
0
2
mit
92059db59de783487bef18102db328bb34a02da7
PMEAL/OpenPNM
docs/_static/js/custom.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Polyfill fn.bind() for PhantomJS\n/* eslint-disable no-extend-native */\nFunction.prototype.bind = require('function-bind')\n\n// require all test files (files that ends with .spec.js)\nconst testsContext = require.context('./specs',...
javascript
edit
0
0
mit
a350cea5453c837a07b1cd0a1e1881898a13beef
tohjustin/pomodori,tohjustin/pomodori,tohjustin/pomodori
test/unit/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar helpers = require('../helpers');\n\nmodule.exports = {\n 'name': 'space-before-colon',\n 'defaults': {\n 'include': false\n },\n 'detect': function (ast, parser) {\n var result = [];\n\n ast.traverseByT...
javascript
edit
0
5
mit
aea32d91cb62ac97f8f5167219c8d349fb4b5052
Dru89/sass-lint,joshuacc/sass-lint,Snugug/sass-lint,donabrams/sass-lint,ngryman/sass-lint,srowhani/sass-lint,alansouzati/sass-lint,benthemonkey/sass-lint,MethodGrab/sass-lint,DanPurdy/sass-lint,zaplab/sass-lint,flacerdk/sass-lint,bgriffith/sass-lint,sktt/sass-lint,zallek/sass-lint,sasstools/sass-lint,sasstools/sass-lin...
lib/rules/space-before-colon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/*****\n * Vain\n *\n * A view-first templating engine for Node.js.\n*****/\nvar jsdom = require('jsdom'),\n $ = require('jquery')(jsdom.jsdom().createWindow()),\n snippetRegistry = {};\n\n/**\n * Register a snipp...
javascript
edit
0
4
apache-2.0
48017a580b249ee6597d9a30ddf418bfc52ef39f
farmdawgnation/vain
lib/vain.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst rethinkDB = require('rethinkdb');\nconst program = require('commander');\n\nconst log = require('./../server/log');\n\nexport class CoralUserGenerator {\n constructor (conn, number, startLocationId) {\n this.c...
javascript
edit
0
3
mit
92b954637023719e1588b6888554a01a0b03941d
nobus/Labyrinth,nobus/Labyrinth
worldGenerator/CoralUserGenerator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar searchForListByName = function(lists, name) {\n var ret;\n\n lists.forEach(function(list) {\n if (list.name === name) {\n ret = list;\n }\n });\n return ret;\n};\n\nvar printListing = function (l...
javascript
edit
0
2
mit
a0fd3d8909da7d4dc14a4df767dd65c9ae52c6d8
shiva/trello-processor
lib/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar hoverZoomPlugins = hoverZoomPlugins || [];\nhoverZoomPlugins.push({\n name:'metmuseum.org',\n version:'0.1',\n prepareImgLinks:function (callback) {\n var res = []; \n \n hoverZoom.urlReplace(res,\n ...
javascript
edit
0
3
mit
4a47a94b5d4db585231c4d51b1bbe8a4844034c4
extesy/hoverzoom,extesy/hoverzoom
plugins/metmuseum.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar restify = require('restify');\nvar async = require('async');\nvar Anyfetch = require('anyfetch');\n\n\nmodule.exports.get = function get(req, res, next) {\n if(!req.query.context) {\n return next(new restify.C...
javascript
edit
0
2
mit
2f8c844846d305e3ba8919a99f928d404d8b5f15
AnyFetch/companion-server
lib/handlers/documents/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Map from '../../../src/ol/Map.js';\nimport View from '../../../src/ol/View.js';\nimport Static from '../../../src/ol/source/ImageStatic.js';\nimport {\n get as getProjection,\n transformExtent\n} from '../../../src/ol/proj';\ni...
javascript
edit
0
0
bsd-2-clause
f6fba61b479fb246a507fdbad728c5775fbbb9b6
tschaub/ol3,geekdenz/openlayers,stweil/ol3,adube/ol3,adube/ol3,adube/ol3,tschaub/ol3,bjornharrtell/ol3,stweil/openlayers,ahocevar/ol3,tschaub/ol3,openlayers/openlayers,stweil/ol3,ahocevar/openlayers,geekdenz/ol3,ahocevar/ol3,openlayers/openlayers,oterral/ol3,stweil/openlayers,tschaub/ol3,stweil/ol3,ahocevar/ol3,stweil/...
rendering/cases/reproj-image/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nfunction GameOfLife(params) {\n params = params || {};\n if (Object.keys(params).length == 0) {\n params.cols = 5;\n params.rows = 5;\n }\n this.init(params);\n}\n\nGameOfLife.prototype.init = fun...
javascript
edit
0
7
mit
31fe1ae02a116f09ada969ad795529fb8c4eb6bd
pnhung177/gol-ref-impl,pnhung177/gol-ref-impl
lib/gol-engine.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar exec = require('child_process').execSync;\nvar iter = require('super-iter');\n\nvar comongo = require('co-mongo');\n\nvar findIndex = iter.findIndex;\n\nmodule.exports = function* mongodb(host, port, db, collections) {\n var conn...
javascript
edit
0
7
mit
332cb8ccdf7c6182021494c7a7f6099988a6a1e9
super-useful/su-healthcheck
lib/mongodb.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n$(function() {\n\tvar $imagesContainer = $('.js-images-container');\n\n\t$(document).foundation();\n\n\t$('form').on('submit', function(e) {\n\t\tvar heading = $('#api-heading').val(),\n\t\t\tfov = $('#api-fov').val(),\...
javascript
edit
0
1
mit
447e56b414137dd6ebe430b52aa4bebe6abb4923
ejwaibel/streetview-slideshow,ejwaibel/streetview-slideshow
app/scripts/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*globals document*/\n'use strict';\n\nvar animationEndEvent = (function () {\n var el = document.createElement('div');\n var animations = {\n 'animation' : 'animationend',\n 'OAnimation' : 'oAnimationEnd',\n 'MozAni...
javascript
edit
0
6
mit
ec3b99832aacc61f50b443ff73c6e23484f2c1cc
geo-tales/geo-tales-mobile,geo-tales/geo-tales-mobile
lib/animate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst express = require('express');\nconst router = express.Router();\nconst gameService = require('../services').gameService;\n\nrouter.post('/create', function(req, res, next) {\n gameService.create(\n req.body.na...
javascript
edit
0
2
mit
53b8f15075b9651e7e494b62c4578f9aa35a16de
sendjmoon/GolfFourFriends,sendjmoon/GolfFourFriends
app/routes/games.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// GraphQL types\nimport {\n\tGraphQLObjectType,\n\tGraphQLString,\n\tGraphQLID,\n GraphQLInt,\n GraphQLFloat\n} from 'graphql';\n\nconst WorkLog_TYPE = new GraphQLObjectType({\n name: 'worklog',\n descriptyion: 'An bug obje...
javascript
edit
0
1
mit
aad8db77d9b03701d17b0cd99427f3716570e712
armaniExchange/work-genius,armaniExchange/work-genius,armaniExchange/work-genius
server/models/WorkLog/WorkLogType.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Oro = Oro || {};\nOro.widget = Oro.widget || {};\n\nOro.widget.Buttons = Oro.widget.Abstract.extend({\n options: _.extend(\n _.extend({}, Oro.widget.Abstract.prototype.options),\n {\n class: 'pull-left bt...
javascript
edit
0
3
mit
ddb3b2d36c943df6480274e0b9a0c15d4c468f29
Djamy/platform,morontt/platform,akeneo/platform,mszajner/platform,orocrm/platform,ramunasd/platform,2ndkauboy/platform,northdakota/platform,morontt/platform,hugeval/platform,mszajner/platform,2ndkauboy/platform,morontt/platform,trustify/oroplatform,trustify/oroplatform,geoffroycochard/platform,orocrm/platform,Djamy/pla...
src/Oro/Bundle/UIBundle/Resources/public/js/backbone/widget/buttons.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n parser: 'babel-eslint',\n extends: 'google',\n rules: {\n 'no-var': 2\n }\n};\n\n```\n\nApply this change: chore(linter): Increase maximum valid line width" }, { "role": "assistant", "content": "m...
javascript
edit
0
0
mit
dc071864e6a560f34f8230cde69cb2d340faaa8e
base16-builder/base16-builder,base16-builder/base16-builder,aloisdg/base16-builder,aloisdg/base16-builder,aloisdg/base16-builder,base16-builder/base16-builder
.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { combineReducers } from 'redux';\nimport audio from '../containers/Audio/reducer';\nimport midi from '../containers/Midi/reducer';\nimport login from '../containers/Login/reducer';\nimport map from '../containers/Map/reducer';\n...
javascript
edit
0
0
mit
d5c7ca6a6434a8d85ff766f8c190fb93f6d4df26
ffont/freesound-explorer,ffont/freesound-explorer,ffont/freesound-explorer
static/src/store/mainReducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(env) {\n env.ddg_spice_expatistan = function(api_result) {\n \"use strict\";\n\n if(!api_result || api_result.status !== 'OK') {\n return Spice.failed('expatistan');\n }\n\n Spice.add(...
javascript
edit
0
5
apache-2.0
5c4bd1afd94f7550b598c77c1986da8fa4711e34
Queeniebee/zeroclickinfo-spice,stennie/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,mayo/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,deserted/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,levaly/zeroclickinfo-spice,claytonspinner/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,gautamkrishnar/ze...
share/spice/expatistan/expatistan.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(global) {\n 'use strict';\n\n $(document).ready(function() {\n setupQuestionWindows();\n });\n\n global.setupQuestionWindows = function setupQuestionWindows() {\n $('a.js-question-dialog').on('click',...
javascript
edit
0
2
mit
c743692b5a054ec0ce98acf03a3e15b93aeb5813
mic4ael/indico,DirkHoffmann/indico,mvidalgarcia/indico,indico/indico,pferreir/indico,OmeGak/indico,OmeGak/indico,ThiefMaster/indico,mic4ael/indico,mic4ael/indico,pferreir/indico,mvidalgarcia/indico,OmeGak/indico,pferreir/indico,mic4ael/indico,indico/indico,DirkHoffmann/indico,OmeGak/indico,DirkHoffmann/indico,ThiefMast...
indico/htdocs/js/indico/modules/evaluations.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n root: true,\n extends: ['coderdojo', 'eslint:recommended', 'prettier'],\n plugins: ['prettier'],\n rules: {\n 'prettier/prettier': [\n 'error',\n {\n singleQuote: true,\n semi: true,\n...
javascript
edit
0
0
mit
318f9db90db1d790a0456720fab7d61ababc444d
CoderDojo/cp-zen-platform,CoderDojo/cp-zen-platform
.eslintrc.js
rejected_duplicate
Near-duplicate of sample 70142
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * New Relic agent configuration.\n *\n * See lib/config.defaults.js in the agent distribution for a more complete\n * description of configuration variables and their potential values.\n */\n exports.config = {\n /**\n * Array ...
javascript
edit
0
0
mit
39af762ccda2b4d46b9c44e653da7e767b348021
autoboxer/MARE,autoboxer/MARE
newrelic.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport Analytics from 'ember-osf/mixins/analytics';\n\nexport default Route.extend(Analytics, {\n currentUser: service(),\n\n model(pa...
javascript
edit
0
2
apache-2.0
f83107432eaa9a172653744a0cf42976e0609229
hmoco/ember-osf-web,hmoco/ember-osf-web,hmoco/ember-osf-web
app/user-quickfiles/route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.postsList.helpers({\n posts: function() {\n return Posts.find();\n }\n});\n```\n\nApply this change: Sort posts by submitted timestamp.\n\nchapter7-8" }, { "role": "assistant", "content": "Template.postsList.he...
javascript
edit
0
1
mit
d1d813bf161eb28dc95852d519cf8fe274b3d12a
scimusmn/sd-waw,scimusmn/sd-waw
client/views/posts/posts_list.js
rejected_duplicate
Near-duplicate of sample 71801
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// PaymentRequirementUpload class\n\n'use strict';\n\nvar memoize = require('memoizee/plain')\n , defineRequirementUpload = require('./requirement-upload')\n , defineCost = require('./cost');\n\nmodule.exp...
javascript
edit
0
3
mit
de7205af3df8ecbb9ff120d713c59954c49dfe40
egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations
model/payment-receipt-upload.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(window) {\n 'use strict';\n\n var util = {};\n\n util.isNumber = function(obj) {\n return (Object.prototype.toString.call(obj) === '[object Number]');\n };\n\n util.toNumber = function(value) {\n if (value == null) ...
javascript
edit
0
5
mit
8ea8cf649ad03e07bc56a64065bf0deb7901a096
ionstage/modular,ionstage/modular
modular_modules/modular-util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Timer = React.createClass({\n getInitialState: function () {\n return { secondsToWait: this.props.secondsToWait };\n },\n runTimer: function () {\n let timer = setInterval(() => {\n if (this.state.secondsToWait === 0...
javascript
edit
0
2
mit
50ba89fed3d7d57583bba62ef29ea2f0065aefeb
YannBertrand/YouWatch,YannBertrand/YouWatch
src/client/javascript/utils.react.js
rejected_duplicate
Near-duplicate of sample 90724
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport {TypedConnector} from '../util/typed-connect'\nimport PurgeMessage from './purge-message.desktop'\nimport * as Constants from '../constants/pgp'\n\nimport type {Props} from './purge-message.desktop'\n\nconst connector: ...
javascript
edit
null
null
bsd-3-clause
5dce20f2d7b761fbba408187e5888f270800575a
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
shared/pgp/container.desktop.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */\n/*global define */\n\ndefine(function (require, exports, module) {\n\n 'use strict';\n\n // Code that needs to display user strings should ca...
javascript
edit
0
1
mit
65906e326d9bbec939d8cf6107246bbfe3e73d6b
abagshaw/brackets-minifier,abagshaw/brackets-minifier
nls/strings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Component from '@ember/component';\nimport Util from 'ui/utils/util';\nimport { get, set } from '@ember/object';\nimport layout from './template';\nimport $ from 'jquery';\n\nexport default Component.extend({\n layout,\n classN...
javascript
edit
0
5
apache-2.0
5062e53a4522f59744a9f72976f1ad3af14bcae1
vincent99/ui,rancher/ui,westlywright/ui,vincent99/ui,rancherio/ui,westlywright/ui,rancherio/ui,rancherio/ui,westlywright/ui,rancher/ui,rancher/ui,vincent99/ui
lib/shared/addon/components/schema/input-password/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require(\"path\");\n\nmodule.exports = {\n context: path.join(process.cwd(), \"<%= srcFolder %>\"),\n progress: true,\n entry: {\n \"<%= appName %>\": \"./<%= hAppName %>.ts\"\n },\n devtool: \"source-ma...
javascript
edit
0
0
mit
53a650d27b700c295361dd13ded1404475a6519c
Kurtz1993/ngts-cli,Kurtz1993/ngts-cli,Kurtz1993/ngts-cli
templates/app/src/_webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst WebpackDevServer = require('webpack-dev-server')\nconst webpack = require('webpack')\nconst config = require('../webpack.config')()\nconst env = require('./env')\nconst path = require('path')\n\nconst options = config.chromeExtens...
javascript
edit
0
0
mit
58937eb3be808351389744a916b2f301b4764467
xcv58/Custom-JavaScript-for-Websites-2,xcv58/Custom-JavaScript-for-Websites-2,xcv58/Custom-JavaScript-for-Websites-2,xcv58/Custom-JavaScript-for-Websites-2
utils/webserver.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Author: Michael Rose\n * License: MIT\n */\n\n'use strict';\n\nvar _ = require('./utils');\n\nfunction ThenCall(onFulfilled, onRejected, returnPromise) {\n this.onFulfilled = onFulfilled;\n this.onRejected = onRejected;\n thi...
javascript
edit
0
2
mit
706a591746257661640379988252e489538eec92
msrose/denote
denote/then-call.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @fileoverview Tests for no-ext-create rule.\n * @author Nat Burns\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//-----------------------------------------------------...
javascript
edit
0
0
mit
6f56c51c7aa6c06b85225d1edb817621ef16550c
burnnat/eslint-plugin-extjs
test/lib/rules/no-ext-create.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ExtendableBuiltin = require(\"./extendablebuiltin\");\nvar inherits = require(\"util\").inherits;\n\ninherits(ExtendableError, ExtendableBuiltin(Error));\n\n// From: http://stackoverflow.com/questions/31089801/extending-error-in-jav...
javascript
edit
0
1
mit
1b0b8e939bf5f2b7845fa07cf9f2b60650671f5f
ConsenSys/truffle
packages/truffle-error/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport Button from 'part:@sanity/components/buttons/default'\nimport Dialog from 'part:@sanity/components/dialogs/default'\nimport styles from './styles/UpdateNotifierDialog...
javascript
edit
0
1
mit
b10d2b9dd90164f75d8a54111cab67f69ae43f91
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
packages/@sanity/default-layout/src/components/CurrentVersionsDialog.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet React = require('react-native');\nlet {\n Image,\n PixelRatio,\n PropTypes,\n} = React;\n\nclass ResponsiveImage extends React.Component {\n\n setNativeProps(nativeProps) {\n this.refs.image.setNativeProps(nativ...
javascript
edit
0
4
mit
eec96ba3b9aadecb2643e6ae8cb94bbf54940bef
exponentjs/react-native-responsive-image
ResponsiveImage.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 got = require('got')\nconst path = require('path')\n\nconst downloadURL = 'https://ci.appveyor.com/api/projects/electron-bot/rcedit/artifacts/Default/rcedit.exe?job=Image:%20Visual%...
javascript
edit
0
1
mit
99ad6544dd216402326ffc53bbf4b78aff7cab40
dmascord/node-rcedit,dmascord/node-rcedit
script/download-latest-rcedit.js
rejected_duplicate
Near-duplicate of sample 96103
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Rightmove Enhancement Suite\n// @namespace https://github.com/chigley/\n// @description Keyboard shortcuts\n// @include http://www.rightmove.co.uk/*\n// @version 1\n// @grant GM_addStyl...
javascript
edit
0
6
mit
6df96e2157c4a86dec04bfa93f969a29832819d6
chigley/rightmove-enhancement-suite
Rightmove_Enhancement_Suite.user.js
rejected_duplicate
Near-duplicate of sample 72589
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Read all filenames from directory and it's subdirectories\n\n'use strict';\n\nvar fs = require('fs')\n , aritize = require('es5-ext/lib/Function/aritize').call\n , curry = require('es5-ext/lib/Function/curry').call\n , invo...
javascript
edit
0
3
mit
2dd6f9690f15a1efc07af54267da6bcf6f5129e1
medikoo/node-ext
lib/fs/readdir-files-deep.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of pa...
javascript
edit
0
0
mit
165dee565c5c3f5931d7ac7e1e90de917b9dcdd4
Shopify/fbjs,spicyj/fbjs,yuzhi/fbjs,chicoxyzzy/fbjs,yungsters/fbjs,adrianleb/fbjs,facebook/fbjs,heracek/fbjs,kamilio/fbjs,cpojer/fbjs,skevy/fbjs,zertosh/fbjs
scripts/babel/default-options.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Disable eslint check for undefined module" }, { "role": "assistant", "content": "export function isNode() {\n // eslint-disable-next-line no-undef\n return typeof window === 'undefined' && typeof module !== 'undefined' && m...
javascript
new_file
0
3
bsd-3-clause
30ecb45b6aea0e2126024f9ea35d7ab10f681336
MapCreatorEU/m4n-api,MapCreatorEU/m4n-api
src/utils/node.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (env) {\n \"use strict\";\n env.ddg_spice_iplookup = function(api_result){\n\n if (!api_result || api_result.error) {\n return Spice.failed('iplookup');\n }\n\n Spice.add({\n id...
javascript
edit
0
3
apache-2.0
ac60415a9d9d0ce040494780472903d9cd88f15f
tagawa/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,levaly/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,deserted/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,dogomedia/zeroclickinfo-sp...
share/spice/iplookup/iplookup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (env) {\n \"use strict\";\n env.ddg_spice_wikinews = function(api_result){\n\n if (api_result.error) {\n return Spice.failed('wikinews');\n }\n\n DDG.require('moment.js', function(){\n ...
javascript
edit
0
2
apache-2.0
f7d4c1d5f88efb6cbe743e22eaa33c174f059e6f
Faiz7412/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,P71/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,mohan08p/zer...
share/spice/wikinews/wikinews.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { withModules } from '../Modules';\nimport { stripesShape } from '../../Stripes';\n\nimport { getHandlerComponents } from '../../handlerService';\n\nclass HandlerMa...
javascript
edit
0
1
apache-2.0
7d74f45eb7dad5c0be1430fed8c00cf300a64a8f
folio-org/stripes-core,folio-org/stripes-core,folio-org/stripes-core
src/components/HandlerManager/HandlerManager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n\t\"use strict\";\n\n\tfunction initPage() {\n\n\t\t// If there is an \"Additional Fields\" button on the page, then show the extended fields and hide the button.\n\t\t// This is on the \"Add New Work\" page and the corre...
javascript
edit
0
3
apache-2.0
f4af391e39dd0aaaad1d042da739447d7450fbef
uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2,uvalib/Libra2
app/assets/javascripts/dont_hide_additional_fields.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule.exports = {\n env: {\n // Browser global variables\n browser: true,\n\n // jQuery global variables\n jquery: true,\n\n // CommonJS global variables and CommonJS scoping.\n commonjs: true,\n\n // Disable no...
javascript
edit
0
0
mit
84caec1614558c028c5a39a1a9583df2bb58ed03
axelpale/tresdb,axelpale/tresdb
client/.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ndescribe('Unit :: Protocols.Local', function () {\n\n var Local = require('../../../src/protocols/list/Local.js');\n\n it('constructor()', function() {\n\n var local = new Local();\n\n assert(typeof ...
javascript
edit
0
1
mit
4c1a49c3b8f13aa72987d984f0688a9e2d6b9cf0
Dhumez-Sebastien/trap.js,Dhumez-Sebastien/trap.js
test/unit/protocols/local.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\napp.controller(\"MainController\", [\"$scope\", \"$http\", \"units\", \"unit\", function($scope, $http, units, unit) {\n // Convert 0 or 1 from database to false or true for Angular. Yup...\n units.get(function(data) {\n $sco...
javascript
edit
0
3
mit
0e6ff8b6b08531cae7b37bfdb4ebcbd22e8add6d
thijsdortmann/autobot,thijsdortmann/autobot
public/javascripts/controllers/MainController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fs from 'fs';\nimport path from 'path';\nimport Sequelize from 'sequelize';\nimport configs from '../config/config';\n\nconst basename = path.basename(module.filename);\nconst env = process.env.NODE_ENV || 'test';\nconst config =...
javascript
edit
0
2
apache-2.0
3c3a90cbc36bbb773db2adabbbf799aa83501f74
larrystone/BC-26-More-Recipes,larrystone/BC-26-More-Recipes
server/models/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// client entry point, imports all client code\nimport { Meteor } from 'meteor/meteor';\nimport { render } from 'react-dom';\nimport { i18n } from 'meteor/universe:i18n';\nimport moment from 'moment';\n// FIXME: importing this moment lo...
javascript
edit
0
1
mit
4e58471df591ef9472c5fede7d6ff81d767fbe72
fmilani/contatempo,fmilani/contatempo
client/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2013 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\ncr.define('options', function() {\n var OptionsPage = options.Opt...
javascript
edit
0
1
bsd-3-clause
72c54db7d80c2c10de0bcfbb8055dc3b17561fa6
ltilve/chromium,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,dednal/chromium.src,jaruba/chromium.src,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,an...
chrome/browser/resources/options/geolocation_options.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$('form#submit-repo').submit(\n function(evt){\n evt.preventDefault();\n\n var status = $('#status');\n var repo = $('label[for=\"repo_name\"]').text() + $('input[name=\"repo_name\"]').val();\n var text = 'Processing to cre...
javascript
edit
0
1
mit
d3103aca82d11b781d62863fdef87716581f11a7
punchagan/statiki,punchagan/statiki
static/js/custom.js
rejected_duplicate
Near-duplicate of sample 69259
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Create a blob builder even when vendor prefixes exist\n */\n\nvar BlobBuilder = global.BlobBuilder\n || global.WebKitBlobBuilder\n || global.MSBlobBuilder\n || global.MozBlobBuilder;\n\n/**\n * Check if Blob constructor is su...
javascript
edit
0
6
mit
31824ecf2ed5cd90b023e9385414187477785d2d
webmodules/blob
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Class = require('./Class'),\n\tinvokeWith = require('./invokeWith'),\n\tslice = require('./slice'),\n\teach = require('./each')\n\nmodule.exports = Class(function() {\n\tthis.init = function() {\n\t\tthis._dependants = []\n\t\tthis....
javascript
edit
0
2
mit
c79d6d51722a38fe82be8c06eb80358307084b1b
ASAPPinc/std.js,marcuswestin/std.js
Promise.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar domElementFactory = require( \"./lib/domElementFactory\" ),\n\tdomElementListFactory = require( \"./lib/domElementListFactory\" );\n\nfunction create( tagName, args ) {\n\tvar $element = domElementFactory( documen...
javascript
edit
0
1
mit
ba262668d837c92cd6099147ad9e49540e83ed68
essenmitsosse/simple-dom-helper
simple-dom-helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport config from 'ember-get-config';\nimport Component from 'ember-component';\nimport computed from 'ember-computed';\nimport Webcam from 'webcamjs';\nimport layout from '../templates/components/ember-webcam';\n\nconst _enableFlashFa...
javascript
edit
0
3
mit
24a0b1e64e2f7ebcb2c34c2a9e2737560f44617f
leizhao4/ember-webcam,forge512/ember-webcam,forge512/ember-webcam,leizhao4/ember-webcam
addon/components/ember-webcam.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule.exports = limiter;\n\n/*global setTimeout, clearTimeout */\n\nfunction limiter(interval) {\n\n var queue = [], lastTrigger = 0, timer;\n\n function now() {\n return + (new Date);\n }\n\n function since() {\n return no...
javascript
edit
0
3
mit
b897c04522318d0aae6c830372693cca11b35417
code42day/limiter,npmcomponent/code42day-limiter
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n Copyrights for code authored by Yahoo! Inc. is licensed under the following\n terms:\n\n MIT License\n\n Copyright (c) 2011 Yahoo! Inc. All Rights Reserved.\n\n Permission is hereby granted, free of charge, to any person obtaining ...
javascript
edit
0
0
mit
a1958e636f865aae2e4896259290ff992eca773a
bengl/ytestrunner,gotwarlost/ytestrunner
index.js
accepted
null
true