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\nmodule.exports = {\n HOST: process.env.HOST || null,\n PORT: process.env.PORT || 5000,\n DEFAULT_SHOT_WIDTH: process.env.DEFAULT_SHOT_WIDTH || 768,\n DEFAULT_SHOT_MIN_HEIGHT: process.env.DEFAULT_SHOT_MIN_HEIGHT || 700,\n WEBSHOTS_Q...
javascript
edit
0
0
mit
9a2cc7d6763f822cc86deae5a28395e9e9b35546
joeyespo/iwidgets.aggrenda.com
settings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar p5 = require('p5');\n\nvar sketch = function (p) {\n\n var Receiver = require('./Receiver.js');\n var receiver = new Receiver();\n\n var Processor = require('./Processor.js');\n var processor = new Processor();\n\n var DrawingM...
javascript
edit
0
1
mit
ff5365a0f50527aa6e73b3c0874977d677b5a0eb
Dermah/pulsar,Dermah/pulsar
pulsar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst EventEmitter = require('events');\n\n// wrapper around the Node.js ws module\n// for use in browsers\nclass WebSocketWrapper extends EventEmitter {\n constructor(url) {\n super();\n this._ws = new WebSocket(url);\...
javascript
edit
0
2
mit
3d9ef5c648f8ee9d10ea2221d4b86101264cac50
cyrus-and/chrome-remote-interface,cyrus-and/chrome-remote-interface
lib/websocket-wrapper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nL.Control.Attribution.prototype.options.prefix = '';\nvar map = L.map('map', {minZoom: 14}).setView([38.9, -76.99], 13);\nvar attr = '&copy; <a href=\"http://osm.org/copyright\">OpenStreetMap</a> contributors (this is <a href=\"http://g...
javascript
edit
0
0
bsd-3-clause
d810081c17d8eb3adcfce7621a014d7aed51a9af
osmlab/osm-gpx-tile,osmlab/osm-gpx-tile
site.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar canvas = document.getElementById('game');\nvar context = canvas.getContext('2d');\n\nvar Ball = function(x, y, radius, context) {\n this.x = x;\n this.y = y;\n this.radius = radius || 10;\n this.startAngle = 0;\n this.endAngle ...
javascript
edit
0
3
mit
123177c3f7f70b1c8a6dce1b852545892a41df8c
brennanholtzclaw/game_time,brennanholtzclaw/game_time
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\nvar PayInPaymentDetails = require('./PayInPaymentDetails');\n\nvar PayInPaymentDetailsCard = PayInPaymentDetails.extend({\n defaults: {\n /**\n * CardType { CB_VISA_MASTERCARD, AMEX }\n...
javascript
edit
0
0
mit
54f5f70204b4dd26613f8f9a36757d5c3dc38474
Mangopay/mangopay2-nodejs-sdk,Mangopay/mangopay2-nodejs-sdk
lib/models/PayInPaymentDetailsCard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { map } from 'lodash';\n\nclass DropdownFilter extends React.Component {\n constructor() {\n super();\n\n this.change = this.change.bind(this);\n }\n\n componentDidMount() {\n const type = ...
javascript
edit
0
1
mit
3474af3e09940dd7a9e25f308bf4e3467ab4159c
DoSomething/rogue,DoSomething/rogue,DoSomething/rogue
resources/assets/components/DropdownFilter/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n $('#btn-add-gadget').click(function () {\n var elem = $(this);\n asset.process(elem.data('type'), elem.data('aid'), location.href, elem);\n });\n\n $('#btn-remove-subscribe').click(function () {\...
javascript
edit
0
3
apache-2.0
7e1b3afc32af4e72fa2c6feb043d36f395cfa5c4
prasa7/carbon-store,Rajith90/carbon-store,Rajith90/carbon-store,jeradrutnam/carbon-store,splinter/carbon-store,cnapagoda/carbon-store,thushara35/carbon-store,Rajith90/carbon-store,jeradrutnam/carbon-store,madawas/carbon-store,splinter/carbon-store,wso2/carbon-store,madawas/carbon-store,wso2/carbon-store,wso2/carbon-sto...
apps/store/themes/store/js/asset.js
rejected_duplicate
Near-duplicate of sample 104699
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nfunction resolveHttpError(response, message) {\n if (response.statusCode < 400) {\n return;\n }\n\n message = message\n ? message + \" \"\n : \"\";\n\n message += \"Status code \" + re...
javascript
edit
0
3
mit
ffa4315f48f5c5eed70d215000afdf794c6014cd
itsananderson/kudu-api,itsananderson/kudu-api
lib/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global require, module */\n\nvar EmberApp = require('ember-cli/lib/broccoli/ember-app');\n\nvar app = new EmberApp({\n dotEnv: {\n clientAllowedKeys: ['CDN_HOST']\n },\n fingerprint: {\n prepend: 'drwikejswixhx.cloudfront.ne...
javascript
edit
0
0
mit
f57d452412b70a051f2c183b7aa4a6688fc683bc
bus-detective/web-client,bus-detective/web-client
Brocfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * grunt-browser-extension\n * https://github.com/addmitriev/grunt-browser-extension\n *\n * Copyright (c) 2015 Aleksey Dmitriev\n * Licensed under the MIT license.\n */\n'use strict';\n\nvar util = require('util');\nvar path = requ...
javascript
edit
0
5
mit
c918f8c8de92f663b3407aa7f70a902cc15419c6
Tuguusl/grunt-browser-extension,Tuguusl/grunt-browser-extension
tasks/browser_extension.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n session: Ember.inject.service(),\n\n model(params) {\n let projectId = this.modelFor('project').id;\n let queryParams = {\n projectId: projectId,\n nu...
javascript
edit
0
2
mit
836c37f9975c3dc41db447d7a73e8c4c888574c4
eablack/code-corps-ember,jderr-mx/code-corps-ember,code-corps/code-corps-ember,jderr-mx/code-corps-ember,code-corps/code-corps-ember,eablack/code-corps-ember
app/routes/project/posts/post.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n(() => {\n const electron = require('electron');\n const app = electron.app;\n const BrowserWindow = electron.BrowserWindow;\n let win = null;\n\n app.on('window-all-closed', () => {\n if (process.platform !== '...
javascript
edit
0
2
mit
1d629a166c2005cc7a06708e123c652520bcd8ed
emsk/redmine-now,emsk/redmine-now,emsk/redmine-now
app/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * cbpAnimatedHeader.js v1.0.0\n * http://www.codrops.com\n *\n * Licensed under the MIT license.\n * http://www.opensource.org/licenses/mit-license.php\n * \n * Copyright 2013, Codrops\n * http://www.codrops.com\n */\nvar cbpAnima...
javascript
edit
0
2
mit
dac26ebe783468a1ce6e9d44cbab5a9ff1ae3262
kossgreim/ysa-activity,kossgreim/ysa-activity
app/assets/javascripts/theme/cbpAnimatedHeader.js
rejected_duplicate
Near-duplicate of sample 96865
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport documentFormatter from 'src/logic/documentPackager/documentFormatter';\nimport base64OfSimplePdf from './reference/base64OfSimplePdf';\n\ndescribe('DocumentFormatter', () => {\n it('should returns the same data for \\'html viewM...
javascript
edit
0
2
mit
951de450da79c33bc1134e851d7a422ce5a78d15
nus-mtp/sashimi-note,nus-mtp/sashimi-note,nus-mtp/sashimi-note
sashimi-webapp/test/unit/specs/logic/formatter/documentFormatter.spec.js
rejected_duplicate
Near-duplicate of sample 71768
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar\n fs = require('fs'),\n mkdirp = require('mkdirp'),\n Builder = require('component-builder'),\n config = require('../config'),\n installDir = config.componentInstallDir,\n utils = require('./utils'),\n ...
javascript
edit
0
4
mit
e33324c93f33d8060903bb04dc7c422a43278842
web-audio-components/web-audio-components-service
lib/componentHelper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Google's Material Design based Bootstrap 3 theme.\",\n version: \"0.1.0\",\n // git: \"https://github.com/FezVrasta/bootstrap-material-design.git\"\n});\n\nPackage.onUse(function(api) {\n api.versions...
javascript
edit
0
1
mit
f33326c73dd0b938bd0ac2475f9245e24aec3411
html5cat/bootstrap-material-design
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst timestampMixin = require('loopback-ds-timestamp-mixin/time-stamp');\nconst shortid = require('shortid');\n\nmodule.exports = function (SecMembership) {\n\ttimestampMixin(SecMembership);\n\n\tSecMembership.defini...
javascript
edit
0
1
mit
cb53120e408cb76bd991a0c4c12f4e5228a05fdc
taoyuan/nsec
common/models/sec-membership.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fs from 'fs';\nimport path from 'path';\n\nfunction findRecursive(directory) {\n if (directory === '/') {\n throw new Error('No project root found, looking for a directory with a package.json file.');\n }\n\n const pathToPa...
javascript
edit
0
3
mit
5edb856e5b0d624d794cefee42a1e7d385610e14
trotzig/import-js,trotzig/import-js,trotzig/import-js,Galooshi/import-js
lib/findProjectRoot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst path = require('path');\nconst crypto = require('crypto');\nconst {\n checkAndMakeDir,\n getTempFilename\n} = require('./utilities');\n\nmodule.exports = function(options, fieldname, filename) {\n con...
javascript
edit
0
2
mit
f0cdce0bf9bbb2e0b9f68cb521bd91de33ec8985
richardgirges/express-fileupload,richardgirges/express-fileupload
lib/tempFileHandler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global jQuery */\njQuery(function ($){\n 'use strict';\n\n var $limitedTextAreas = $('textarea[data-limit]');\n if( $limitedTextAreas.length > 0 ){\n $limitedTextAreas.each(function (i, o){\n var updateCounter = function (...
javascript
edit
0
2
mit
1479e514d857ca8dab0bccbe0ef52999e397a330
ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder
app/assets/javascripts/modules/moj.wordcount.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'klaussner:svelte',\n version: '0.0.1',\n summary: 'Use the magical disappearing UI framework in Meteor',\n git: 'https://github.com/klaussner/svelte'\n});\n\nPackage.registerBuildPlugin({\n name: 'svelte...
javascript
edit
0
1
mit
6fc3bd8206268bf97a078c127d3dad053ea775ff
meteor-svelte/meteor-svelte
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require solidus_admin/Sortable\n\nSpree.ready(function() {\n var sortable_tables = document.querySelectorAll('table.sortable');\n\n _.each(sortable_tables, function(table) {\n var url = table.getAttribute('data-sortable-link');...
javascript
edit
0
2
bsd-3-clause
7de83d749393913835cc6b537bf44596771f3bb6
pervino/solidus,pervino/solidus,pervino/solidus,pervino/solidus
backend/app/assets/javascripts/spree/backend/components/sortable_table.js
rejected_duplicate
Near-duplicate of sample 74008
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyons-text-decoration/package.json')\nvar moduleCss =...
javascript
edit
0
0
mit
853be53e6c0524f5d2130ef2ec50f893894aa3ad
matyikriszta/moonlit-landing-page,topherauyeung/portfolio,topherauyeung/portfolio,pietgeursen/pietgeursen.github.io,topherauyeung/portfolio,cwonrails/tachyons,getfrank/tachyons,fenderdigital/css-utilities,fenderdigital/css-utilities,tachyons-css/tachyons
lib/text-decoration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Em from 'ember';\nimport { ArrayController } from 'ember-legacy-controllers';\nconst get = Em.get;\nconst copy = Em.copy;\n\nconst ArrayPauser = ArrayController.extend({\n\tisPaused: false,\n\n\tbuffer: Em.computed(function () {\...
javascript
edit
0
2
mit
034b008f8dfd297b6d5a7ccc64839647e0caa29e
j-/ember-cli-array-pauser,j-/ember-cli-array-pauser
addon/array-pauser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n PSPDFKit\n\n Copyright (c) 2015-2016 PSPDFKit GmbH. All rights reserved.\n\n THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW\n AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND...
javascript
edit
0
1
mit
ddd91b0e388fc87f732a94a9bd7a5aa084f4c86d
PSPDFKit/Cordova-Android,PSPDFKit/Cordova-Android
tests/tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require jquery\n//= require jquery_ujs\n//= require twitter/bootstrap\n//= require jquery-ui-bootstrap\n//= require jquery.tokeninput\n//= require_tree .\n```\n\nApply this change: Load jquery before twitter bootstrap." }, { ...
javascript
edit
0
0
mit
e404e0799273c743bf671997bf525e67239abb7e
volontariat/voluntary,jasnow/voluntary,jasnow/voluntary,jasnow/voluntary,volontariat/voluntary,volontariat/voluntary,jasnow/voluntary,volontariat/voluntary
app/assets/javascripts/voluntary/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require('http');\nvar express = require('express');\n\nvar app = express();\napp.set('view engine', 'ejs');\n\n// Setup the index page view\napp.get('/', function(req, res) {\n\tres.render('pages/index');\n});\n\napp.listen(8...
javascript
edit
0
3
mit
e0c9aa962132838ef04566fa5ab3f61862e6cea0
jamestaylr/portfolio-website,jamestaylr/portfolio-website
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('mean.icu.ui.profile', [])\n.controller('ProfileController', function($scope, $state, me, UsersService) {\n $scope.me = me;\n $scope.avatar = $scope.me.profile.avatar || 'http://placehold.it/250x250...
javascript
edit
0
3
mit
7842bc06a6a2199566cc43bc70c377e987ed77cc
hamdiceylan/icu,linnovate/icu,linnovate/icu,linnovate/icu,hamdiceylan/icu
packages/custom/icu/public/components/profile-page/profile-page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst express = require('express'),\n sassMiddleware = require('node-sass-middleware'),\n webpack = require('webpack'),\n webpackMiddleware = require('webpack-dev-middleware'),\n path = require('path...
javascript
edit
0
1
mit
9975e1d92da690ced12402cb51ed04f4cad2d54e
AusDTO/citizenship-appointment-client,AusDTO/citizenship-appointment-client,AusDTO/citizenship-appointment-client
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n test_page: 'tests/index.html?hidepassed',\n disable_watching: true,\n launch_in_ci: [\n 'Chrome'\n ],\n launch_in_dev: [\n 'Chrome'\n ],\n browser_args: {\n Chrome: {\n ci: [\n // --no-sa...
javascript
edit
0
0
mit
3b3468f805111db784bd4282417aa2860f999832
ef4/ember-data-relationship-tracker,ef4/ember-data-relationship-tracker
testem.js
rejected_duplicate
Near-duplicate of sample 71784
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable */\n\nmodule.exports = {\n \"framework\": \"qunit\",\n \"test_page\": \"tests/index.html?hidepassed\",\n \"disable_watching\": true,\n \"launch_in_ci\": [\n \"Chrome\"\n ],\n \"launch_in_dev\": [\n \"Chrome...
javascript
edit
0
0
mit
78de692471579b9722f066d469ad87f910ab1da4
ember-cli/ember-ajax,ember-cli/ember-ajax,ember-cli/ember-ajax
testem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express'),\n OpenedCaptions = require('opened-captions');\n\n// Make the server\nvar app = express();\nvar server = require('http').Server(app);\nvar io = require('socket.io')(server);\n\n// Serve static content ...
javascript
edit
0
0
mit
5edecd0734bf8cebc0ca81ef7b0bd660edc40b27
slifty/opened-captions-example,slifty/opened-captions-example
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// We load the Safari fix before document-register-element because DRE\n// overrides attachShadow() and calls back the one it finds on HTMLElement.\nimport './fix/safari';\nimport 'document-register-element';\nimport '@webcomponents/sha...
javascript
edit
0
0
mit
afeb6bed38bc1c31b1f95914056b972efb3ec56f
skatejs/web-components
src/index.js
rejected_duplicate
Near-duplicate of sample 70500
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar TaskTableHeaderLabels = {\n cpus: 'CPU',\n disk: 'DISK',\n host: 'HOST',\n mem: 'MEM',\n id: 'TASK NAME',\n name: 'TASK NAME',\n status: 'STATUS',\n updated: 'UPDATED',\n version: 'VERSION'\n};\n\nmodule.exports = TaskTable...
javascript
edit
0
0
apache-2.0
f394e601e69aef805f95a3d55faa2d7755dcfb39
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
src/js/constants/TaskTableHeaderLabels.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {inspect} from \"util\";\nimport {getProperties, isImmutable, isNumeric} from \"./helpers\";\n\n// LENS ============================================================================================\nfunction createGetter(key) {\n ...
javascript
edit
0
9
mit
2977c20bac8717b39a325436d7381ca9d5a37b00
Paqmind/tcomb-lens,Paqmind/tcomb-lens
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport ProjectedLayer from './projected-layer';\nimport {\n anchors,\n OverlayPropTypes,\n} from './util/overlays';\n\nconst defaultClassName = ['mapboxgl-popup'];\n\nexport default class Pop...
javascript
edit
0
1
mit
9921ad5b87592655d4bca449924ff7cd2a2ecacb
lamuertepeluda/react-mapbox-gl,alex3165/react-mapbox-gl,lamuertepeluda/react-mapbox-gl,alex3165/react-mapbox-gl,alex3165/react-mapbox-gl,alex3165/react-mapbox-gl,lamuertepeluda/react-mapbox-gl,lamuertepeluda/react-mapbox-gl
src/popup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport chain from './chain';\nimport {clone} from './utils';\n\nfunction vq(el, props, opts = null) {\n if (!el || !props) throw new Error('Must have two or three args');\n\n if (!opts) {\n if (!('p' in props && 'o' in props)) {\n ...
javascript
edit
0
7
mit
2b486327b43390946af416759a05213f19a4a912
ktsn/vq
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport thunk from 'redux-thunk';\nimport { Provider } from 'react-redux';\nimport { createStore, applyMiddleware, compose } from 'redux';\n\nimport Main from './components/M...
javascript
edit
0
1
mit
31e72bfcc30fa13863bc67640ee3b88a3abbb4a1
bjacobel/rak,bjacobel/rak,bjacobel/react-redux-boilerplate,bjacobel/react-redux-boilerplate,bjacobel/rak
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport thunk from 'redux-thunk'\nimport createLogger from 'redux-logger'\nimport { browserHistory } from 'react-router'\nimport { syncHistory } from 'react-router-redux'\nimport { combineReducers, compose, createStore, applyMiddleware }...
javascript
edit
0
1
mit
f7c78f2e63d3247479e91087ec31c5eb9033af34
ello/webapp,ello/webapp,ello/webapp
src/store.js
rejected_duplicate
Near-duplicate of sample 83870
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n\n\trenderTemplate() {\n\t\tthis.render( 'admin', {\n\t\t\tcontroller: 'dashboard'\n\t\t});\n\t}\n\n});\n\n```\n\nApply this change: Remove \"login\" class after transit...
javascript
edit
0
1
mit
a8321824ba18e1655167b216d3c03748673cb1e9
kunni80/server,muffin/server
app/routes/dashboard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable no-console, no-duplicate-imports, import/no-duplicates */\nimport proxyquire from 'proxyquire';\nimport describe from '../src';\nimport { specStream } from '../src';\n\ndescribe('RxT', (it) => {\n it('should run a s...
javascript
edit
0
1
mit
a7c21fc87578062b393e897f3b3ca5ff4c8be542
RayBenefield/RxT
test/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// Provides the global arethusaUtil object which comes with several\n// utility functions\n\nwindow.arethusaUtil = {\n // Pads a number with zeros\n formatNumber: function(number, length) {\n // coerce a fixnum t...
javascript
edit
0
2
mit
2f2435b59601f79388e664e918f54dc25cfe4177
latin-language-toolkit/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa
app/js/arethusa_util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar gulpB = require('../');\nvar expect = require('chai').expect;\nvar es = require('event-stream');\nvar path = require('path');\nvar browserify = require('browserify');\n\ndescribe('gulp-browserify', funct...
javascript
edit
0
1
mit
d381deebcb82dcbc13000d0bc4819a003385b77f
deepak1556/gulp-browserify
test/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst updateStructure = newState => {\n return { type: 'UPDATE_VERT_STRUCTURE', newState };\n};\n\nconst highlightNode = (delay, unHighlight, nodeId) => {\n setTimeout(() => unHighlight(nodeId), delay / 1.1);\n return { type: 'HIGHLI...
javascript
edit
0
1
mit
1d86fb05c2a3b347cd93bd4b97e2eafeb8177c31
ivtpz/brancher,ivtpz/brancher
app/actions/verticalTreeActions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from '../templates/components/karbon-sortable-item';\n\nexport default Ember.Component.extend({\n tagName: 'li',\n classNames: ['spacer'],\n classNameBindings: ['handleClass', 'isSection:sect...
javascript
edit
0
1
mit
d2cc1cf05bda3e9e90520dfa9a53818d509852b5
PracticeIQ/karbon-sortable,PracticeIQ/karbon-sortable
addon/components/karbon-sortable-item.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar flatiron = require('flatiron'),\n app = flatiron.app;\n\n\napp.use(flatiron.plugins.http, {\n // HTTP options\n});\n\nvar text_index = fs.readFileSync('index.html');\nvar buff_index = new Buffer(text_index...
javascript
edit
0
1
mit
11a04087e5f95d5fc88fb3a1a4a9724ab777e01d
jmartenstein/bitcoinshirt
routing.js
rejected_duplicate
Near-duplicate of sample 67662
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// web.js\nvar express = require(\"express\");\nvar logfmt = require(\"logfmt\");\nvar app = express();\n\napp.use(logfmt.requestLogger());\n\napp.get('/', function(req, res) {\n res.send('Hello World!');\n});\n\nvar port = Number(proc...
javascript
edit
0
1
mit
7c533789deeadc740dd961caa60834231b26f26d
sharlwong/phuxuan
web.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n jasmine: {\n geojson_to_gmaps: {\n src: 'geojson-to-gmaps....
javascript
edit
0
1
mit
1b609f9fdf96ce497557cdda7a979587f360b8e0
MarkBennett/geojson_to_gmaps
Gruntfile.js
rejected_duplicate
Near-duplicate of sample 91972
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * * Created by PhpStorm.\n * User: Philipp Dippel Inf | DMS - M\n * For Project: headerXporter\n * Date: 29.08.17\n * Copyright: Philipp Dippel\n */\n\njQuery(document).ready(() => {\n\n function crazyshit()\n {\n co...
javascript
edit
0
2
mit
a6dec3496e752f76b76f1e572587a401d5f245a2
Pjirlip/X-Porter,Pjirlip/X-Porter
assets/js/hxp-import-functions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Em from 'ember';\nimport FormGroupComponent from './group';\nimport ControlMixin from 'ember-idx-forms/mixins/control';\n\n/*\nForm Input\n\nSyntax:\n{{em-input property=\"property name\"}}\n */\nexport default FormGroupComponent...
javascript
edit
0
2
apache-2.0
f08964092048b6d8f8b9643d1e6179e9cc2dcc6f
Szeliga/ember-forms,Szeliga/ember-forms
addon/input.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Module dependencies.\n */\nvar express = require('express'),\n Check = require('../../models/check')\n CheckEvent = require('../../models/checkEvent');\n\nvar app = module.exports = express.createServer();\n\n// mi...
javascript
edit
0
2
mit
ebd26bd534f59588839f5e7a783cd9dde7eaf091
fzaninotto/uptime,rkmallik/uptime-openshift,SaravananPerumal23/uptime2,ptisp/uptime,RafeHatfield/nodeuptime,sinkingshriek/uptime,cloudfoundry-community/uptime-cfready,b-pedzik/uptime,GuptaVineet-IBM/upTime_ford,ptisp/uptime,phanan/uptime,nacyot/uptime,nerevu/uptime,SufianHassan/uptime,SpringerPE/uptime,blendlabs/uptime...
app/api/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* $This file is distributed under the terms of the license in /doc/license.txt$ */\n\n(function($) {\n\n\t$(window).load(function(){\n\n\t\tvar jcrop_api = $.Jcrop('#cropbox',{\n\t\t\tonChange: showPreview,\n\t\t\tonSelect: showPreview...
javascript
edit
0
2
bsd-3-clause
717e09e2cdbcf1e9bb79925ed0964ac5bc5d5e7f
vivo-project/Vitro,vivo-project/Vitro,vivo-project/Vitro,vivo-project/Vitro
webapp/web/js/imageUpload/cropImage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst commonConfig = require(\"./webpack.common.config\");\nconst nodeExternals = require(\"webpack-node-externals\");\nconst merge = (...objs) => require(\"deepmerge\").all(objs, {arrayMerge: (arr1, arr2) => arr1.concat(arr2) });\n\nco...
javascript
edit
0
1
mit
bdfa853c6e4657c8afdab906bf50461a8e26a43b
aeinbu/webpack-npm-package-template,aeinbu/webpack-npm-package-template
webpack.build.config.js
rejected_duplicate
Near-duplicate of sample 104372
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * Small jQuery plugin to detect whether or not a form's values have been changed.\n * @see: https://gist.github.com/DrPheltRight/4131266\n * Written by Luke Morton, licensed under MIT. Adapted for Bolt by Bob.\n */\n(function ($) ...
javascript
edit
0
3
mit
ad6ca0bde17ece30283aad0438a697f07e817054
Intendit/bolt,nantunes/bolt,Raistlfiren/bolt,electrolinux/bolt,HonzaMikula/masivnipostele,GDmac/bolt,marcin-piela/bolt,Raistlfiren/bolt,cdowdy/bolt,joshuan/bolt,romulo1984/bolt,xeddmc/bolt,joshuan/bolt,Intendit/bolt,joshuan/bolt,electrolinux/bolt,HonzaMikula/masivnipostele,bywatersolutions/reports-site,CarsonF/bolt,rom...
app/view/lib/jquery-watchchanges/jquery-watchchanges.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar nouns = [\n 'cat',\n 'dog',\n 'mouse',\n 'house'\n];\nvar firstNoun = '';\nvar secondNoun = '';\nvar metaphor = '';\n\nvar numberOfNouns = nouns.length;\nvar lastNounIndex = nouns.length - 1;\nvar nounIndex1 = 0...
javascript
edit
0
1
mit
a13cba3494c5fa4ccb86df8ed8df3d80f646ce1b
epan/thisisathat
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @fileoverview Describes a password modal\n */\ndefine([\n 'text!templates/password.html',\n 'backbone',\n 'underscore'\n],\nfunction(passwordModalTemplate) {\n return Backbone.View.extend({\n events: {\n 'click .moda...
javascript
edit
0
1
mit
b55033b51cdfccdd72d32cd5922032f44b822998
jmcfarlane/Notable,jmcfarlane/Notable,jmcfarlane/Notable,jmcfarlane/Notable
notable/static/js/views/password.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ntableBuilder.$inject = [ 'tableContent' ];\n\nfunction tableBuilder (tableContent) {\n\tconst service = {\n\t\tnewTable: newTable,\n append: append,\n indexOf: indexOf,\n remove: remove\n\t};\n\n\tfunction newTable ...
javascript
edit
0
2
mit
b8e447746418ab5b38b76efb25cc25d2f1218db2
Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Vinculacion-Front-End,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC,Tribu-Anal/Manejo-Horas-de-Vinculacion-UNITEC
dev/app/services/TbTable/TableBuilder/table-builder.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nJOB_TYPES = [\"Full Time\", \"Hourly Contract\", \"Term Contract\", \"Mentoring\", \"Bounty\", \"Open Source\", \"Volunteer\", \"Other\"];\n\nSUMMERNOTE_OPTIONS = {\n type: 'summernote',\n height: 300,\n minHeight: 300,\n toolbar: [...
javascript
edit
0
0
mit
4d324dd4ca907d6943d3e523db11bf5d0b12abeb
nate-strauser/wework,nate-strauser/wework
both/lib/constants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\t$(\"#web-debug-toolbar .hidden-panel\").hide();\n\n\t$(\"#web-debug-toolbar .panel-toggle-button\").hover(function() {\n\t\tif ($(\"#web-debug-toolbar #\" + this.rel).is(\":hidden\"))\n\t\t\t$(\"#web-de...
javascript
edit
0
2
mit
31d246013ae1647130f7edb927b429ef1af472c0
ludovic-henry/web-debug-toolbar,ludovic-henry/web-debug-toolbar
lib/web-debug-toolbar/assets/web-debug-toolbar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n#\n# i2mx.js - v0.1-Alpha\n# Apache v2 License\n#\n*/\n\n// Create img2musicXML (abbreviated as i2mx) namespace\nvar i2mx = i2mx || { };\n\n// Create JsCheckup class (@TODO: Move to inside namespace)\nvar JsCheckup = function() {\n\...
javascript
edit
0
5
apache-2.0
3029e0bcb2a35cfaec624a377ad16445de1559d2
feikname/img2musicXML,feikname/img2musicXML
i2mx.js
rejected_duplicate
Near-duplicate of sample 71542
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n\n function b64EncodeUnicode(str) {\n return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,\n function toSolidBytes(match, p1) {\n return String.fromCharCode('0x' + p1);\n }));\n }\n\...
javascript
edit
0
3
mit
bba9d73913ecc2aac9b86368606617893f95132b
uploadcare/migro,uploadcare/migro
migro/filestack/dev_console.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport L from 'leaflet'\nimport {} from 'mapbox-gl-leaflet'\nimport {GridLayer, withLeaflet} from 'react-leaflet'\n\nconst accessToken = process.env.MAPBOX_ACCESS_TOKEN\nconst attribution = `© <a href='https://www.mapbox.com/about/maps/...
javascript
edit
0
3
mit
b2719123d67f75bc637bf282c53c1b71c56bbf92
conveyal/analysis-ui,conveyal/analysis-ui,conveyal/analysis-ui
lib/components/map/mapbox-gl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Application = require(\"substance-application\");\nvar Component = Application.Component;\nvar $$ = React.createElement;\nvar _ = require(\"underscore\");\n\n// TagSubjectTool\n// ----------------\n\nvar TagSubjectTool = React.creat...
javascript
edit
0
1
mit
dde56b09bc441f5628b541a76c7bc2486b980c4c
substance/archivist-composer,substance/archivist-composer
src/extensions/subjects/tag_subject_tool.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { withRouter } from 'react-router';\nimport { showModalWindow } from 'actions/ModalActions';\nimport CheckAuth from 'components/CheckAuth';\n\nconst RestrictedWr...
javascript
edit
0
4
apache-2.0
f41f91915dd312173e2c84567cf5977397aa0b19
iris-dni/iris-frontend,iris-dni/iris-frontend,iris-dni/iris-frontend
src/containers/Restricted.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * decaffeinate suggestions:\n * DS101: Remove unnecessary use of Array.from\n * DS102: Remove unnecessary code created because of implicit returns\n * DS205: Consider reworking code to avoid use of IIFEs\n * DS207: Consider shorter...
javascript
edit
0
5
mit
5c07f22de61a6e96699819b45d4682297c66f0b2
patsissons/hubot-giphy
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * convert json dates to date objects\n * for all requests using the $http service\n *\n * @return callback for app.config()\n */\ndefine([], function () {\n\t'use strict';\n\n\n var regexIso8601 = /^(\\d{4}|\\+\\d{6})(?:-(\\d{2...
javascript
edit
0
14
mit
a65add662ca18941d6e38ca80f0d268cd8098f13
gadael/gadael,gadael/gadael
public/js/jsondates.js
rejected_complexity
Cyclomatic complexity too high: 14
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require(\"fs\");\nvar path = require(\"path\");\nvar acme = require(\"acme/acme.json\");\n\nif (typeof(acme) !== 'undefined' && (!acme.hasOwnProperty(\"DomainsCertificate\") ||\n !acme.DomainsCertificate.hasOwnProperty(\"Cer...
javascript
edit
0
0
mit
4278b190dc8088ab38672b5674fa5066fe427ba8
dalim-it/docker-images,dalim-it/docker-images,dalim-it/docker-images
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst db = require('sqlite')\nconst squel = require('squel')\n\nasync function getQueue (roomId) {\n const result = []\n const entities = {}\n\n try {\n const q = squel.select()\n .field('queueId, mediaId, userId')\n .fi...
javascript
edit
0
3
isc
67ba39eb790d8c7baaf51025dd101bcc9cf2190c
bhj/karaoke-forever,bhj/karaoke-forever
server/Queue/getQueue.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-nouislider',\n\n included: function(app) {\n this._super.included(app);\n if(!process.env.EMBER_CLI_FASTBOOT) {\n\n // Fix for loading it in ad...
javascript
edit
0
2
mit
8a1db8513c44695f52ac3ed2cd105c389f8f8518
kennethkalmer/ember-cli-nouislider,kennethkalmer/ember-cli-nouislider,kennethkalmer/ember-cli-nouislider
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nhex.Transform = require('./hex_transform');\nhex.ChunkedTransform = require('./chunked_hex_transform');\n\nmodule.exports = hex;\n\nfunction hex(buffer, options) {\n if (!options.offsetWidth) {\n options.off...
javascript
edit
0
3
mit
5309b9ab76d9b6d244c44582de5ed6d8ba170fa8
kriskowal/hexer,jcorbin/hexer
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar sweet = require('sweet.js');\nvar gutil = require('gulp-util');\nvar applySourceMap = require('vinyl-sourcemaps-apply');\nvar es = require('event-stream');\nvar merge = require('merge');\n\nmodule.exports = function(opts) {\n var m...
javascript
edit
0
5
bsd-2-clause
2b924c9b780e3266b1eba47b8e657ac82ad59996
jlongster/gulp-sweetjs
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar net = require('net');\n\nmodule.exports = {\n\tget: get\n};\n\nfunction get(opts, text, callback) {\n\tvar socket = new net.Socket();\n\n\tsocket.connect(opts.port, opts.host, function () {\n\t\tsocket.setNoDelay(true...
javascript
edit
0
5
mit
2fae8caff4eb5f7dac7aafe16596337f9e99eb3d
niksrc/ner,niksrc/ner
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\n\nexports.register = function (plugin, options, next) {\n\n var environment = process.env.NODE_ENV || 'development';\n\n // Hook onto the 'onPostHandler'\n plugin.ext('onPostHandler', function (reque...
javascript
edit
0
4
mit
258906b161ddc783c21b918a34d264363c461daf
poeticninja/hapi-assets
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar jest = require('jest-cli'),\n gutil = require('gulp-util'),\n through = require('through2');\n\nmodule.exports = function (options) {\n options = options || {};\n return through.obj(function (file, enc, ...
javascript
edit
0
4
mit
aef23e6966ba96a53d3d46a92f2c5ec0c0876347
M6Web/gulp-jest
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = require('./config'),\n\t_ = require('underscore');\n\nmodule.exports = require('./lib/api').Api.buildFromFile(config);\n\nmodule.exports.configure = function(options) {\n\toptions = options || {};\n\n\t_.defaults(options, c...
javascript
edit
0
2
isc
d27bcc3e5cfa824dabbb4f16bf9dcee17764ff77
raoulmillais/7digital-api,raoulmillais/node-7digital-api,7digital/7digital-api
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar assign = require('object-assign');\nvar hasOwn = require('hasown');\n\nmodule.exports = function(object, keys){\n\n\tvar result = {}\n\n\tif (keys){\n\t\tkeys = keys.filter(hasOwn(object))\n\t}\n\n\tkeys.forEach(fun...
javascript
edit
0
2
mit
f1fce55cf4a1ba1205b040a51d5f7fb5dfc5615c
radubrehar/parse-keys
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar request = require('request');\n\nvar opts = {\n uri: 'https://api.github.com' + '/users/' + parseParams(process.argv[2]) + '/events',\n json: true,\n method: 'GET',\n headers: {\n 'User-Agent': 'n...
javascript
edit
0
3
mit
810a957b56dee0d032535c3cfa403079ac32aa71
jm-janzen/scripts,jm-janzen/scripts,jm-janzen/scripts
gevents.js
rejected_duplicate
Near-duplicate of sample 104439
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport path from 'path';\nimport express from 'express';\nimport morgan from 'morgan';\n\nrequire('dotenv').config();\n\nexport default callback => {\n const server = express();\n server.set('env', process.env.NODE_ENV || 'development...
javascript
edit
0
5
mit
bb90814b60040ef1ebb5ceba46ab9d3086384c07
merveilles/Rotonde,merveilles/Rotonde
packages/rotonde-core/src/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPinPoint.ItemsfromDomExtractor = function(targetName) {\n this.targetName = targetName;\n}\n\nPinPoint.ItemsfromDomExtractor.prototype = {\n getElements : function(element) {\n var timeDivArray = document.getElementsbyClassName(\"y...
javascript
edit
0
1
mit
7ac7843a019996837ad56e781178612f1de706d3
jbouzi12/PinPoint,ospreys-2014/PinPoint,jbouzi12/PinPoint
pinpoint-items-from-dom-extractor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar BurpImporter = require(__dirname + '/../index'),\n util = require('util');\n\nvar importer = new BurpImporter(__dirname + '/example1.xml');\nimporter.on('start', function (info) {\n console.log('Dump: start');\n console.l...
javascript
edit
0
1
mit
f8717ac3301639f0cbb7103f686af2a27eb96c87
bls/node-burp-importer
examples/dump-burp-xml.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express'),\n Memcached = require('memcached');\n\n// Constants\nvar port = 3000;\nvar env = process.env.NODE_ENV || 'production';\nvar mc = new Memcached(process.env.MC_PORT.replace('tcp://', ''));\n\n// App\nv...
javascript
edit
0
2
mit
c7216b228e14aa30ec83d7415d11aa3c6c7ff198
ndemoor/dockerbel,ndemoor/dockerbel,ndemoor/dockerbel
app/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { Link } from 'react-router'\nimport { setSearchTerm } from './actionCreators'\nimport { connect } from 'react-redux'\nconst { string, func, object } = React.PropTypes\n\nconst Landing = React.createCla...
javascript
edit
0
1
mit
da2ed8f22a4aeb6b71b0ee028891cff0d2904753
galaxode/ubiquitous-eureka,galaxode/ubiquitous-eureka
js/Landing.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n /**\n * Function.bind for ECMAScript 5 Support\n *\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind\n */\n\n if (!Function.prototype.bind) {\n Function.proto...
javascript
edit
0
4
mit
020c793fed4c1b11197c6ee311a10940709d2c22
mallikarjunayaddala/jasmine-rails,ennova/jasmine-rails,carwow/jasmine-rails,henrik/jasmine-rails,alphagov/jasmine-rails,carwow/jasmine-rails,carwow/jasmine-rails,sharethrough/jasmine-rails,searls/jasmine-rails,spadin/jasmine-rails,PericlesTheo/jasmine-rails,PericlesTheo/jasmine-rails,mallikarjunayaddala/jasmine-rails,s...
lib/assets/javascripts/jasmine-console-shims.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n config.set({\n frameworks: [ \n 'jasmine',\n 'karma-typescript',\n ],\n plugins: [\n 'karma-typescript',\n 'karma-jasmine',\n 'karma-firefox-launcher',\n 'kar...
javascript
edit
0
1
mit
ef5db3df7c7e4dd76f920fc44a20a75b1511cf95
arogozine/LinqToTypeScript,arogozine/LinqToTypeScript
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// DiagonalDivider\n\nimport React, { PropTypes } from 'react/addons'; // eslint-disable-line no-unused-vars\nimport styles from './DiagonalDivider.less';\nimport withStyles from '../../decorators/withStyles';\n\n@withStyles(styles)\nex...
javascript
edit
0
5
mit
e7485014cf2f3e591360b3215871c2b8d2f9382e
tonikarttunen/tonikarttunen-com,tonikarttunen/tonikarttunen-com
src/components/DiagonalDivider/DiagonalDivider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport emberVersionInfo from './ember-version-info';\n\nconst { major, minor, isGlimmer } = emberVersionInfo();\n\nlet hasBlockSymbol;\n\nif (major > 3 || (major == 3 && minor >= 1)) {\n // Ember-glimmer mov...
javascript
edit
0
2
mit
57fefba0eb45a21e7fb57bc2400a1cff22c7b72b
pswai/ember-cli-react,pswai/ember-cli-react
addon/utils/has-block.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n\nvar assert = require('assert');\nvar inspectors = require('./assert-paranoid-equal/inspectors');\nvar Context = require('./assert-paranoid-equal/context');\n\n\nfunction paranoidEqual(value1, value2) {\n inspectors.e...
javascript
edit
0
1
mit
e371cdfc4f43935caae843310bb3a7fb1468de17
nodeca/js-yaml,SmartBear/js-yaml,SmartBear/js-yaml,deltreey/js-yaml,crissdev/js-yaml,djchie/js-yaml,crissdev/js-yaml,rjmunro/js-yaml,crissdev/js-yaml,doowb/js-yaml,nodeca/js-yaml,cesarmarinhorj/js-yaml,SmartBear/js-yaml,joshball/js-yaml,pombredanne/js-yaml,joshball/js-yaml,minj/js-yaml,rjmunro/js-yaml,vogelsgesang/js-y...
test/support/assert-paranoid-equal.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from \"ember\";\n\nlet alias = Ember.computed.alias;\nlet computed = Ember.computed;\n\nexport default Ember.Service.extend({\n cookies: alias('_fastbootInfo.cookies'),\n headers: alias('_fastbootInfo.headers'),\n host: ...
javascript
edit
0
1
mit
fbe99b3addf8e6da1f9e004b01f37ddddce035db
tildeio/ember-cli-fastboot,ember-fastboot/ember-cli-fastboot,josemarluedke/ember-cli-fastboot,josemarluedke/ember-cli-fastboot,rwjblue/ember-cli-fastboot,habdelra/ember-cli-fastboot,ember-fastboot/ember-cli-fastboot,habdelra/ember-cli-fastboot,kratiahuja/ember-cli-fastboot,tildeio/ember-cli-fastboot,kratiahuja/ember-cl...
app/services/fastboot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport App from './App';\n\nit('renders without crashing', () => {\n const div = document.createElement('div');\n ReactDOM.render(<App />, div);\n});\n\n```\n\nApply this ...
javascript
edit
0
1
bsd-3-clause
881cda193c44a1bea0bd02f0cf5ca263a5e3730f
igetgames/spectacle-create-react-app,igetgames/spectacle-create-react-app,igetgames/spectacle-create-react-app
packages/react-scripts/template/src/App.test.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Debug Error: No such file" }, { "role": "assistant", "content": "// @AngularClass\n// Look in config for karma.conf.js \nmodule.exports = require('./config/karma.conf.js');\n" } ]
javascript
new_file
0
0
mit
0a201ecc59a60bc2bce37788678a17676ea0cac7
ZombieHippie/fantastic-repository,ZombieHippie/fantastic-repository,ZombieHippie/fantastic-repository,ZombieHippie/fantastic-repository
karma.conf.js
rejected_duplicate
Near-duplicate of sample 79892
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst expect = require('chai').expect;\nconst helper = require('../spec-helper');\n\nconst APP_NAME = 'electron-log-test-nwjs';\n\ndescribe('nwjs test project', function() {\n this.timeout(5000);\n\n it('should write ...
javascript
edit
0
1
mit
94c6656d834febbe16b2c732912dbbab109a6d39
megahertz/electron-log,megahertz/electron-log,megahertz/electron-log
test-projects/electron-log-test-nwjs/main.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n recursive: true,\n reporter: 'spec',\n slow: 0,\n timeout: 40000,\n ui: 'bdd',\n extension: 'js',\n};\n\n```\n\nApply this change: Increase mocha timeout to 50000ms\n\nFix #13090" }, { "rol...
javascript
edit
0
0
apache-2.0
6b4498d48865bd7fde55cc03ee3a682543c4d96d
ctamisier/generator-jhipster,pascalgrimaud/generator-jhipster,dynamicguy/generator-jhipster,atomfrede/generator-jhipster,liseri/generator-jhipster,dynamicguy/generator-jhipster,ruddell/generator-jhipster,gmarziou/generator-jhipster,atomfrede/generator-jhipster,vivekmore/generator-jhipster,mraible/generator-jhipster,cta...
.mocharc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global MATOMO_SITE_ID, MATOMO_TRACKER_URL, MATOMO_ENABLE_LINK_TRACKING */\n\nexport default ({ router }) => {\n // Google analytics integration\n if (MATOMO_SITE_ID && MATOMO_TRACKER_URL) {\n var _paq = _paq || [];\n /* track...
javascript
edit
0
7
bsd-3-clause
de10bbbd46e148fe38e82256eb5d92a13550e1c3
metafetish/buttplug
protocol-spec/.vuepress/plugin-matomo/inject.js
rejected_duplicate
Near-duplicate of sample 82345
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(document, saveAs, smoothScroll, downloadName) {\n 'use strict';\n\n if(window.location.protocol.indexOf('http') !== -1) {\n // Created before download in order to be JS-modifications-free.\n var blob = new Blob(['<!doc...
javascript
edit
0
2
isc
674452e37dc30389046b1d3f99a0c20062bf7100
ThibWeb/jsonresume-theme-eloquent,ThibWeb/jsonresume-theme-eloquent,ThibWeb/jsonresume-theme-eloquent
assets/scripts/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\n\n// Listen port\nconst PORT = process.env.PORT || 8080;\n\n\n// Load base config\nconst baseConfig = require('./webpack.config.base');\n\n// Create the config\nconst c...
javascript
edit
0
0
mit
74081cd1ba00c1efcba11eae021b474adc26c126
gaudeon/interstice,gaudeon/interstice,gaudeon/interstice
config/webpack.config.devserver.js
rejected_duplicate
Near-duplicate of sample 92199
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Load all h2, h3, h4, h5 and h6 tags as contents.\n */\n$('.append-contents').each(function() {\n let html = '<ul class=\"list-unstyled contents\">',\n level = 2;\n \n for(let h of $('h2, h3, h4, h5, h6')...
javascript
edit
0
5
bsd-3-clause
2baa9b0490355c15a317205fa6cfd94e0ce89f6b
LibCrowds/libcrowds-bs4-pybossa-theme,LibCrowds/libcrowds-bs4-pybossa-theme
static/js/append-contents.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\"app/app\",\n \"ember\"], function(App, Ember) {\n \"use strict\";\n\n App.Pagination = Ember.Mixin.create({\n queryParams: ['offset'],\n\n limit: 30,\n offset: 0,\n\n actions: {\n nextPage: function()...
javascript
edit
0
7
mit
a8875ecedd19d33baf1832b5ed1b710cf8de0019
FreeFeed/freefeed-html,epicmonkey/pepyatka-html,SiTLar/pepyatka-html,dsumin/freefeed-html,SiTLar/pepyatka-html,dsumin/freefeed-html,pepyatka/pepyatka-html,FreeFeed/freefeed-html,epicmonkey/pepyatka-html,pepyatka/pepyatka-html
public/js/app/mixins/Pagination.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * based on speakWorker.js from:\n * \n * speak.js\n * https://github.com/logue/speak.js\n * License: GPL-3.0\n */\n\nimportScripts('speakGenerator.js');\n\nonmessage = function(event) {\n\t\n\tvar msg = event.data;\n\tvar id = msg....
javascript
edit
0
2
mit
849af48a8ca902ecc8414d200c691f51f99a399c
mmig/mmir-plugins-media
mmir-plugin-tts-speakjs/www/speakWorkerExt.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Gets the pixels within the circle.\n * @export @public @method\n * @name getCircle\n *\n * @param {number} radius The radius of the circle.\n * @param {number} rows The number of rows.\n * @param {number} columns ...
javascript
edit
0
9
mit
68fe5843ccf28c9fed9870ce7de54f103648425e
cornerstonejs/cornerstoneTools,cornerstonejs/cornerstoneTools,chafey/cornerstoneTools,cornerstonejs/cornerstoneTools
src/util/brush/getCircle.js
accepted
null
true