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 { expect } from 'chai';\n\ndescribe('smoke test', () => {\n it('run a test', () => {\n expect(true).to.equal(true);\n });\n});\n\n```\n\nApply this change: CSRA-000: Make the fail the test to demo CircleCI" }, { "rol...
javascript
edit
0
1
mit
848ee33109b35c83ac846a91d106e9268d1336d4
noms-digital-studio/csra-app,noms-digital-studio/csra-app,noms-digital-studio/csra-app
test/app.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\ndescribe('StreamPromise', function() {\n const StreamPromise = require('../')\n const FS = require('fs')\n it('works', function() {\n waitsForPromise(function() {\n return StreamPromise.create(FS.createReadStrea...
javascript
edit
0
2
mit
fded4d32e273e3d2183005c803bcecc68fa616e0
steelbrain/stream-promise
spec/main-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n 'use strict';\n\n var $coordinator_select = $('#coordinator_id');\n var $group_select = $('#group_id');\n\n $coordinator_select.select2();\n $group_select.select2();\n\n function set_group_users() {\n...
javascript
edit
0
1
mit
ad8527e1d63d99f14f956b69a3a52e018b4b3058
viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct
src/js/single/committee/edit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* globals requirejs, require */\n\nQUnit.config.urlConfig.push({ id: 'nojshint', label: 'Disable JSHint'});\n\n// TODO: load based on params\nfor (var moduleName in requirejs.entries) {\n var shouldLoad;\n\n if (moduleName.match(/-te...
javascript
edit
0
0
mit
4da6eb8cee0e4463bd7436da58c1caf352ae6c31
ember-cli/ember-cli-test-loader
test-loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst packageJson = require('../package')\nconst channelHeader = `Node.js-${process.version}-SDK-v${packageJson.version}`\n\nmodule.exports = {\n reqWithBody: {\n reqheaders: {\n 'X-App-Id': 'node-sdk-test-id',\...
javascript
edit
0
0
mit
eb3311239dac49183579a91ad99d9f1e6733e0bc
voucherifyio/voucherify-nodejs-sdk,rspective/voucherify-nodejs-sdk
test/fixtures.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable no-unused-expressions */\n\nimport { expect } from 'chai';\n\nexport default function orm (people, _ids, errors) {\n describe('Feathers ORM Specific Tests', () => {\n it('wraps an ORM error in a feathers error', ()...
javascript
edit
0
2
mit
3124a0955dbedcd57b78858a5c7af9f197bb3d68
feathersjs/feathers-service-tests
src/orm-tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nvar Janeway = require('../lib/init.js'),\n libpath = require('path'),\n main_file;\n\n// Get the wanted file to require\nmain_file = libpath.resolve(process.cwd(), process.argv[2]);\n\n// Remove janeway from t...
javascript
edit
0
4
mit
d9d8003d5a91f8849b6d63e78c95a384f4643ef6
skerit/janeway
bin/execbin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar LineReader = require('line-by-line'),\n minimist = require('minimist'),\n exec = require('exec'),\n path = require('path'),\n fs = require('fs');\n\nvar filenames = minimist(p...
javascript
edit
0
2
mit
df476029bd49caf6de34eeee05ef3af83649173b
rowanoulton/m3u-export
bin/m3u-export.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\r\n\r\ngulp.task('test', function () {\r\n require('./');\r\n var mocha = require('gulp-mocha');\r\n return gulp.src('test/**/*.es6', {\r\n read: false\r\n })\r\n .pipe(mocha({\r\n bail: true\r...
javascript
edit
0
1
mit
016209fd667a21ac2c9800c29efd3e2be4bae872
OEvgeny/postcss-assets,borodean/postcss-assets,justinanastos/postcss-assets,assetsjs/postcss-assets,glebmachine/postcss-assets
Gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Use injector to do angular config function." }, { "role": "assistant", "content": "function CartRouters($stateProvider, $urlRouterProvider) {\n}\n\nCartRouters.$inject = ['$stateProvider', '$urlRouterProvider'];\n\nexport def...
javascript
new_file
0
1
mit
4ab6a6db8542d018ca1068808f83daa5f09bc3dc
agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart,agreatfool/Cart
src/client/es6/routers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function($) {\n\n \"use strict\";\n\n var apiUrl = \"http://redjohn.herokuapp.com/api/tweets\";\n\n function addScoresToSuspects(response) {\n _.each(response.results, function(mentions, suspect) {\n $(\"#\" ...
javascript
edit
0
1
mit
62e3f095c37976d67d28a16056b188ac643124a4
AnSavvides/redjohn,AnSavvides/redjohn
static/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n Copyright (c) 2014, Ryuichi Okumura. All rights reserved.\n Code licensed under the BSD License:\n https://github.com/okuryu/package-json-flatten/blob/master/LICENSE.md\n */\n\"use strict\";\n\n/*\n Based on order of the NPM offici...
javascript
edit
0
2
bsd-3-clause
5871c8b7077eaeaf04049135142d7e34f6130e30
okuryu/package-json-flatten
lib/flatten.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from 'path';\nimport loadPresets from './presets';\nimport serverRequire from './serverRequire';\n\nfunction customPreset({ configDir }) {\n return serverRequire(path.resolve(configDir, 'presets')) || [];\n}\n\nfunction get...
javascript
edit
0
2
mit
a3c2fdadd697e0bcdece46a8d6ecf1affa5c572d
storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook
lib/core/src/server/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction JsonRenderer() {\n this._nrLogs = 0;\n}\n\nJsonRenderer.prototype.end = function (data) {\n if (this._nrLogs) {\n process.stderr.write(']\\n');\n }\n\n if (data) {\n process.stdout.write(this._stringif...
javascript
edit
0
3
mit
4593b652c4791c7b30cacd9b60fe90fad0d1aa98
mattpugh/bower,haolee1990/bower,Teino1978-Corp/bower,unilynx/bower,lukemelia/bower,angeliaz/bower,Jeremy017/bower,Teino1978-Corp/Teino1978-Corp-bower,jvkops/bower,pjump/bower,rajzshkr/bower,pwang2/bower,bower/bower,return02/bower,fernandomoraes/bower,wenyanw/bower,sanyueyu/bower,rlugojr/bower,supriyantomaftuh/bower,gri...
lib/renderers/JsonRenderer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nYUI.add(\"model-timeline-base\", function(Y) {\n \"use strict\";\n \n var models = Y.namespace(\"Falco.Models\"),\n \n TimelineBase;\n \n TimelineBase = Y.Base.create(\"timeline\", Y.Model, [], {\n ...
javascript
edit
0
4
mit
775bf364fc17512bd16827526bd7745352c015a6
tivac/falco,tivac/falco
src/js/models/model-timeline-base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport prerender from './prerender'\n\n// This is a wrapper to handle a single isomorphic render inside a child process\n\nfunction startRender(context) {\n prerender(context).then((result) => {\n process.send(result, null, {}, () =...
javascript
edit
0
2
mit
e939cdd71013934a26e477288d22e0240bd8bb7f
ello/webapp,ello/webapp,ello/webapp
src/server/entrypoint-render.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nrequire('../helpers');\nconst assert = require('assert');\nconst Ironium = require('../..');\n\n\ndescribe('Queue with delay', function() {\n\n const captureQueue = Ironium.queue('capture');\n\n // Capture processed jo...
javascript
edit
0
1
mit
d03a772f541090e8d9165314371cb222702d435d
assaf/ironium
test/queue/with_delay_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst spaceCase = (a) => {\n return a\n .replace(/(_|-|\\.)/g, ' ')\n .replace(/([A-Z])/g, ' $1')\n .replace(/\\s+/g, ' ')\n .replace(/^\\s+/, '')\n .replace(/\\s$/, '');\n};\n\nexport default spaceCase;\n\n```\n\nApply ...
javascript
edit
0
1
mit
012942d0f2d13ce7e3fe20b1fadecbf57248ce9f
restrung/restrung-regex
src/space-case.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* \n * Angular Seed - v0.1 \n * https://github.com/rachellcarbone/angular-seed/\n * Copyright (c) 2015 Rachel L Carbone; Licensed MIT\n */\n\n// Include modules, and run application.\nangular.module('theApp', [\n 'u...
javascript
edit
0
0
mit
bfc7ae42c589838f6ae04b3d2e944d585e8382bb
rachellcarbone/angular-seed,rachellcarbone/angular-seed,rachellcarbone/angular-seed
www/app/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar exec = require('child_process').exec;\n\nmodule.exports = function reboot(controller) {\n controller.hears('technical assessment', ['direct_message','mention','direct_mention', 'message_received'], function(bot, me...
javascript
edit
0
1
mit
bf7e23827e2aa912b6431e906763ceaa871f7640
remotebeta/codybot
commands/sa.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Include needed files\nvar fluffbot = require('../lib/fluffbot')\nvar discord = require('discord.js')\nvar event = require('../lib/event')\n\n// Instantiate bots\nvar fluffbot = new fluffbot()\ndiscord = new discord.Client({autoReconn...
javascript
edit
0
3
mit
d6cb6adf103ace89ee6a3ab8c249a953cc0052ba
FluffyMatt/fluffbot
bin/bot.js
rejected_duplicate
Near-duplicate of sample 96526
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\rvar cobs = require('../..'),\r http = require('http'),\r fs = require('fs');\r\rfunction compileFile(filename) {\r var content = fs.readFileSync(filename).toString();\r var code = cobs.compileTemplate(content);\r var pa...
javascript
edit
null
null
mit
8eb04e26730dbaa622140a90b0d1f63bdbd5c65b
ajlopez/CobolScript
samples/templateweb/server.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// TODO: This is not a real model or controller\nApp.Graphs = Ember.Controller.extend({\n graph: function(emberId, entityName, entityType, numSeries) {\n entityName = entityName.replace(/\\./g, '-');\n var url = ((!localStorage.a...
javascript
edit
null
null
apache-2.0
cdeca36337d76404cb8ea02f90e84ed9d0ca0c4e
vine77/saa-ui,vine77/saa-ui,vine77/saa-ui
scripts/models/graphs-model.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// workflows/createDeployment\nvar Joi = require('joi');\n\nmodule.exports = {\n schema: Joi.object({\n deployerId: Joi.string().required(),\n name: Joi.string().min(1).required(),\n }).required().unknown(...
javascript
edit
0
1
mit
ca33d145097d8c7bb4c022be010d0f939250bccc
f5itc/swf-graph,f5itc/swf-graph,f5itc/swf-graph
workflows/createDeployment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n sortChildren (data) {\n data.forEach((el) => {\n if (el.parent) {\n this.findNestedObject(data, el.parent[0].admin.uid).children.push(el);\n }\n });\n return this.arrangeChildren(data[0]);...
javascript
edit
0
7
mit
39d5e9f4be50ba9ec8ca0bff4138c26e8ddeefe8
TheScienceMuseum/collectionsonline,TheScienceMuseum/collectionsonline
lib/archive-tree.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Test runner\nvar runTests = require('./affixing-header-specs'),\n browsers = [\n {browserName: 'chrome'},\n {browserName: 'firefox'}\n ];\n\n// var browserConfig = require('./helpers/browser-config');\n\nif (pro...
javascript
edit
0
1
cc0-1.0
f01dc34ca41fcd59afd5da35b46b35659a835f55
acusti/affixing-header,acusti/affixing-header
test/conductor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Series = require('hapi-next'),\n Validator = require('modules/authorization/validator'),\n Controller = require('modules/authorization/controller');\n\nmodule.exports = {\n\t\n\tlogin : {\n\t\tmethod : 'POST',\n\t\tpath : '/lo...
javascript
edit
0
1
mit
86d34450e5e0268e24b86aadf23ca1182fd7f06e
Pranay92/lets-chat,Pranay92/collaborate
modules/authorization/route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport response from 'cfn-response'\nimport SNS from 'aws/sns'\nimport { Settings } from 'model/settings'\n\nexport async function handle (event, context, callback) {\n if (event.RequestType === 'Update' || event.RequestType === 'Delet...
javascript
edit
0
8
apache-2.0
a416b0a1f674d8ab05472c961da780d69df8aa5b
ks888/LambStatus,ks888/LambStatus,ks888/LambStatus
packages/lambda/src/api/dbCreateItems/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport OC from 'orbit-common/main';\nimport Cache from 'orbit-common/cache';\nimport IdMap from 'orbit-common/id-map';\nimport Schema from 'orbit-common/schema';\nimport Serializer from 'orbit-common/serializer';\nimport Source from 'or...
javascript
edit
0
0
mit
c3b367a8c05ae7e21701c8d487d9e9e70f95d7f0
orbitjs/orbit.js,beni55/orbit.js,jpvanhal/orbit-core,opsb/orbit.js,orbitjs/orbit-core,ProlificLab/orbit.js,lytbulb/orbit.js,orbitjs/orbit.js,lytbulb/orbit.js,rollokb/orbit.js,jpvanhal/orbit.js,opsb/orbit-firebase,opsb/orbit-firebase,opsb/orbit-firebase,lytbulb/orbit-firebase,gnarf/orbit.js,ProlificLab/orbit.js,beni55/o...
lib/orbit-common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst functions = require('firebase-functions');\nconst { getPullRequestsForUser } = require('./github.js');\n\nexports.user = functions.https.onRequest(async (request, response) => {\n try {\n const data = await getPullRequestsForU...
javascript
edit
0
2
mit
e96036e8dc450b8ddfccbda9c9c831aed64735d4
karanjthakkar/showmyprs.com
functions/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(\n [\n 'Magento_Payment/js/view/payment/cc-form'\n ],\n function (Component) {\n 'use strict';\n return Component.extend({\n defaults: {\n template: 'Omise_Payment/payment/o...
javascript
edit
0
1
mit
3fba933315cc62c0255ae52936f5e375813fbd3b
omise/omise-magento,omise/omise-magento,omise/omise-magento
Omise/Payment/view/frontend/web/js/view/payment/method-renderer/omise-cc-method.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createAction, handleActions } from 'redux-actions'\n\nexport const INITIAL_DATA = 'INITIAL_DATA'\n\nexport const initialData = createAction(INITIAL_DATA)\n\nconst spaceshipsDataReducer = handleActions({\n [INITIAL_DATA]: (stat...
javascript
edit
0
1
mit
093ab10177a6a70fdf073c63421346c442613647
billdevcode/spaceship-emporium,billdevcode/spaceship-emporium
src/modules/spaceshipsDataReducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(sequelize, DataTypes) {\n var University = sequelize.define(\"University\", {\n name: {\n type: DataTypes.STRING,\n allowNull: false,\n },\n countr...
javascript
edit
0
1
mit
c808428d7a8ff3accab13f944e62573a3ee38128
dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet
registrar/models/university.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(app) {\n 'use strict';\n\n var jCore = require('jcore');\n var helper = app.helper || require('../helper.js');\n\n var ContentHeader = helper.inherits(function() {\n ContentHeader.super_.call(this);\n }, jCore.Componen...
javascript
edit
0
4
mit
5dcbf8c82bec5ccc94a1a3ee209697bfae0bc45c
ionstage/modular,ionstage/modular
js/components/content-header.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\n/* eslint-disable no-console */\n\nconst webpack = require('webpack');\nconst debug = require('debug')('app:webpack');\n\nconst isDev = process.env.NODE_ENV !== 'production';\ndebug(`Running in ${(isDev ? 'develop...
javascript
edit
0
0
mit
cace74599168013eb66cf9e9ab2623fb1ad392e3
frosas/lag,frosas/lag,frosas/lag
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar biomes = {\n \"riverLand\": {\n probability: 0.8,\n tiles: {\n \"bambooBush\": 0.8,\n \"rockCluster\": 0.2\n }\n },\n \"forest\": {\n probability: 0.5,\n tiles: {\n ...
javascript
edit
0
0
mit
5e5072ced3b8fcec76b91f6fa7addaedb6702a35
zkingston/coroga,zkingston/coroga
configs/biomes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {PluginNotFound} from 'Exception/PluginNotFound';\n\nexport class Slider\n{\n constructor(element)\n {\n if (!$.isFunction($.fn.slider)) {\n throw new PluginNotFound('Slider');\n }\n\n this.element = element;\n ...
javascript
edit
0
2
mit
b766115ed6f960d5b488857129725a4faf5bec7c
jonasdekeukelaere/Framework,sumocoders/Framework,sumocoders/Framework,jonasdekeukelaere/Framework,sumocoders/Framework,jonasdekeukelaere/Framework,sumocoders/Framework,jonasdekeukelaere/Framework
src/SumoCoders/FrameworkCoreBundle/Resources/assets/js/Framework/Slider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst Encore = require('@symfony/webpack-encore');\n\nconst { paths, js: { entries, vendor } } = JSON.parse(fs.readFileSync('./package.json')).config;\nconst env = process.env.NODE_ENV === 'production' ? 'prod...
javascript
edit
0
3
mit
2b29a5df0e61f49dcf2875b89b93c0dcfca13daf
e-sites/fe-boilerplate-poc,e-sites/fe-boilerplate-poc
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst context = path.join(__dirname, 'site');\nconst public = path.join(__dirname, 'public');\n\nmodule.exports = {\n context,\n devServer: {\n contentBase: public,\n historyApiFallback: true,\n ...
javascript
edit
0
0
mit
0c02a02ce126113e7ea3a36a571f326b9c186cab
skatejs/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs,chrisdarroch/skatejs
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n entry: \"./src/ko-calendar.js\",\n output: {\n filename: \"./ko-calendar.js\",\n libraryTarget: \"commonjs2\"\n }\n}\n```\n\nApply this change: Change webpack library target to commonjs" }, ...
javascript
edit
0
0
mit
242705eae5ed23fbc1b10c7e3b6dc1f187433082
Seikho/ko-calendar,Seikho/ko-calendar,Seikho/ko-calendar
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\nconst EmberAddon = require('ember-cli/lib/broccoli/ember-addon')\n\nmodule.exports = function (defaults) {\n const app = new EmberAddon(defaults, {\n babel: {\n optional: ['es7.decorators']\n },\n '...
javascript
edit
0
1
mit
a3b622643e4fcc2edc62327e8c9a33b2c6d419fa
ciena-blueplanet/ember-test-utils,sophypal/ember-test-utils,ciena-blueplanet/ember-test-utils,ciena-blueplanet/ember-test-utils,sophypal/ember-test-utils,sophypal/ember-test-utils
ember-cli-build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport logo from './logo.svg';\nimport './App.css';\nimport { version, name } from '../package.json';\n\nclass App extends Component {\n render() {\n return (\n <div className=\"App\">...
javascript
edit
0
1
bsd-3-clause
c223f86f6878dc77a89ea64bb41811eac842e964
iamdoron/create-react-app,iamdoron/create-react-app,iamdoron/create-react-app
packages/react-scripts/template/src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport template from './appstore-field-select-openstack-tenant.html';\n\nclass AppstoreFieldSelectOpenstackTenantController {\n // @ngInject\n constructor(ncUtilsFlash, openstackTenantsService, currentStateService) {\n this.ncUtils...
javascript
edit
0
2
mit
bdb390a1adfae17297c11de4395dca0c5fe7d9eb
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/components/openstack/openstack-tenant/appstore-field-select-openstack-tenant.js
rejected_duplicate
Near-duplicate of sample 86652
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = {\n entry: {\n home: path.join(__dirname, 'app/src/home'),\n },\n\n module: {\n loaders: [\n {\n test: /\\.sass$/,\n load...
javascript
edit
0
0
mit
3e887dd433998679c673b3900857d5e13d6dfbeb
arkis/arkis.io,arkis/arkis.io
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path')\n\nmodule.exports = {\n context: __dirname,\n entry: './src/index.js',\n devtool: 'source-map',\n\n output: {\n library: 'es2016-starter',\n libraryTarget: 'umd',\n path: path.resolve('dist'),\n...
javascript
edit
0
0
mit
3e7b6c1be45cfa4adce0e3b6dfed80357ba5470d
kroogs/scanty,kroogs/yaemit
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst webpack = require('webpack');\n\nmodule.exports = {\n entry: `${__dirname}/src/index.js`,\n output: {\n path: `${__dirname}/build`,\n publicPath: '/build/',\n filename: 'bundle.js',\n },\n\n module: {\n rules: [\n ...
javascript
edit
0
0
mit
a846b2b8aa57aa0e31080d10e6e92b793f19fb95
ambershen/ambershen.github.io,ambershen/ambershen.github.io
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar CopyWebpackPlugin = require('copy-webpack-plugin');\nvar path = require('path');\n\nmodule.exports = [{\n entry: {\n horizontal: './shim/horizontal.js',\n vertical: './shim/vertical.js'\n },\n output: {\n library: 'Scrat...
javascript
edit
0
0
apache-2.0
072dbae8e4fb273a34a4c1d0ece641805d813fcc
griffpatch/scratch-blocks,griffpatch/scratch-blocks,LLK/scratch-blocks,LLK/scratch-blocks,LLK/scratch-blocks,LLK/scratch-blocks,griffpatch/scratch-blocks,LLK/scratch-blocks,griffpatch/scratch-blocks,griffpatch/scratch-blocks
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar ExtractTextPlugin = require('extract-text-webpack-plugin');\n\nmodule.exports = {\n devtool: 'source-map',\n entry: {\n 'tree-chooser': './src/index.js',\n 'tree-chooser.min': './src/index....
javascript
edit
0
0
apache-2.0
857a965be72e597c3d6b5fa9c836e15038dd9ef6
albertian/tree-chooser,randdusing/tree-chooser,albertian/tree-chooser,randdusing/tree-chooser
webpack.config.js
rejected_duplicate
Near-duplicate of sample 86740
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @module ol/format/XLink\n */\n\n\n/**\n * @const\n * @type {string}\n */\nconst NAMESPACE_URI = 'http://www.w3.org/1999/xlink';\n\n\n/**\n * @param {Node} node Node.\n * @return {boolean|undefined} Boolean.\n */\nexport function...
javascript
edit
0
1
bsd-2-clause
ddeb0918712169f45f744682279440d0a317032e
mzur/ol3,fredj/ol3,tschaub/ol3,geekdenz/ol3,oterral/ol3,bjornharrtell/ol3,fredj/ol3,mzur/ol3,stweil/ol3,mzur/ol3,adube/ol3,tschaub/ol3,ahocevar/ol3,tschaub/ol3,geekdenz/openlayers,geekdenz/ol3,geekdenz/ol3,adube/ol3,ahocevar/openlayers,oterral/ol3,stweil/ol3,ahocevar/openlayers,stweil/openlayers,openlayers/openlayers,a...
src/ol/format/XLink.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst path = require('path');\nconst shell = require('shelljs');\nconst argv = require('yargs').argv;\nconst clc = require('cli-color');\n\nfunction packageJsonLocations(dirname) {\n return shell.find(dirname)\n ...
javascript
edit
0
3
mit
4fd065919b64297536ddbceed9d52aed81fa4b0e
nrigaudiere/yarn-recursive
yarn-recursive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['Twitter', 'TwitterConfirmer', 'TapsModel', 'JQMListView', 'ListPresenter', 'JQMEditView', 'EditPresenter', 'FollowingPresenter', 'SettingsPage'],\nfunction(Twitter, TwitterConfirmer, TapsModel, JQMListView, ListPresenter, JQMEd...
javascript
edit
0
1
mit
74bd30e8deee50bdc41fc21f9616df76ceb7a994
coolhandmook/BeerTap,coolhandmook/BeerTap
www/js/BeerTap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\n\nclass ProfilePage extends React.Component {\n constructor(props){\n super(props);\n this.logoff = this.logoff.bind(this);\n }\n\n logoff(){\n localStorage...
javascript
edit
0
1
mit
288ce5205edcf7e6c1afda5fa62d95c479aa6c30
MouseZero/voting-app,MouseZero/voting-app
src/components/ProfilePage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\n\nconst buildEntryPoint = entryPoint => {\n return [\n 'react-hot-loader/patch',\n 'webpack-dev-server/client?http://localhost:3000',\n 'webpack/hot/only-dev-...
javascript
edit
0
1
mit
aca697b17742b680cc6732ec2a9adae951b01ea0
ibleedfilm/fcc-react-project,ibleedfilm/recipe-box,ibleedfilm/recipe-box,ibleedfilm/fcc-react-project
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar http = require('http');\nvar routes = require('./routes');\nvar app = express();\n\napp.set('views', __dirname);\napp.set('view engine', 'ejs');\n\nif (app.get('env') === 'development') {\n var br...
javascript
edit
0
1
mit
f6524d0f0f092258ff5d491138b6a78c4e4dc3b8
schmich/connect-browser-sync,schmich/connect-browser-sync
example/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n devtool: 'source-map',\n entry: './src/Home.jsx',\n output: {\n path: './public',\n filename: './js/app.js',\n publicPath: '/'\n },\n devServer: {\n inline: true,\n ...
javascript
edit
0
0
mit
8c075d8c2dd3231309cdff9d9363fcd9b8cb5457
Juan1ll0/es6-react-server-side-render,Juan1ll0/es6-react-server-side-render
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n stories: ['../components/*.stories.js'],\n addons: ['@storybook/addon-actions', '@storybook/addon-links', '@storybook/storyshots'],\n};\n\n```\n\nApply this change: Remove redundant storyshot plugin configuration"...
javascript
edit
0
0
mit
3914130255de502902fe35893fb435cbeb94e8c4
cofacts/rumors-site,cofacts/rumors-site
.storybook/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst UglifyJsPlugin = require('uglifyjs-webpack-plugin');\nconst WebpackAutoInject = require('webpack-auto-inject-version');\n\nmodule.exports = {\n entry: {\n 'typedjson': './src/typedjson.ts',\n ...
javascript
edit
0
0
mit
f6af9188e6bbac4f9231fcceecf53c125e520ec7
JohnWhiteTB/TypedJSON,JohnWhiteTB/TypedJSON,JohnWeisz/TypedJSON,JohnWeisz/TypedJSON,JohnWhiteTB/TypedJSON
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Hapi = require('@hapi/hapi');\nconst routes = require('./routes');\nconst auth = require('./auth');\n\nmodule.exports = async (elastic, config, cb) => {\n const server = new Hapi.Server({ port: config.port, routes: { cors: true, ...
javascript
edit
0
3
mit
a47277dc01719beb91bbe71e5bfcf33eefbfa2b9
TheScienceMuseum/collectionsonline,TheScienceMuseum/collectionsonline
server.js
rejected_duplicate
Near-duplicate of sample 99821
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) Microsoft Corporation. All rights reserved.\n\nvar http = require('http'),\n url = require('url');\n\nmodule.exports.attach = function (app) {\n app.all('/xhr_proxy', function proxyXHR(request, response) {\n ...
javascript
edit
0
2
mit
9ba37879aab75e4817ab7673a144521a86464580
TimBarham/cordova-simulate,Microsoft/taco-simulate-server,Microsoft/taco-simulate-server,TimBarham/cordova-simulate
src/server/xhr-proxy.js
rejected_duplicate
Near-duplicate of sample 74708
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport moment from 'moment';\nimport {has} from 'ramda';\n\nexport default (newProps, momentProps) => {\n const dest = {};\n\n momentProps.forEach(key => {\n const value = newProps[key];\n\n if (value === null || val...
javascript
edit
0
11
mit
46bf3ad1bee7ac96ccf23c26033b69b2d6394220
plotly/dash-core-components
src/utils/convertToMoment.js
rejected_complexity
Cyclomatic complexity too high: 11
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n angular\n .module('<%=angularAppName%>')\n .factory('SocialService', SocialService);\n\n SocialService.$inject = ['$document'];\n\n function SocialService ($document) {\n ...
javascript
edit
0
4
apache-2.0
423bbaf03c83313d327b6c84e6b77ad6787de9e4
rifatdover/generator-jhipster,baskeboler/generator-jhipster,JulienMrgrd/generator-jhipster,ziogiugno/generator-jhipster,vivekmore/generator-jhipster,vivekmore/generator-jhipster,mosoft521/generator-jhipster,gmarziou/generator-jhipster,baskeboler/generator-jhipster,dimeros/generator-jhipster,PierreBesson/generator-jhips...
generators/client/templates/src/main/webapp/app/account/social/_social.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require(\"gulp\");\nvar browserify = require(\"browserify\");\nvar source = require(\"vinyl-source-stream\");\nvar buffer = require(\"vinyl-buffer\");\nvar reactify = require(\"reactify\");\nvar watch = require(\"gulp-watch\"...
javascript
edit
0
1
mit
44d44c1a110f66a5cfd51608d3fb463cc87705f0
Sixeight/iwai,Sixeight/iwai,Sixeight/iwai
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst WIDTH = 800;\nconst HEIGHT = 600;\n\nvar setup = function() {\n createCanvas(WIDTH, HEIGHT);\n background(0);\n fill(255);\n\n angleMode(DEGREES);\n\n stroke(255);\n strokeWeight(1);\n strokeCap(SQUARE);\n}\n\nvar draw = fu...
javascript
edit
0
1
mit
7c867bc44d695ab15ecf63bdcf71db4088893551
SimonHFrost/my-p5,SimonHFrost/my-p5
sketch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTarget = function(x, y) {\r\n this.x = x;\r\n this.y = y;\r\n this.life = 11;\r\n this.size = 12;\r\n\r\n return this;\r\n}\r\nTarget.prototype.render = function() {\r\n var x = this.x - gCamera.x;\r\n var y = this.y - gCamera.y;...
javascript
edit
0
3
mit
9f4144ee6c33e14aa5e824b117450083c3296ec9
peternatewood/shmup,peternatewood/shmup,peternatewood/shmup
target.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar elm = require('gulp-elm');\nvar plumber = require('gulp-plumber');\nvar del = require('del');\nvar browserSync = require('browser-sync');\n\n// builds elm files and static resources (i.e. html and css) f...
javascript
edit
0
1
mit
14537e283e19802f2decfae2f269caf0c8860b20
martin-kolinek/elm-dashboard,martin-kolinek/elm-dashboard
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst checkStatus = () => {\n fetch(\"/load_status\", {\n credentials: \"same-origin\"\n })\n .then(response => {\n return response.text();\n })\n .then(data => {\n document.getElementById(\"repo-alert\").style.d...
javascript
edit
0
2
mit
14909c3d779edddad99b5f08ad5b17a4802abc13
schneidmaster/gitreports.com,schneidmaster/gitreports.com,schneidmaster/gitreports.com
app/assets/javascripts/profile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp')\nvar browserify = require('browserify')\nvar source = require('vinyl-source-stream')\nvar serve = require('gulp-serve')\nvar concat = require('gulp-concat')\n\n// Static file server\ngulp.task('server', serve(...
javascript
edit
0
1
mit
c67221a0661795471bc5c650292d3e6321e623a8
opbeat/opbeat-react,opbeat/opbeat-angular,opbeat/opbeat-react,opbeat/opbeat-angular,opbeat/opbeat-js-core,jahtalab/opbeat-js,opbeat/opbeat-react,opbeat/opbeat-js-core,jahtalab/opbeat-js,jahtalab/opbeat-js,opbeat/opbeat-angular
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar less = require('gulp-less');\nvar plumber = require(\"gulp-plumber\");\nvar browserSync = require('browser-sync').create();\n\ngulp.task('run', function() {\n browserSync.init({\n server: \"./\"\n }...
javascript
edit
0
1
mit
b9f206997eed1fbadfdeea81dd165fb17750f6a4
rochefort/hatena-blog-theme-komforta,rochefort/hatena-blog-theme-komforta
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar gutil = require('gulp-util');\nvar bower = require('bower');\nvar concat = require('gulp-concat');\nvar sh = require('shelljs');\nvar del = require('del');\nvar copyHTML = require('ionic-gulp-html-copy')...
javascript
edit
0
2
mit
0825096862510c43b937ddac5c83b58a7a133f47
naratipud/ionic-ts-sample,naratipud/ionic-ts-sample,naratipud/ionic-ts-sample
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction PromiseWrap() {}\n\nmodule.exports = function patchPromise() {\n const hooks = this._hooks;\n const state = this._state;\n\n const Promise = global.Promise;\n const oldThen = Promise.prototype.then;\n Prom...
javascript
edit
0
2
mit
89ad381b6aa24b12ab02c3de9a049806bd1bd20a
AndreasMadsen/async-hook
patches/promise.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport Resolver from './resolver';\nimport loadInitializers from 'ember-load-initializers';\nimport config from './config/environment';\n\nlet App;\n\nEmber.MODEL_FACTORY_INJECTIONS = true;\n\nApp = Ember.App...
javascript
edit
0
0
mit
d2d24f2c3a0daf1db0bc75f598fce9e17d87e675
OCTRI/ember-i18next,OCTRI/ember-i18next
tests/dummy/app/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet isCI = !!process.env.CI;\nlet smokeTests = !!process.env.SMOKE_TESTS;\n\nlet config = {\n framework: 'qunit',\n test_page: smokeTests ? 'tests/index.html?smoke_tests=true' : 'tests/index.html?hidepassed',\n disab...
javascript
edit
0
0
mit
a08eccf9b84b5754f7cf09c06292a76ea3f1a6bb
glimmerjs/glimmer-vm,tildeio/glimmer,glimmerjs/glimmer-vm,tildeio/glimmer,tildeio/glimmer,glimmerjs/glimmer-vm
testem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst getTaggedTemplateLiteralContent = require('./tagged-template-literal').getTaggedTemplateLiteralContent\n\nconst getCSS = (node) => `\n.selector {\n ${getTaggedTemplateLiteralContent(node)}\n}\n`\n\nconst getKeyframes = (node) => ...
javascript
edit
0
1
mit
28141a5f615c5d11151e850beb7b6541045daeab
styled-components/stylelint-processor-styled-components
src/utils/general.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n SESSION_TOKEN_KEY: 'SESSION_TOKEN_KEY',\n backend: {\n hapiRemote: true,\n hapiLocal: false,\n parseRemote: false,\n parseLocal: false\n },\n HAPI: {\n local: {\n url: 'http://localhost:5000'...
javascript
edit
0
0
mit
92510dc784b2ee72684b33668614d43e278542f5
mkurutin/snowflake,mkurutin/snowflake,mkurutin/snowflake,mkurutin/snowflake
src/lib/config.example.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * stylus-initial\n * Copyright (c) 2014 Pierre-Antoine \"Leny\" Delnatte <<EMAIL>>\n * (Un)Licensed\n */\n\n\"use strict\";\n\nvar utils = require( \"stylus\" ).utils,\n rInitial = /([a-z\\-]+)\\s*:\\s*(initial);/gi,\n oInit...
javascript
edit
0
6
unlicense
6c66286a761072fd7b69aabd85a7d75a93b7c80c
leny/stylus-initial
lib/initial.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule(\"About Numbers (topics/about_numbers.js)\");\n\ntest(\"types\", function() {\n var typeOfIntegers = typeof(6);\n var typeOfFloats = typeof(3.14159);\n equal(__, typeOfIntegers === typeOfFloats, 'are ints and floats th...
javascript
edit
0
1
mit
96a7e42c5ee0226dee571e9aa0ef9774d2eb4c77
supportbeam/javascript_koans,supportbeam/javascript_koans
topics/about_numbers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Rollup plugins.\nimport babel from 'rollup-plugin-babel'\nimport cjs from 'rollup-plugin-commonjs'\nimport globals from 'rollup-plugin-node-globals'\nimport replace from 'rollup-plugin-replace'\nimport resolve from 'rollup-plugin-nod...
javascript
edit
0
0
mit
93c7fafada259af365e9f98a2d9a139f528052ae
yamafaktory/babel-react-rollup-starter,yamafaktory/babel-react-rollup-starter
config/dev.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* App Module */\n\nangular.module('nestorshop', ['nestorshopServices']).\n config(['$routeProvider', function($routeProvider) {\n $routeProvider.\n when('/products', {templateUrl: 'partials/product-list.html', ...
javascript
edit
0
3
apache-2.0
56f1f0c255d80f21d55828ba0c7d40bdeb62431b
nestorpina/nestor-shop,IGZnestorpina/nestor-shop,nestorpina/nestor-shop,IGZnestorpina/nestor-shop,nestorpina/nestor-shop,IGZnestorpina/nestor-shop
src/main/webapp/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2019 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// https://...
javascript
edit
0
1
apache-2.0
ed1ef7efea65c12f77551044f11feab4f4aeb291
googleinterns/step132-2020,googleinterns/step132-2020,googleinterns/step132-2020
src/main/webapp/search.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport hoist from 'hoist-non-react-statics'\n\nimport ErrorPage from '../../pages/_error'\n\nexport default Page => {\n const Extended = hoist(class extends React.Component...
javascript
edit
0
5
mit
a65fae011bce4e2ca9a920b51a0fc681ee21c178
sgmap/inspire,sgmap/inspire
components/hoc/with-errors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst { addOauthHeader } = require('@clevercloud/client/cjs/oauth.node.js');\nconst { prefixUrl } = require('@clevercloud/client/cjs/prefix-url.js');\nconst { request } = require('@clevercloud/client/cjs/request.request...
javascript
edit
0
1
apache-2.0
29211d88af3f1820293637f23680a4f24656c32e
CleverCloud/clever-tools,CleverCloud/clever-tools,CleverCloud/clever-tools
src/models/send-to-api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction checkWindowSize(){\n var w = document.documentElement.clientWidth;\n var panel = document.getElementById(\"help-panel\");\n if (w < 978) {\n panel.style.position = \"static\";\n panel.style.width = \"auto...
javascript
edit
0
5
mit
106c51e36add35f2b98bcf940c98363e707d2acb
ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage,ProjectSidewalk/SidewalkWebpage
public/javascripts/labelingGuidePanelResize.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst idea = (state = [], action) => {\n switch (action.type) {\n case \"SET_IDEAS\":\n return action.ideas\n case \"ADD_IDEA\":\n return [...state, action.idea]\n case \"UPDATE_IDEA\":\n return state.map(idea =...
javascript
edit
0
6
mit
f95b32c8678ca2814dca9b502a7bb592fb287c24
stride-nyc/remote_retro,samdec11/remote_retro,stride-nyc/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro,tnewell5/remote_retro
web/static/js/reducers/idea.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// # Sandstorm API\n// RESTful API for the Sandstorm resource\nvar capnp = require('capnp'),\n url = require('url'),\n sandstorm;\n\nvar HackSession = capnp.importSystem(\"hack-session.capnp\");\n\nvar publicId...
javascript
edit
0
2
mit
d6a80dc1d374a88d771c3bd7aad0cad91c67bd03
jparyani/GhostSS,jparyani/GhostSS,jparyani/GhostSS
core/server/api/sandstorm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Config object to be passed to Msal on creation\nconst msalConfig = {\n auth: {\n clientId: \"e760cab2-b9a1-4c0d-86fb-ff7084abd902\",\n authority: \"https://fabrikamb2c.b2clogin.com/fabrikamb2c.onmicrosoft.com/b2c_1_s...
javascript
edit
0
1
mit
35ad895d4885e3caf9cc7c3073c78bd2c13ad32d
AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication...
samples/VanillaJSTestApp/app/b2c/authConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport request from 'request';\nimport { parseString } from 'xml2js';\n\nexport default function loadFromBGG(req) {\n return new Promise((resolve, reject) => {\n request({\n url: `http://www.boardgamegeek.com/xmlapi2/search?que...
javascript
edit
0
3
mit
34049a1d776a4bb7c9b397fee63da30faa2bc30b
fuczak/pipsy
api/actions/boardgames/loadFromBGG.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by rgwozdz on 8/15/15.\n */\n\nvar moduleUnderTest = require(\"../../app/common.js\")\nvar assert = require('chai').assert;\nvar equal = require('deep-equal');\n\ndescribe('common.js module', function() {\n describe('...
javascript
edit
0
1
apache-2.0
870c1e1c0b1fa98430331689da51fb15c563895a
Cadasta/cadasta-api,Cadasta/cadasta-api,Cadasta/cadasta-api
test/unitSpecs/commonSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * YUI Mocha\n * Copyright 2011 Yahoo! Inc.\n * Licensed under the BSD license.\n */\n\n/**\n * @module mime\n */\n\n/**\n * File extension to MIME type map.\n *\n * Used by `serve.js` when streaming files from disk.\n *\n * @prope...
javascript
edit
0
0
bsd-3-clause
980fc6cfc3702645eafd18dc46d9a399ca7fb3ad
reid/onyx,reid/onyx
lib/mime.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n/**\n * \n * @param {integer } digit \n * @returns {string} Returns Nepali converted string of given digit or numbers.\n * @example\n * \n * numbers(2090873)\n * // => २०९०८७३\n * \n * numbers()\n * // => false\n * \n */\...
javascript
edit
0
3
mit
1b3faf12cf97bc2a534c941a59ac026ab49e0565
shekhardesigner/NepaliDateConverter
src/numbers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global $ */\n/* global GOVUK */\n\n// Warn about using the kit in production\nif (\n window.sessionStorage && window.sessionStorage.getItem('prototypeWarning') !== 'false' &&\n window.console && window.console.info\n) {\n window.c...
javascript
edit
0
1
mit
109da2da9a35318d59060400833d4378c7622b6f
dwpdigitaltech/hrt-prototype,gavinwye/govuk_prototype_kit,dwpdigitaltech/hrt-prototype,joelanman/govuk_prototype_kit,benjeffreys/hmcts-idam-proto,joelanman/govuk_prototype_kit,benjeffreys/hmcts-idam-proto,alphagov/govuk_prototype_kit,alphagov/govuk_prototype_kit,hannalaakso/accessible-timeout-warning,joelanman/govuk_pr...
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nmodule.exports = function(grunt) {\n var module = {};\n\n module.domain = function() {\n return process.env.GRUNT_DRUPAL_DOMAIN || grunt.config('config.domain') || require('os').hostname();\n };\n\n ...
javascript
edit
0
3
mit
3d782cc9f93ae645ef9eb4f8fafbf57117aa111c
AndBicScadMedia/grunt-drupal-tasks,EvanLovely/grunt-drupal-tasks,phase2/grunt-drupal-tasks,EvanLovely/grunt-drupal-tasks,AndBicScadMedia/grunt-drupal-tasks,phase2/grunt-drupal-tasks,EvanLovely/grunt-drupal-tasks,phase2/grunt-drupal-tasks,AndBicScadMedia/grunt-drupal-tasks,AndBicScadMedia/grunt-drupal-tasks,EvanLovely/g...
lib/init.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Retrieve a localized configuration value or the default if the localization\n * is unavailable.\n * \n * @param {String} configuration value\n * @param {String} language\n * @param {Object} Hexo configuration ob...
javascript
edit
0
5
mit
452ff1c3ce7ae04695f640b8b4e642f724d6be55
ahaasler/hexo-multilingual
lib/util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nheader.$inject = ['$rootScope', '$state', 'AuthService'];\nfunction header($rootScope, $state, AuthService) {\n return {\n name: 'header',\n template: require('./templates/header.html'),\n scope:...
javascript
edit
0
1
mit
3984d6e214a81837361a3a65a405b84344b54120
zdizzle6717/hapi-angular-stack,zdizzle6717/hapi-angular-stack
app/modules/main/directives/Header.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* task for generating html from sisdocs markdown */\nmodule.exports = function(grunt) {\n 'use strict';\n var marked = require('marked');\n var hljs = require('highlight.js');\n marked.setOptions({\n breaks : true,\n...
javascript
edit
0
3
bsd-3-clause
1ef82c281c5df2ded7dd4f1954fc0beb34e53899
sis-cmdb/sis-ui,sis-cmdb/sis-ui
tasks/sismd.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { select } from 'd3';\nimport Item from './item';\n\nexport default class ButtonItem extends Item {\n constructor() {\n super();\n\n this._root\n .classed('button', true)\n .styles({\n 'background': '#FFF'...
javascript
edit
0
3
mit
cbec8ddeaa98e7510e2616f18f64df8340dd97e0
scola84/node-d3-list
src/item-button.js
rejected_duplicate
Near-duplicate of sample 101733
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n \"id\": 101,\n \"email\": \"<EMAIL>\",\n \"admin\": false,\n \"full_name\": \"Teacher, Hugo\",\n \"staff_type\": null,\n \"schoolwide_access\": false,\n \"grade_level_access\": [],\n \"restricted_to_sped_stude...
javascript
edit
0
0
mit
ad25532c3601d23df11a23b8295cfc753a79e2ec
studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights
spec/javascripts/fixtures/educatorsViewJson.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Fetch module.\n * @module base/utils/fetch\n */\n\nimport fetchJsonP from 'fetch-jsonp'\n\nexport var defaultOptions = {\n credentials: 'same-origin'\n}\n\nexport var defaultJsonpOptions = {\n timeout: 5000,\n jsonpCallback: ...
javascript
edit
0
3
mit
22098b256358982f8a845b05242465db33edd008
Goldinteractive/js-base,Goldinteractive/js-base
src/utils/fetch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.admin = {};\n\n$(document).ready(function() {\n\t$(\"#admin-feedback\").on(\"tabOpened\", function() {\n\t\twindow.api.get(\"admin/feedback/getList\", function(resp) {\n\t\t\t$(\"#admin-feedback-list\").text(\"\");\n\t\t\tfor (va...
javascript
edit
0
5
mit
e0b595bb8e631c29add7d486db9dc84285bab3f3
MyHomeworkSpace/MyHomeworkSpace,PlanHubMe/PlanHub,MyHomeworkSpace/MyHomeworkSpace,PlanHubMe/PlanHub,MyHomeworkSpace/MyHomeworkSpace
public/js/admin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar Formatter = require(\"../formatter\");\nvar client = require('../http_client');\n\nprocess.stdin.resume();\nprocess.stdin.setEncoding(\"utf8\");\n\nvar input = \"\";\n\nprocess.stdin.on(\"data\", funct...
javascript
edit
0
3
mit
2e0235e8495dd47dcbf15fd2bd6e012d5d615054
kyroskoh/javascript-test-reporter,therebelbeta/javascript-test-reporter,codeclimate/javascript-test-reporter,buildkite/javascript-test-reporter
bin/codeclimate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar events = require('events');\nvar util = require('util');\n\nmodule.exports = Job;\n\nfunction Job(collection, data) {\n this.collection = collection;\n if(data){\n data.__proto__ = JobData.prototype; //Convert plain obj...
javascript
edit
0
4
mit
36dfe83249242444a747a2c97c1febce3b0c173b
trsouz/monq,dhritzkiv/monq,dioscouri/nodejs-monq,arifsetiawan/monq,saintedlama/monq,Santinell/monq,deployable/monq,scttnlsn/monq
lib/job.js
accepted
null
true