messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n\n // Set to true to show console.log for debugging\n var DEBUG_MODE = true;\n\n 'use strict';\n\n var Slide = function (title) {\n\n // Constructor\n this.title = title;\n this.eleRef = ...
javascript
edit
0
2
mit
6b3ad70d9bd6c0559adc067fc432174689e3012b
renesansz/presentations,renesansz/presentations
angular-web-applications/src/scripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar app = express();\n\nvar config = require('./config');\nvar bodyParser = require('body-parser');\nvar morgan = require('morgan')\nvar mongoose = require('mongoose');\n\nvar Recording = require('./...
javascript
edit
0
0
apache-2.0
7d162867c86ae3c2952b167245898d78ee0f1468
vindsiden/vindsiden-server
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { withName } from './shared';\nimport { FEATURES } from 'data/columns';\n\nexport default function isEnterprise(modules) {\n const serverModule = modules.find(withName('SERVER'));\n\n const hasFeatures = /[CDEFSW]/.test(serverM...
javascript
edit
0
1
cc0-1.0
8e23e794a17df6638f060284b272d6b99691f269
ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer,ksmithbaylor/emc-license-summarizer
src/App/Body/Display/Summary/SummaryBody/summaryFunctions/isEnterprise.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class Vector2 {\n\n constructor(x = 0, y = 0) {\n this.x = x;\n this.y = y;\n }\n\n set(x, y) {\n this.x = x;\n this.y = y;\n return this;\n }\n\n add(vec2) {\n thi...
javascript
edit
0
1
mit
5cf04bb912fc64d119a5c0c2693e9e2fa0823e4f
lucidfext/light2d-es6
src/geom/Vector2.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Example from './Example';\nimport Props from './Props';\n\nconst ComponentPage = ({component}) => {\n const {name, description, props, examples} = component;\n\n ...
javascript
edit
0
4
mit
0f077bd8eaf30107a691b60c9500fe0c71d0dad0
coryhouse/ps-react,coryhouse/ps-react
src/docs/ComponentPage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport classnames from 'classnames';\nimport { GridContainer, GridRow, GridCol } from '../Grid';\n\nconst Nav = props => (\n <div\n className={classnames('ui-nav', {\n 'ui-nav-fixed': props.fixed,\n ...
javascript
edit
0
2
mit
2c067908d8fae5425e2568c43f0501021caf172b
wundery/wundery-ui-react,wundery/wundery-ui-react
src/components/Nav/Nav.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path'),\n fs = require('fs'),\n crypto = require('crypto');\n\ndescribe(\"readFile functionality\", function() {\n var _this = this;\n require('./harness.js')(_this);\n it(\"creates a directory\", func...
javascript
edit
0
2
bsd-2-clause
46924430441a011b105a6874f72061ddd2c9fe02
terribleplan/WorkingDirectory
spec/readFile.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fetch from 'node-fetch';\n\nimport { userModel } from '../models/index';\n\nexport const authenticatedWithToken = (req, res, next) => {\n let csrf;\n let jwt;\n\n if (req && req.cookies && req.headers){\n csrf = req.headers...
javascript
edit
0
10
mit
9bc6041852edacb2eb85bf31b5aa5a2e0a67dc28
Madmous/madClones,Madmous/madClones,Madmous/madClones,Madmous/Trello-Clone,Madmous/Trello-Clone,Madmous/madClones,Madmous/Trello-Clone
server/trello-microservice/src/utils/passportMiddleweare.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// look for groups of matching characters\n// pass each group to say() and concatenate returns\nvar look = function(lookString) {\n var i = 0;\n var j = 1;\n var sayString = '';\n\n while (i < lookString.length) {\n while (lookSt...
javascript
edit
0
2
mit
d0b0423b2d4ef343d09bb27063d8b8162fb7d466
ptmccarthy/advent-of-code
day10/10.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport Snackbar from 'material-ui/Snackbar';\nimport { red900, grey50 } from 'material-ui/styles/colors';\n\n\nclass ErrorReporting extends Component {\n...
javascript
edit
0
2
mit
f1edda2564b4ee70bbd151ed79b26991d575e4e4
corpix/material-ui-error-reporting,corpix/material-ui-error-reporting
src/ErrorReporting.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * setupSiteKit utility.\n *\n * Site Kit by Google, Copyright 2020 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 m...
javascript
edit
0
3
apache-2.0
22ffe9c0158a27314ae24163592752d392ec3b7c
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
tests/e2e/utils/setup-site-kit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar bridge = function (presenterPath) {\n window.rhubarb.viewBridgeClasses.HtmlViewBridge.apply(this, arguments);\n};\n\nbridge.prototype = new window.rhubarb.viewBridgeClasses.HtmlViewBridge();\nbridge.prototype.constructor = bridge...
javascript
edit
0
2
apache-2.0
cae745eee63931ce361e1f235c6c135ec973f8cb
RhubarbPHP/Module.Leaf,RhubarbPHP/Module.Leaf
src/Presenters/Controls/Text/TextBox/TextBoxViewBridge.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**!\n *\n * Copyright (c) 2015-2016 Cisco Systems, Inc. See LICENSE file.\n */\nimport {assert} from '@ciscospark/test-helper-chai';\nimport Avatar, {config} from '../../';\n// import '@ciscospark/test-helper-sinon';\nimport {MockSpark...
javascript
edit
0
1
mit
fda83ca426c86fd36031fd73beae1af3756a1c5f
good-joe/spark-js-sdk,good-joe/spark-js-sdk,good-joe/spark-js-sdk
packages/plugin-avatar/test/unit/spec/avatar-url-batcher.js
rejected_duplicate
Near-duplicate of sample 86041
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst assert = require('assert');\n'use strict';\n\n\n/**\n * Once middleware will block an event if there is already a scheduled event\n * @param {Event} event the event to check\n * @param {DBWrkr} wrkr wrkr instance to work with\n * ...
javascript
edit
0
4
mit
d956307fb81bc0b6561ec13a0cf1655c4d6ffc6c
whyhankee/dbwrkr
lib/middleware.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n function initTwinklingStars() {\n particlesJS('stars', {\n particles: {\n number: {\n value: 180,\n density: {\n enable: t...
javascript
edit
0
2
mit
8e10d4221b8231f4de72130a8014bb79c9b277d0
rfgamaral/ricardoamaral.net,rfgamaral/ricardoamaral.net
src/assets/js/main.js
rejected_duplicate
Near-duplicate of sample 79899
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.HostCreate.events({\n 'submit form' : function (event, template) {\n event.preventDefault();\n\n // Define form field variables.\n var hostname = event.target.hostname.value,\n type = event.target.type.value,\n ...
javascript
edit
0
3
mit
21f294d4aa2364cca03642e71e4872e945e64904
steyep/syrinx,bfodeke/syrinx,steyep/syrinx,bfodeke/syrinx,shrop/syrinx,shrop/syrinx,hb5co/syrinx,hb5co/syrinx
client/views/hosts/hostCreate/hostCreate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport type {Snapshot, SnapshotItem} from 'redux-ship';\n\nexport type State = {\n logs: {action: mixed, snapshot: Snapshot<mixed, mixed>}[],\n selectedLog: ?number,\n selectedSnapshotItem: ?SnapshotItem<mixed, mixed>,\n};\...
javascript
edit
null
null
mit
842bfdc503c25008027025fa1ba4f64f11b8300c
clarus/redux-ship-devtools,clarus/redux-ship-devtools
src/devtools/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\nvar config = require(\"12factor-config\");\n\nvar appConfig = config({\n apiUrl: {\n env: \"AGFAPHD_WEBAPP_API_URL\",\n type: \"string\",\n default: \"http://localhost:8089\"\n },\n emailApiKey: {\n env...
javascript
edit
0
0
mit
a74850c23873f3f6ac4033e1632262d43bf56689
agoodfriendalwayspayshisdebts/agoodfriendalwayspayshisdebts-webapp,Yuyuu/agoodfriendalwayspayshisdebts-webapp,Yuyuu/agoodfriendalwayspayshisdebts-webapp,agoodfriendalwayspayshisdebts/agoodfriendalwayspayshisdebts-webapp,agoodfriendalwayspayshisdebts/agoodfriendalwayspayshisdebts-webapp,Yuyuu/agoodfriendalwayspayshisdeb...
server/configuration/environment_configuration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\n\nimport { Modal } from 'react-bootstrap';\n\nconst ReadModeModal = props => (\n <div>\n <Modal.Header>\n <Modal.Title>{props.recipe.name}</Modal.Title>\n </Modal.Header>\n <Moda...
javascript
edit
0
1
mit
f65229875c39b09eab54526b11738c8cc6097247
ibleedfilm/recipe-box,ibleedfilm/recipe-box
src/components/RecipeModal/ReadModeModal/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Ensures something has been found during the request. Returns 404 if\n * res.template is unset, res.locals is empty and statusCode has not been set\n * to 204.\n *\n * Should be placed at the very end of the middleware pipeline,\...
javascript
edit
0
5
mit
765444e800cd10f7a6347c82f1b272d64875e835
thebitmill/midwest
middleware/ensure-found.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar moment = require('moment');\n\nvar System = {\n\n create: function(activityInstance, user, language, nation) {\n\n var now = moment();\n\n return {\n \"User\": {\n \"HealthCareRole\": user....
javascript
edit
0
2
mit
2e4f0c043868c764fa2719ab11964a929d74bf01
ebmeds/ebmeds-fhir,ebmeds/ebmeds-fhir
app/domain/ebmeds/System.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { EventEmitter } from 'events'\nimport PouchDB from 'pouchdb'\nimport Serial from '../serial'\nimport Classifier from './classifier'\nimport { parser, dataHandler } from './data-handler'\n\n/**\n * Handles everything a Station sh...
javascript
edit
null
null
mit
b2a6fa1a1e6771a662029d3f52b6d57dcabc6ae2
cansat-icarus/capture-lib
src/icarus/station.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire(['gitbook'], function(gitbook) {\n\n gitbook.events.bind('start', function(e, config) {\n var opts = config.toolbar;\n \n if (!opts || !opts.buttons) return;\n \n var buttons = opts.buttons....
javascript
edit
0
3
apache-2.0
e5374eca0b7f8eb61de6fc0ce27085a6be01c519
Simran-B/gitbook-plugin-toolbar
assets/buttons.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst mongoose = require('mongoose')\nconst uuid = require('uuid').v4\n\nconst schema = new mongoose.Schema({\n\tid: {\n\t\ttype: String,\n\t\trequired: true,\n\t\tunique: true,\n\t\tdefault: uuid\n\t},\n\tcreated: {\n\t...
javascript
edit
0
0
mit
b82800fc66b5744a962217b7a0d529dd1c9b2dee
electerious/Ackee
src/models/Token.js
rejected_duplicate
Near-duplicate of sample 68444
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar BufferedStream = require('bufferedstream');\nvar createMockCouchAdapter = require('./createMockCouchAdapter');\nvar http = require('http');\nvar mockCouch = require('mock-couch-alexjeffburke');\nvar url = require('url');\n\nfunction...
javascript
edit
0
2
bsd-3-clause
3b95b1734cdfa3b7bb5cb38990265dc1db683ab1
alexjeffburke/unexpected-couchdb
lib/unexpectedMockCouchdb.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// default settings. fis3 release\n\n// Global start\nfis.match('src/ui-p2p-lending.less', {\n parser: fis.plugin('less'),\n rExt: '.css'\n})\n\nfis.match('src/*.less', {\n packTo: 'dist/ui-p2p-lending.css'\n})\n\n// Global end\n\n//...
javascript
edit
0
0
mit
9a4358f6f1726f7834fa009b18ef57c781a5937b
PeachScript/ui-p2p-lending,Hellocyy/ui-p2p-lending,Hellocyy/ui-p2p-lending,PeachScript/ui-p2p-lending
fis-conf.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Use unix fs-watch for OSX because of problems with OSX Lion" }, { "role": "assistant", "content": "module.exports = process.platform === \"linux\" || process.platform === \"darwin\" ?\n require(\"./watch-tree-unix\") :\n ...
javascript
new_file
0
0
bsd-3-clause
bb03359cfccfa8a1300435339ef91911e4b611af
busterjs/fs-watch-tree
lib/fs-watch-tree.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\n\nimport { propTypes, defaultProps } from './props'\nimport Player from './Player'\nimport { isEqual, getConfig } from './utils'\n\nexport default function createSinglePlayer (activePlayer) {\n ...
javascript
edit
0
2
mit
dcf3b88a466c82c06715badb541e09f3c9d64f1b
CookPete/react-player,CookPete/react-player
src/singlePlayer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { expect } from 'chai';\nimport jsf from '../../../src';\n\n/* global describe, it */\n\ndescribe('Random Generation', () => {\n it('should generate all the fields with alwaysFakeOptionals option and additionalProperties: true',...
javascript
edit
0
1
mit
01c3baa8c43e976267c47934b99f7f4b210d36b6
json-schema-faker/json-schema-faker,pateketrueke/json-schema-faker,json-schema-faker/json-schema-faker
tests/unit/core/randomGeneration.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require ./core\n//= require ./mixins\n//= require ./forms\n//= require_tree ./forms\n//= require_tree ./views\n```\n\nApply this change: Fix dependency loading order for checkbox" }, { "role": "assistant", "content": "//...
javascript
edit
0
0
mit
e1275063a762e4748aae86bfcf9a9e60deb40e70
kristianmandrup/ember-bootstrap-rails,kristianmandrup/ember-bootstrap-rails
app/assets/javascripts/ember-bootstrap-rails/all.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar DataStore = require('./regard-data-store.js');\nvar Chart = require('../schemas/chart.js');\n\nvar router = express.Router();\nvar dataStore = new DataStore('Adobe', 'Brackets');\n\nrouter.get('/ch...
javascript
edit
0
2
apache-2.0
70459cb61f753ce11bc85a801442de85879f716e
with-regard/regard-website-api
modules/chartDataController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction hook_menu(){\n $.contextMenu({\n selector: '.feeder_entry', \n callback: function(key, options) {\n if(key == 'gallery'){\n var id = $(this).attr('specie_id');\n var fol...
javascript
edit
0
2
mit
e790505df6398acdcd2dbe81f353cbf7a3cafaf9
soundspawn/mantis_feeder,soundspawn/mantis_feeder
mantis_feeder_contextMenu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar videoStyle = {\n width: '100%',\n height: '100%',\n backgroundColor: '#000'\n};\n\nvar WatchPage = React.createClass({\n propTypes: {\n name: React.PropTypes.string,\n },\n\n render: function() {\n return (\n <main>...
javascript
edit
0
2
mit
5b0f2e638a1ca645f000f0bd23bde42b7a90f334
lbryio/lbry-electron,jsigwart/lbry-app,jsigwart/lbry-app,akinwale/lbry-app,jsigwart/lbry-app,lbryio/lbry-app,MaxiBoether/lbry-app,akinwale/lbry-app,lbryio/lbry-electron,MaxiBoether/lbry-app,lbryio/lbry-electron,jsigwart/lbry-app,MaxiBoether/lbry-app,akinwale/lbry-app,lbryio/lbry-app,MaxiBoether/lbry-app,akinwale/lbry-a...
js/page/watch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar plugins = require('gulp-load-plugins')({\n lazy: true\n});\n\n\n////////// TASKS ////////////\n\n/**\n * Prints out the list of available tasks.\n */\ngulp.task('default', plugins.taskListing);\n\n\n\n/////// ACCESSORY FUNCTIONS /...
javascript
edit
0
0
mit
59ad47aa54b15a420efea1b2bbc0f44a2e5e5b3e
natete/matrix-angular-gulp,natete/matrix-angular-gulp
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Make sure there actually is an object" }, { "role": "assistant", "content": "var txt_cache='604800';chrome.webRequest.onHeadersReceived.addListener(function(object){'use strict';if(object){var object_type=object.type.toLowerC...
javascript
new_file
0
12
mit
da4c52e2ba3dfc46f6523616df9ecad489266835
mubaidr/Speed-up-Browsing,mubaidr/Speed-up-Browsing
js/background.js
rejected_complexity
Cyclomatic complexity too high: 12
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Clock = module.exports;\n\nClock.weekday = function(weekday, hour, minute, seconds) {\n return moment({ hour: hour, minute: minute, seconds: seconds }).day(weekday).unix();\n};\n\n```\n\nApply this change: Fix Clock weekday to alwa...
javascript
edit
0
2
mit
d65379f168c569209d073f3473ffcdb859f430b7
ishepard/TransmissionTorrent,carlo-colombo/dublin-bus-pebble,pebble/pebblejs,demophoon/Trimet-Tracker,daduke/LMSController,Scoutski/pebblejs,carlo-colombo/dublin-bus-pebble,jiangege/pebblejs-project,frizzr/CatchOneBus,bkbilly/Tvheadend-EPG,Scoutski/pebblejs,stephanpavlovic/pebble-kicker-app,pebble/pebblejs,dhpark/pebbl...
src/js/clock/clock.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire.config({\n paths: {\n \"jquery\": \"js/jquery-2.1.4.min\",\n \"underscore\": \"js/underscore-min\",\n \"knockout\": \"js/knockout-min-3.3.0\"\n }\n});\n\nrequire(['jquery', 'js/modules/dukecondb', 'js/...
javascript
edit
0
1
mit
5ca496397a1f948ecd2e1e0cb07fc3ad3e40bc64
dukecon/dukecon_html5,dukecon/dukecon_html5
src/main/webapp/public/app-reset.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n\tBLACK: 1,\n\tRED: 1,\n\tGREEN: 2,\n\tBLUE: 3\n\n}\n```\n\nApply this change: Correct color value for Black" }, { "role": "assistant", "content": "module.exports = {\n\tBLACK: 0,\n\tRED: 1,\n\tGREEN: 2,\...
javascript
edit
0
0
mit
dbcb98136ecf6d2f6200d2e5fb29f7d1684c9edf
gbirke/textiles-web,gbirke/textiles-web
js/colors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar watch = require('gulp-watch');\nvar harp = require('harp');\nvar browserSync = require('browser-sync');\nvar ghPages = require('gulp-gh-pages');\n\nvar harpServerOptions = {\n port: 900...
javascript
edit
0
1
mit
4993dac019eb6eb43b74d5999efebeb5e5c99bdb
josh-egan/tech.joshegan.com,josh-egan/tech.joshegan.com,josh-egan/tech.joshegan.com
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright 2017-present, Hippothesis, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n */\n\n'u...
javascript
edit
0
0
bsd-3-clause
8923137c551fd8ab14798e0fe35ff2018f6b966f
hippothesis/Recipezy,hippothesis/Recipezy,hippothesis/Recipezy
app/constants/Images.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar tsc = require('gulp-tsc');\nvar tape = require('gulp-tape');\nvar tapSpec = require('tap-spec');\nvar del = require('del');\n\ngulp.task(\"test:clean\", function(done) {\n del(['build-test/**']).then(fu...
javascript
edit
0
1
mit
7c52422a46c92c85d6ddb482cce389d5fa80e5ba
Jameskmonger/isaac-crypto
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.\n * \n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\")...
javascript
edit
0
0
mit
23b3ba56043fed9a53a3ec6ed6e622063d7ca5e5
zhukaixy/brackets,Live4Code/brackets,2youyouo2/cocoslite,adrianhartanto0/brackets,srinivashappy/brackets,albertinad/brackets,emanziano/brackets,fcjailybo/brackets,MahadevanSrinivasan/brackets,michaeljayt/brackets,tan9/brackets,chrismoulton/brackets,fronzec/brackets,MantisWare/brackets,IAmAnubhavSaini/brackets,malinkie/...
src/nls/zh-tw/urls.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst gulp = require('gulp');\nconst browserify = require('gulp-browserify');\nconst pkg = require('./package.json')\n\ngulp.task('build', () =>\n gulp.src(pkg.main)\n .pipe(browserify({\n insertGlobals : true,\n debug : !...
javascript
edit
0
1
mit
7baa60230492c34ca9b1bb881731e0f6b5827d25
Kaioru/memefy.js
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n rimraf = require('rimraf'),\n jshint = require('gulp-jshint'),\n uglify = require('gulp-uglify'),\n rename = require('gulp-rename'),\n insert = require('gulp-insert'),\n p = require('./pac...
javascript
edit
0
1
mit
132822c44fc6916a01a547a2cfb70e1305b737ea
Sevrahk/seSlider,Sevrahk/seSlider
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar del = require('del');\nvar babel = require('gulp-babel');\nvar browserify = require('browserify');\nvar source = require('vinyl-source-stream');\nvar buffer = require('vinyl-buffer');\n\...
javascript
edit
0
1
mit
3ee6f9293edd48a1ca8302f799f8a339549952a1
jnhuynh/min-flux
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar del = require('del');\nvar gulp = require('gulp');\nvar webpack = require('webpack');\n\nvar WebpackDevServer = require('webpack-dev-server');\n\nvar $ = require('gulp-load-plugins')();\n\nvar config = require('./webpack.config.js')...
javascript
edit
0
2
mit
0c5e8cd6c96275a1db428bc572bea0418e7b3c31
darthmall/once-in-a-blue-moon,darthmall/once-in-a-blue-moon,darthmall/once-in-a-blue-moon
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar iife = require('gulp-iife');\nvar uglify = require('gulp-uglify');\nvar concat = require('gulp-concat');\nvar rename = require('gulp-rename');\n\ngulp.task('default', ['scripts']);\n\ngulp.task('scripts'...
javascript
edit
0
1
mit
59ca17998801770666c812e00942c0887ded1156
kefir500/vk-api-angular
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n camelCase: require('./camel-case'),\n colorString: require('./color-string'),\n nestOptions: require('./nest-options'),\n uid: require('./uid'),\n request: require('./request'),\n metadata: re...
javascript
edit
0
0
apache-2.0
5f9884433df23b78ca063001cfb594081ca5bc35
transmutejs/core
app/libs/utils/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst createWebsocketTarget = require('./create-websocket-target');\nconst osnap = require('osnap/src/ios');\n\nconst saveScreenshotToFile = filename => osnap.saveToFile({ filename });\n\nconst createIOSSimulatorTarget = socketUri =>\n ...
javascript
edit
0
2
mit
1cde6271d8b7a3c38dfb6e75f0229b670921238a
oblador/loki,oblador/loki,oblador/loki
src/targets/native/ios-simulator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function($) {\n $(function(){\n\n // https://stackoverflow.com/questions/20658402/internet-explorer-issue-with-html5-form-attribute-for-button-element\n // detect if browser supports this\n var sampleElement = $('[form]').get...
javascript
edit
0
4
mit
c29eb1e9d74438621585ac56c239a92ba2eb503b
katalyst/koi,katalyst/koi,katalyst/koi
vendor/assets/javascripts/koi/form-for.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexponentiateStrings = function(string1, string2) {\n // must have a powers function for strings because 100 ** 100 is too high for JS...\n}\n\n// var powers = [];\n\n// for (var a = 2; a <= 100; a++) {\n// for (var b = 2; b <= 100; b...
javascript
edit
0
0
mit
ad736959264f0cdc2bae5fa0391569f432fb3c65
JacobCrofts/project-euler,JacobCrofts/project-euler,JacobCrofts/project-euler
029-distinct-powers/javascript-solution.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\n\n// SCHEMA SETUP:\nvar campgroundSchema = new mongoose.Schema({\n name: String,\n image: String,\n description: String,\n comments: [\n \t{\n \t\ttype: mongoose.Schema.Types.Object...
javascript
edit
0
0
mit
2f58bac8452ec8981b5e8cc0ed45434768bf63ef
JuanHenriquez/yelp-camp,JuanHenriquez/yelp-camp
models/campground.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar info = require('./info');\nvar path = require('path');\nvar myPackageJson = require('../package.json');\nvar version = myPackageJson.praatVersion;\nmodule.exports = [__dirname, '..', 'node_modules', '.bin', info.praatRealExecName(in...
javascript
edit
0
0
mit
c4812b1d7f7164a5c23c1c723d564cfdac584680
motiz88/node-praat
lib/praat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar math = require('mathjs');\n\nvar ERROR_RESPONSE = 'I can\\'t calculate that!';\n\nmodule.exports = function(argv, response) {\n var respBody = ERROR_RESPONSE;\n\n try {\n var expression = argv.slice(1).join('');\n var resu...
javascript
edit
0
3
mit
739fa1573e59dee5c862ecf1f5e0dd71342ddfcc
elvinyung/scalk
lib/index.js
rejected_duplicate
Near-duplicate of sample 103749
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar http = require('http')\nvar shimmer = require('shimmer')\nvar asyncState = require('./async-state')\n\nmodule.exports = function (client) {\n shimmer({ logger: client.logger.error })\n shimmer.massWrap(http.Server....
javascript
edit
0
3
bsd-2-clause
ef675c190419fcb18c426484ba707dfddf9b866c
opbeat/opbeat-node,opbeat/opbeat-node
lib/hooks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar STATUS_CODES = require('http');\n\nexports.error = function (statusCode, message) {\n var err;\n\n if (message instanceof Error) {\n err = message;\n } else {\n err = new Error(message || STATUS_CODES[statusCo...
javascript
edit
0
3
mit
a47d6f43d397f6ac52fabb3881056af9e8c0a86a
ericf/open-marriage,HandyCodeJob/open-marriage,djscholl/open-marriage,djscholl/open-marriage,FerriNRachel/getting-married,FerriNRachel/getting-married
lib/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar require = typeof require === 'undefined' ? function() {} : require;\n\nvar React = window.React || require('react');\nvar ReactDom = window.ReactDOM || require('react-dom') || React;\nvar ElementPan = React.createFa...
javascript
edit
0
1
mit
26bc33be05e3c4ec5403f8074bace5aa447dacf4
rexxars/react-element-pan
demo/js/demo.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport mutations from './coreLearn/mutations';\nimport * as getters from './coreLearn/getters';\nimport * as actions from './coreLearn/actions';\nimport classAssignments from './classAssignments';\nimport classes from './classes';\nimpo...
javascript
edit
0
1
mit
2d9feaa714088dafc473434b8a57e559b3416a5d
learningequality/kolibri,learningequality/kolibri,learningequality/kolibri,learningequality/kolibri
kolibri/plugins/learn/assets/src/modules/pluginModule.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Test to add a subscriber to new list and remove it." }, { "role": "assistant", "content": "/* global describe, it */\n\n'use strict'\n\nvar expect = require('expect.js')\n\nvar MailerLite = require('..')\nvar ML = new MailerL...
javascript
new_file
0
1
mit
b223c3f57215b8e42ee1792d507c146afad1129d
fmoliveira/mailerlite-sdk-nodejs,fmoliveira/mailerlite-sdk-nodejs
test/subscribers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n The controls at the top of a private message in the map area.\n\n @class PrivateMessageMapComponent\n @extends Ember.Component\n @namespace Discourse\n @module Discourse\n**/\nDiscourse.PrivateMessageMapComponent = Ember.View...
javascript
edit
0
1
mit
7a45d261a7720133c7004487f273915c48cfef7b
natefinch/discourse,natefinch/discourse
app/assets/javascripts/discourse/components/private_message_map_component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst {expect} = require(\"chai\");\n\nbefore(() => {\n browser.url(\"/login\");\n\n browser.setCookie({\n name: \"user_session\",\n value: process.env.USER_SESSION,\n });\n});\n\ndescribe(\"Pull Requests (li...
javascript
edit
0
1
mit
8de92e7e3acee87e6bf9b2932a56783d0d3ebacf
zombie/blind-reviews,zombie/blind-reviews
test/test-github.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as types from './ActionTypes'\nimport axios from 'axios'\n\nexport function addPattern(name, pattern) {\n return {\n type: types.ADD_PATTERN,\n name: name,\n pattern: pattern\n }\n}\n\nexport function selectPattern(p...
javascript
edit
0
2
mit
fb6bb2e453ea1b49593df36addb5c7f90f683452
Subzidion/riveter,Subzidion/riveter,Subzidion/riveter
client/src/actions/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar buster = require(\"buster\");\nvar sinon = require(\"../lib/sinon\");\nvar assert = buster.assert;\n\nbuster.testCase(\"sinon.typeOf\", {\n \"returns boolean\": function () {\n assert.equals(sinon.typeOf...
javascript
edit
0
1
bsd-3-clause
20476caed9ff374a9b201b057d2dcff3522c6ca4
fatso83/Sinon.JS,Khan/Sinon.JS,Khan/Sinon.JS,fatso83/Sinon.JS,jishi/sinon,mroderick/Sinon.JS,mroderick/Sinon.JS,jishi/sinon,Khan/Sinon.JS,cjohansen/Sinon.JS,fatso83/Sinon.JS,cjohansen/Sinon.JS,jishi/sinon,andpor/sinon,andpor/sinon,mroderick/Sinon.JS,andpor/sinon,cjohansen/Sinon.JS
test/typeOf-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar profile = {\n basePath : '../..',\n baseUrl : '.',\n releaseDir : './Build/Apps/CesiumViewer',\n action : 'release',\n cssOptimize : 'comments',\n mini : true,\n optimize : 'closure',\n layerOptimize : 'closu...
javascript
edit
0
1
apache-2.0
af8887e9c755638f306cc17617c62e0032d31912
progsung/cesium,aelatgt/cesium,CesiumGS/cesium,NaderCHASER/cesium,esraerik/cesium,ggetz/cesium,jason-crow/cesium,CesiumGS/cesium,kiselev-dv/cesium,wallw-bits/cesium,soceur/cesium,oterral/cesium,kiselev-dv/cesium,kaktus40/cesium,omh1280/cesium,CesiumGS/cesium,denverpierce/cesium,geoscan/cesium,YonatanKra/cesium,emackey/...
Apps/CesiumViewer/CesiumViewer.profile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar stream = require('stream')\nvar mongoose = require('mongoose')\n\nexports.mongoose = mongoose\n\nexports.connectMongoose = function() {\n mongoose.connect(process.env.MONGO_URL || 'mongodb://localhost/meku')\n return this\n}\n\nex...
javascript
edit
0
3
mit
b5a4f896615b9a15f0cb975982447a96e0959368
kavi-fi/meku,kavi-fi/meku,kavi-fi/meku
migrations/util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar evalInScope = require('./helpers/eval-in-scope');\n\n/*eslint-disable*/\n\nfunction evalBEST(source, builder) {\n evalInScope(source, { component: builder });\n}\n\nfunction evalSources(sources, proc, cb) {\n ...
javascript
edit
0
4
mit
96e5f4266391ae5487414e0e8814a95af0100c34
jeremykenedy/framework,colllin/famous-framework,infamous/famous-framework,infamous/framework,jeremykenedy/framework,colllin/famous-framework,Famous/framework,KraigWalker/framework,SvitlanaShepitsena/remax-banner,SvitlanaShepitsena/framework-1,infamous/framework,woltemade/framework,infamous/famous-framework,tbossert/fra...
lib/evaluator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar\nPromise = require('./promise');\n\n\nmodule.exports = function (API) {\n var\n self = Object.create(null),\n promise = Promise.resolve(API);\n\n self.init = function (initializer) {\n promise = promise.the...
javascript
edit
0
3
mit
025610aea87b2cec86855b29c7042a6b37c35de5
kixxauth/enginemill
lib/initializer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport TooltipEnabled from '../mixins/sl-tooltip-enabled';\n\n/**\n * @module components\n * @class sl-tooltip\n */\nexport default Ember.Component.extend( TooltipEnabled, {\n\n // -----------------------...
javascript
edit
0
0
mit
3cdfcdaaedd63d2c7c388a3de6b29fa9c95322c4
erangeles/sl-ember-components,theoshu/sl-ember-components,alxyuu/sl-ember-components,softlayer/sl-ember-components,alxyuu/sl-ember-components,Suven/sl-ember-components,theoshu/sl-ember-components,erangeles/sl-ember-components,Suven/sl-ember-components,azizpunjani/sl-ember-components,softlayer/sl-ember-components,azizpu...
addon/components/sl-tooltip.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport Box from '../box';\nimport cx from 'classnames';\nimport theme from './theme.css';\n\nclass Icon extends PureComponent {\n static propTypes = {\...
javascript
edit
0
2
mit
5503337e5452e62eb7bb8b77b4cf4dccb6703015
teamleadercrm/teamleader-ui
components/icon/Icon.js
rejected_duplicate
Near-duplicate of sample 74383
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n pkgFile: 'package.json',\n clean: ['build'],\n babel: {\n options: {\n sourceMap: false\n },\n dist: {\n ...
javascript
edit
0
2
mit
31fb423a90cdb5445bf1d3fada17195a85773e1e
webdriverio/wdio-sync
gruntfile.js
rejected_duplicate
Near-duplicate of sample 94872
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n debug: {\n files: ['app/scripts/**/*', 'app/styles/**/*'],\n tasks: ['build:debug']\n },\n rails: {\n files: ['config/**/*.rb', 'lib/**/*.rb', 'Gemfile.lock'],\n tasks: ['rails:server:restart'],\n ...
javascript
edit
0
0
mit
fd4522d63e7d9dc18abc03f16fc5cf00a59409d9
half-pipe/half-pipe,half-pipe/half-pipe
lib/generators/half_pipe/templates/tasks/options/watch.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Entire frame is insecure?\nif ((document.location.protocol == \"http:\") ||\n (document.location.protocol == \"ftp:\")) \n{\n document.body.style.backgroundColor=\"#E04343\";\n}\n\n var lnks = document.getElementsByTagName(\...
javascript
edit
0
0
mit
84aa293b304a55458c556d4406e24cba458ace0a
ericlaw1979/moartls,Lloth/moartls,ericlaw1979/moartls,Lloth/moartls
injected.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require(\"gulp\");\nvar usemin = require(\"gulp-usemin\");\nvar ngmin = require(\"gulp-ngmin\");\nvar uglify = require(\"gulp-uglify\");\nvar minifyHtml = require(\"gulp-minify-html\");\nvar minifyCss = require(\"gulp-minify-...
javascript
edit
0
1
mit
be00bc6b180624fe4cbb912f4faacf483d148668
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/gulpfile.js
rejected_duplicate
Near-duplicate of sample 96229
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n // wait for polyfill to be loaded\n if (document.readyState == \"complete\") {\n init();\n } else {\n window.onload = init;\n }\n\n var loggedIn = false;\n\n function init() {\n if (!navigator.id)\n r...
javascript
edit
0
3
mit
392d4e2c4a4abbcf4aa05ad2554b163a821f7d9a
sickill/chrome-browserid
js/agent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2014, Renasar Technologies Inc.\n/* jshint node:true */\n\n'use strict';\n\ndescribe(__filename, function () {\n it('needs specs');\n});\n```\n\nApply this change: Add lookup service tests for ip to mac" }, { "ro...
javascript
edit
0
3
apache-2.0
4a6e5be03eec92df7a19e56fb3f97035fa516734
YoussB/on-core,YoussB/on-core
spec/lib/services/lookup-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs');\nvar through = require('through2');\nvar consolify = require('consolify');\n\n\nmodule.exports = function (b, opts) {\n consolify(b, {\n bundle: opts.bundle\n });\n\n function appl...
javascript
edit
0
2
mit
6fcdedcfce8460b174bb7b3c44282998cb867c7c
mantoni/mochify.js,boneskull/mochify.js,jhytonen/mochify.js,jhytonen/mochify.js,Swaagie/mochify.js,mantoni/mochify.js,boneskull/mochify.js,mantoni/mochify.js,Swaagie/mochify.js
lib/consolify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports.compile = compile\n\nvar hb = require('handlebars')\nvar marky = require('marky-markdown')\nvar fs = require('fs')\n\nfunction compile (page, partials) {\n var markybars = hb.create()\n var pageContent = fs.readFileSync...
javascript
edit
0
1
isc
113c43942cca2535079e6041d4b625676b8b2a66
feross/standard-www,feross/standard-www
lib/markybars.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function( $ ) {\n\tfunction setHeaderHeight() {\n\t\t$( '#screen-fill' ).css( 'height', $( window ).height() - 50 );\n\t}\n\n\t$( document ).ready( setHeaderHeight );\n\t$( window ).resize( setHeaderHeight );\n\t$( window ).scroll( fun...
javascript
edit
0
3
mit
d09838f37b7fbf7fc31fb662353a98233157ffd7
Automattic/socket.io-website,davidcelis/socket.io-website,davidcelis/socket.io-website,Automattic/socket.io-website,Automattic/socket.io-website
js/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Phaser from 'phaser-ce';\nimport { tissueColor, bacteriaColor } from './constants';\n\nexport default class TutorialState extends Phaser.State {\n\n bacteria = null;\n\n preload() {\n this.game.load.image('bacteria',...
javascript
edit
0
1
mit
1455be74c9839c3da35a54793babbe84140e2250
marc1404/WreckSam,marc1404/WreckSam
src/game/TutorialState.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: :construction: Add self-executing anonymous function to put it all in." }, { "role": "assistant", "content": "/* Diaeresis.js | Copyright (C) 2016 Curiositry (http://curiositry.com) | MIT Licensed */\n(function(){\n\n})();\n"...
javascript
new_file
0
1
mit
33bcb755e5b68e97f65cd63664a82219c2297015
curiositry/diaeresis,curiositry/diaeresis
diaeresis.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function buildConfig(name, relPath, destPath, root) {\n return `\nvar loaders = require('../config/webpack.loaders.js');\nvar HtmlWebpackPlugin = require('html-webpack-plugin');\n\nmodule.exports = {\n plugins: [\n ...
javascript
edit
0
1
bsd-3-clause
7bdd7b1475ce5bf53711f688fe027f555a60f129
Kitware/vtk-js,Kitware/vtk-js,Kitware/vtk-js,Kitware/vtk-js
Utilities/ExampleRunner/template-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport DraftailEditor, { BLOCK_TYPE, INLINE_STYLE } from '../lib';\n\nimport allContentState from './utils/allContentState';\n\nconst mount = document.querySelector('[data...
javascript
edit
0
1
mit
7bebf6268b47c2520daa41327ddd268f133404d0
springload/draftail,springload/draftail,springload/draftail,springload/draftail
examples/all.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * RequireJS configuration\n * @description Pass in options for RequireJS like paths, shims or the baseUrl\n */\nrequire.config({\n\tpaths: {\n\t\t\"mainModule\" : \"Modules/Main\"\n\t},\n\n\t// Append a date on each requested scri...
javascript
edit
0
1
mit
bcc70e0d4ed383c3731a65db4fbd5ae67d95c845
t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template
Resources/Private/Javascripts/Main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//////////////////////////////////////\n// User buys one ticket for himself //\n//////////////////////////////////////\n\n'use strict';\n\nvar Promise = require('bluebird');\n\nmodule.exports = function (db, config) {\n var logger ...
javascript
edit
0
2
mit
44a2826d08a44f0494e86469cd6632e7f9ff071f
buckutt/BuckUTT-pay,buckutt/BuckUTT-pay,buckutt/BuckUTT-pay
app/controllers/sell/successTransaction.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require vendor\n//= require app\n//= require_tree ./lib\n//= require_tree ./app/controllers\n//= require_tree ./app/helpers\n//= require_tree ./app/models\n//= require sponsors\n//= require_tree ./sponsors\n\n\n```\n\nApply this cha...
javascript
edit
0
0
mit
f78fb6622ecc2204573326790eb5bdd254206580
0xCCD/travis-ci,0xCCD/travis-ci
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express'),\n router = express.Router(),\n passport = require('passport'),\n User = require('../models/user');\n\nrouter.get('/', function(req, res, next) {\n res.redirect('/user');\n});\n\n// AUT...
javascript
edit
0
2
mit
dd96f8db06a1b3303336fb963993a5b0657c3700
tymeart/mojibox,tymeart/mojibox
routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or v...
javascript
edit
0
1
mit
573253b7f5fca0a4e19111a07044bdb1caa59f45
hackedu/website,zachlatta/website,zachlatta/website,zachlatta/website,hackedu/website,hackedu/website
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 75147
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar thenify = require('thenify')\nvar fs = require('fs')\nvar writeFile = thenify(fs.writeFile)\n\nmodule.exports = function save (pkg, installedPackages, saveType, useExactVersion) {\n var packageJson = pkg.pkg\n packageJson[saveType...
javascript
edit
0
2
mit
79e238a34ccaf320ac339c7c9812cc1f006c7155
andreypopp/pnpm,pnpm/supi,pnpm/supi,pnpm/pnpm,andreypopp/pnpm,rstacruz/pnpm,rstacruz/pnpm,rstacruz/pnpm,pnpm/pnpm,pnpm/pnpm,pnpm/supi,andreypopp/pnpm
lib/save.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n var mds = angular.module('mds', [ 'motech-dashboard', 'mds.services',\n 'mds.controllers', 'mds.directives', 'mds.utils', 'ui.directives']);\n\n $.ajax({\n url: '../mds/avai...
javascript
edit
0
1
bsd-3-clause
876760cb0761d0b3954d24cbb1d7c0838a49ff9c
pgesek/motech,wstrzelczyk/motech,sebbrudzinski/motech,wstrzelczyk/motech,ngraczewski/motech,koshalt/motech,jefeweisen/motech,smalecki/motech,justin-hayes/motech,adamkalmus/motech,shubhambeehyv/motech,ngraczewski/motech,LukSkarDev/motech,tstalka/motech,smalecki/motech,justin-hayes/motech,tectronics/motech,kmadej/motech,...
platform/mds/mds-web/src/main/resources/webapp/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport SelectValues from 'hospitalrun/utils/select-values';\nexport default Ember.Component.extend({\n name: 'select-or-typeahead',\n className: null,\n hint: true,\n label: null,\n list: null,\n option...
javascript
edit
0
7
mit
2c45fb05fae5aed1e2f11b8ed3fe91056b88cbf9
HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend,HospitalRun/hospitalrun-frontend
app/components/select-or-typeahead.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar value = require('es5-ext/lib/Object/valid-value')\n , emit = require('./core').methods.emit;\n\nmodule.exports = function (emitter1, emitter2) {\n\tvalue(emitter1) && value(emitter2);\n\n\temitter1.emit = function...
javascript
edit
0
3
mit
be73ae321a6449596acc75e8d7987abdf659bc99
snowyu/events-ex.js,icebob/event-emitter,medikoo/event-emitter
lib/pipe.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Recipe = function(data){\n this.title = data.Title;\n this.stars = data.StarRating;\n this.imageUrl = data.ImageURL\n}\n\nfunction BigOvenRecipeSearchJson(query) {\n var allRecipes = [];\n var noImageLink = \"http://redirect.bi...
javascript
edit
0
2
mit
56560c7eb8f5f5278f38b415b9565e74350ea1a2
nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves-2015/line-cook,danasselin/line-cook,danasselin/line-cook,danasselin/line-cook,danasselin/line-cook,danasselin/line-cook,danasselin/line-cook,nyc-rock-doves-2015/line-cook,nyc-rock-doves...
workshop/www/js/recipe.js
rejected_duplicate
Near-duplicate of sample 81824
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar spawn = require('child_process').spawn;\nvar dotenv = require('./dot-env');\nvar objectAssign = require('object-assign');\n\nmodule.exports = function exec(script) {\n\n\t// Grab the command section of the entered command\n\tvar com...
javascript
edit
0
3
mit
2e15ab28e8ae50fc53ef71cc0283ac2f8e9b22fc
mr47/run-on
lib/exec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * exit\n * https://github.com/cowboy/node-exit\n *\n * Copyright (c) 2013 \"Cowboy\" Ben Alman\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = function exit(exitCode, streams) {\n if (!streams) { stre...
javascript
edit
0
2
mit
8b9b539bae31a49442361ae3f69a8be15f44882e
cowboy/node-exit
lib/exit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n\nangular.module('core').controller('HomeController', ['$scope', '$http', 'Authentication', 'Users',\n\tfunction($scope, $http, Authentication, Users) {\n\t\t// This provides Authentication context.\n\t\t$scope.authenti...
javascript
edit
0
2
mit
a8609d63bb4ad116904be74aa9f1b66f676ae294
sevazhidkov/angular-test-app,sevazhidkov/angular-test-app,sevazhidkov/angular-test-app
public/modules/core/controllers/home.client.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport Realm from 'realm';\n\n/**\n * A Report.\n *\n * @property {string} id\n * @property {string} type\n * @property {string} ...
javascript
edit
0
2
mit
f7bb7dff415e0652a0e8b95b0f311bacfd5b481c
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/database/DataTypes/Report.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\n/* @flow */\n\nimport {Disposable} from 'atom'\nimport {Main} from './main'\nimport type {Provider} from './types'\n\nmodule.exports = {\n config: {\n\n },\n activate() {\n this.instance = new Main()\n },\n deacti...
javascript
edit
null
null
mit
2ccf293d75528d21e97e22a6a7ba95d0305370bf
steelbrain/declarations
lib/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n;(function(exports) {\n function Entities(coquette, game) {\n this.c = coquette;\n this.game = game;\n this._entities = [];\n };\n\n Entities.prototype = {\n update: function(interval) {\n var entities = this.all();\...
javascript
edit
0
4
mit
129a40482844c3968d6d387b4648d70944732b9d
maryrosecook/coquette,maryrosecook/coquette,matthewsimo/coquette,matthewsimo/coquette,cdosborn/coquette,cdosborn/coquette
src/entities.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('../css/main.scss');\n\nimport grindy from \"./grindy.js\"\n\n(function() {\n\n let game = grindy();\n game.start();\n\n})()\n\n```\n\nApply this change: Use of already installed file-loader :) ... we can use import also for \...
javascript
edit
null
null
mit
bb7162a886b4ed17caab08228e504cf09fdb5da2
Vorgnr/Grindy,Vorgnr/Grindy
src/js/index.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "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 * File extension to MIME type map.\n *\n * Used by `serve.js` when streaming files from disk.\n */\nthis.contentTypes = {\n \"css\": \"t...
javascript
edit
0
0
bsd-3-clause
61c9d6ed8df1a57a53406492989829f7bf8feca3
reid/onyx,reid/onyx
lib/mime.js
rejected_duplicate
Near-duplicate of sample 103720
true