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\nvar Invoice = DS.Model.extend({\n\n tax: DS.attr('number'),\n invoice_number: DS.attr('number', {default: new Date()}),\n issued: DS.attr('date'),\n items: DS.hasMany('InvoiceItem', {inverse: 'invoice'}),\n customer: DS.belongsTo('...
javascript
edit
0
1
mit
883d9150ff88580088c4e9309ce757e1ae644a48
dierbro/ember-invoice
app/models/invoice.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nintroJs()\n .start()\n .onexit(function() {\n window.location = \"../../newtab/newtab.html\";\n })\n .oncomplete(function() {\n window.location = \"../../newtab/newtab.html\";\n });\n\n```\n\nApply this change: Make framework...
javascript
edit
0
3
mit
39be5efe238d9f02172de94f5b2341d4f6c268b1
matankb/one-main-thing,matankb/one-main-thing
tour/js/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst webpack = require(\"webpack\");\nconst path = require(\"path\");\nconst ExtractTextPlugin = require(\"extract-text-webpack-plugin\");\n\nmodule.exports = {\n context: path.resolve(\"./src\"),\n\n entry: {\...
javascript
edit
0
0
mit
ef4183056f83a74e7a5b1d1ec3b7e84cf1db1016
dongrenguang/netease-music-juke-box,dongrenguang/netease-music-juke-box
webpack.config.js
rejected_duplicate
Near-duplicate of sample 82525
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar path = require('path');\n\nmodule.exports = {\n\tcontext: __dirname + \"/app\",\n\tentry: \"./index.js\",\n\n\toutput: {\n\t\tpath: __dirname + '/bin',\n\t\tpublicPath: \"/\",\n\t\tfilename: 'bundl...
javascript
edit
0
0
mit
587f270587a96a7c57dd63e356ab77c7f53050b6
oliverbenns/pong,oliverbenns/pong
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n\n document.addEventListener('mousedown', function (event) {\n if (event.target && event.target.className.indexOf('ripple') !== -1) {\n let $div = document.createElement('div'),\n btnRect = event.target.g...
javascript
edit
0
5
mit
6bf5b70bac76062aebe35c1951a23590710f902c
NOtherDev/whatwebcando,NOtherDev/whatwebcando,NOtherDev/whatwebcando
app/scripts/ripple.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\n\nmodule.exports = {\n entry: {\n app: './src/js/app.jsx',\n vendors: ['react', 'react-dom', 'react-router', 'redux', 'redux-thunk', 'es6-promise-polyfill']\n },\n output: {\n path: './publ...
javascript
edit
0
0
mit
0dfb53801e15e2c1458b12948fa58fd68226169d
Crevax/Charon,Crevax/Charon
webpack.config.js
rejected_duplicate
Near-duplicate of sample 86818
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar program = require('commander');\nvar path = require('path');\nvar os = require('os');\nvar appDir = path.resolve(os.tmpDir(), 'cartridge');\n\nvar newCommand = require('./commands/new')(appDir);\nvar pkg ...
javascript
edit
0
2
mit
92cf4c6e1cb942eae7b1909d7cf7fc1e9f99770e
code-computerlove/slate-cli,cartridge/cartridge-cli,code-computerlove/quarry
bin/programBuiider.js
rejected_duplicate
Near-duplicate of sample 97964
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst animationPage = require('./animation');\nconst peoplePage = require('./people');\nconst trayPage = require('./tray');\nconst {Button, NavigationView, Page, ui} = require('tabris');\n\nconst MARGIN = 8;\n\nlet navigationView = new ...
javascript
edit
0
1
bsd-3-clause
5fcc7e0276755354d656754763ed72a58668b667
eclipsesource/tabris-js,eclipsesource/tabris-js,eclipsesource/tabris-js
examples/animation/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require tolk/prototype.js\n//= require tolk/controls.js\n//= require tolk/dragdrop.js\n//= require tolk/effects.js\n\n```\n\nApply this change: Reorder assets to remove a js warning" }, { "role": "assistant", "content": ...
javascript
edit
0
0
mit
600c6ef9bae8b99e9c973cd69e1c6654463206d8
joe-bader/tolk,rdunlop/tolk,MyMedsAndMe/tolk,tolk/tolk,munirent/tolk,munirent/tolk,rdunlop/tolk,tolk/tolk,rdunlop/tolk,joe-bader/tolk,MyMedsAndMe/tolk,MyMedsAndMe/tolk,tolk/tolk
app/assets/javascripts/tolk/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Banner from './Banner';\nimport { Link } from 'react-router';\n\nexport default () => (\n <Banner>\n <Banner.Element background='green'>BETA</Banner.Element>\n <Banner.Element background='blue'>...
javascript
edit
0
1
mit
c0b708e8ee9e9bff3d04d89530a2b85c6c1a1f19
City-of-Helsinki/helerm-ui,City-of-Helsinki/helerm-ui,City-of-Helsinki/helerm-ui
src/components/Banner/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar webpack = require('webpack');\nvar config = require('./webpack.config.base.js');\n\nif (process.env.NODE_ENV !== 'test') {\n config.entry = [\n 'webpack-dev-server/client?http://localhost:3000',\n 'webpack/ho...
javascript
edit
0
0
mit
10956319bf96e6c3dafdcd736acdfa0609722982
srn/react-webpack-boilerplate,srn/react-webpack-boilerplate
webpack.config.development.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nprocess.env.BABEL_ENV = 'development';\nprocess.env.NODE_ENV = 'development';\n\nconst WebpackServe = require('webpack-serve');\nconst config = require('../config/webpack.config.base');\n\nfunction createDevServer() {\n return WebpackS...
javascript
edit
0
1
mit
f4d799725b97d135ad84b3b8811bf1e11376068f
kevindantas/create-landing-page,kevindantas/create-landing-page,kevindantas/create-landing-page
packages/landing-scripts/scripts/start.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet backtrace = document.querySelector(\".Flow-Debug-Exception-Backtrace-Code\");\nlet localStorageItemIdentifier = 'Flow-Debug-Exception-Backtrace-Code-Open';\n\nif (window.localStorage.getItem(localStorageItemIdentifier) === \"true\")...
javascript
edit
0
2
mit
05703ddb5f47b7f35d57fd2c1b60a3d3cda6d39c
kdambekalns/flow-development-collection,fcool/flow-development-collection,fcool/flow-development-collection,kdambekalns/flow-development-collection,robertlemke/flow-development-collection,robertlemke/flow-development-collection,robertlemke/flow-development-collection,kdambekalns/flow-development-collection,neos/flow-de...
Neos.Flow/Resources/Public/Error/Exception.js
rejected_duplicate
Near-duplicate of sample 83573
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n title: 'Form radio group',\n status: 'wip',\n context: {\n setup: {\n initScript: 'var $blockLabels = $(\".gv-c-form-custom input[type=\\'radio\\'], .gv-c-form-custom input[type=\\'checkbox\\']\"); new GO...
javascript
edit
0
0
mit
fc857c74d2fe8ce384157b46fb1c78b685e7dcc0
alphagov/govuk_frontend_alpha,alphagov/govuk_frontend_alpha,alphagov/govuk_frontend_alpha
src/components/form-radio-group/form-radio-group.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (shipit) {\n require('shipit-deploy')(shipit);\n\n shipit.initConfig({\n default: {\n workspace: 'tmp',\n deployTo: '/var/api/abcdef',\n deployTo: '/var/www/fussball-react',\n repositor...
javascript
edit
0
1
mit
dffc8f86258e42c3e98609457f382a5e9b191e4b
sping/abcd-epic-fussball,sping/abcd-epic-fussball,sping/abcd-epic-fussball
app/web/shipitfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nregisterAction(function (node) {\n if (!settings[\"fixNames\"]) return;\n node = node || document.body;\n\n toArray(node.querySelectorAll(\".content > .l_profile, .lbody > .l_profile, .name > .l_profile, .foaf > .l_profile\"))\...
javascript
edit
0
3
mit
6ead56f0cc7c82d7ecab9a41a0e36d2502005e57
davidmz/friendfeed-and-co,davidmz/friendfeed-and-co
actions/norm-names.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n environment: environment,\n baseURL: '/dashboard',\n locationType: 'auto',\n EmberENV: {\n FEATURES: {\n // Here you can enable...
javascript
edit
0
3
apache-2.0
3e1e12ba28b69e94ea876b12ca0c5dbb53188879
with-regard/regard-website
config/environment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst service = require('feathers-mongoose');\nconst user-lesson-tokens = require('./user-lesson-tokens-model');\nconst hooks = require('./hooks');\n\nmodule.exports = function() {\n const app = this;\n\n const option...
javascript
edit
0
1
mit
c5c931dee3909ad81812a2e754ca248e4e89254c
tum-ase-33/rest-server
src/services/user-lesson-tokens/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Controller from 'ember-controller';\nimport $ from 'jquery';\n\nexport default Controller.extend({\n calculatePosition(trigger, content) {\n let { top, left, width, height } = trigger.getBoundingClientRect();\n let { heigh...
javascript
edit
0
1
mit
e33bb6ddd1929b2fcbe08f435ae0f5e1949f5263
cibernox/ember-basic-dropdown,cibernox/ember-basic-dropdown,cibernox/ember-basic-dropdown,cibernox/ember-basic-dropdown
tests/dummy/app/templates/snippets/custom-position-1-js.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require(\"http\");\n\nfunction HttpServer(config) {\n this.port = config.port || 8181;\n this.address = config.address || \"localhost\";\n this.options = {\n data: null,\n resCode: 200\n };\n}\n\nHttpServer.prototyp...
javascript
edit
0
3
apache-2.0
41cd00659205461d30551878d03ef81c1d407c6c
mesosphere/marathon-ui,cribalik/marathon-ui,mesosphere/marathon-ui,cribalik/marathon-ui
src/test/helpers/HttpServer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Add app view\n */\n\nvar _ = require('underscore');\nvar Backbone = require('backbone');\n\nvar templates = require('../../dist/');\n\nvar App = require('../../models/app');\n\nmodule.exports = Backbone.View.extend({\n\n tagNam...
javascript
edit
0
2
mit
669eba40338eb8ed5dd908e616a2b2e183f80a76
lukkari/web,lukkari/web
app/source/manage/views/apps/add.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport axios from 'axios'\n\nlet links\n\nexport default async function AJAX({\n url,\n resource,\n id,\n method = 'GET',\n data = {},\n params = {},\n headers = {},\n}) {\n try {\n const basepath = window.basepath || ''\n ...
javascript
edit
0
6
mit
006b3af4e90bb34e0857916513d39efaff545bb5
mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,li-ang/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,li-ang/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,...
ui/src/utils/ajax.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar EOL = require('os').EOL;\n\nmodule.exports = {\n name: 'ember-cli-mocha',\n\n normalizeEntityName: function() {\n // this prevents an error when the entityName is\n // not specified (since that doesn't actually matter\n /...
javascript
edit
0
2
apache-2.0
763d9302711b0e3c6d3d9762d23faf8b632f4661
ember-cli/ember-cli-mocha,blimmer/ember-cli-mocha,switchfly/ember-cli-mocha,trentmwillis/ember-cli-mocha,trentmwillis/ember-cli-mocha,blimmer/ember-cli-mocha,ember-cli/ember-cli-mocha,switchfly/ember-cli-mocha
blueprints/ember-cli-mocha/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default from 'codemirror';\n\nimport 'codemirror/lib/codemirror.css';\nimport 'codemirror/addon/hint/show-hint.css';\nimport 'codemirror/addon/hint/show-hint';\nimport 'codemirror/addon/comment/comment';\nimport 'codemirror/addon...
javascript
edit
0
0
mit
72e2a1967dfa0919afba7cc6a4fec5af39ac45a4
buildkite/frontend,buildkite/frontend
app/components/user/graphql/codemirror.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ncore.controller('RegistrationController', function ($controller, $location, $scope, $timeout, AlertService, RestApi) {\n\t\n angular.extend(this, $controller('AbstractController', {$scope: $scope}));\n \n $scope.registration = ...
javascript
edit
0
2
mit
3c32c2a446036dab674e76d6dad038b6e298bd22
TAMULib/Weaver-UI-Core,TAMULib/Weaver-UI-Core
app/controllers/registrationController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n\"use strict\";\n\ndescribe('Login component', () => {\n let element = undefined;\n let $rootScope = undefined;\n let $compile = undefined;\n let tpl = angular.element(`\n<monad-login>\n <h1>logged in</h1>\n</monad-logi...
javascript
edit
0
3
mit
1c4211b1db275151a03c85ecf113d0e3e9065097
monomelodies/monad,monomelodies/monad
tests/components/login.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require(\"react\");\nvar Router = require('react-router');\nvar App = require(\"./components/App\");\nvar WallView = require(\"./components/WallView/WallView\");\nvar NotFoundView = require(\"./components/NotFoundView/NotFou...
javascript
edit
0
1
mit
446e4f4e0c8a88c01e4c505ed92c828d4c005d63
ekeric13/pinterest-wall,ekeric13/pinterest-wall
client/app/starter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Realm from 'realm';\n\nexport class InsurancePolicy extends Realm.Object {\n get policyNumber() {\n return `${this.policyNumberPerson} ${this.policyNumberFamily}`;\n }\n}\n\nInsurancePolicy.schema = {\n name: 'InsurancePoli...
javascript
edit
0
1
mit
dddbb3b7d2627d69e5e772c08ed7f09721dc3535
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/database/DataTypes/InsurancePolicy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst paths = require('./paths');\r\nconst utils = require('../build/utils');\r\nconst vueLoaderConfig = require('../build/vue-loader.conf');\r\nconst FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin');\r\n\r\nmodule.expor...
javascript
edit
0
0
mit
69bbf0975a443f49dc4bdeaa834a2f8b3845e1e6
tuelsch/bolg,tuelsch/bolg
config/base.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Turn off age gate on Amazon.co.jp\n// @namespace curipha\n// @description Click \"I'm over 18\" automatically\n// @include https://www.amazon.co.jp/gp/product/*\n// @include ht...
javascript
edit
0
3
unlicense
10bdeb786f87ecf54183123bff4d332ceb9567cb
curipha/userscripts,curipha/userscripts
turn_off_age_gate_on_amazon.co.jp.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet {setExamSubmitting, setDirty, isUnsubmitted} =\n require('../examSubmission.js');\n\ntest('check set exam submitting', () => {\n expect(setExamSubmitting()).toBe(true);\n});\n\ntest('check set dirty', () => {\n expect(setDirty(...
javascript
edit
0
1
apache-2.0
30077cecea82fddbbc6d2751846f081ef56f0452
googleinterns/step254-2020,googleinterns/step254-2020,googleinterns/step254-2020
src/main/webapp/test/examSubmission.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// Like Lodash merge() but faster and does not mutate input\nconst deepMerge = function (objA, objB, ...objects) {\n if (objects.length > 0) {\n const newObjA = deepMerge(objA, objB);\n return deepMerge(newObjA, ...
javascript
edit
0
4
apache-2.0
2526ff69c061e96dbcd255c9361e5cd1bee369f3
autoserver-org/autoserver,autoserver-org/autoserver
src/utilities/functional/merge.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n rootURL: '/',\n locationType: 'auto',\n EmberENV: {\n FEATURES: {\n // ...
javascript
edit
0
4
mit
33b1d0e5137075635249c6c63a82bb1f05745042
kpfefferle/liquid-fire-reveal,kpfefferle/liquid-fire-reveal
tests/dummy/config/environment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jslint browser: true, undef: true *//*global Ext*/\nExt.define('SlateAdmin.store.people.UserClasses', {\n extend: 'Ext.data.Store',\n requires: [\n 'SlateAdmin.proxy.API'\n ],\n\n idProperty: 'value',\n fields: [...
javascript
edit
0
0
mit
c7cbfb331af99cae7460d54ad3f99597a2b437f8
SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin
sencha-workspace/SlateAdmin/app/store/people/UserClasses.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njest.mock('../../../models/meeting');\nconst { toggleRegistration } = require('../meeting');\nconst { getActiveGenfors, toggleRegistrationStatus } = require('../../../models/meeting');\nconst { generateSocket, generateGenfors } = requir...
javascript
edit
0
1
mit
0f4c4b7c8e7b3d4bbb214e1a91ca5081113be2b7
dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta
server/channels/admin/__tests__/meeting.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (navigator.userAgent.indexOf('Android') >= 0) {\n\tlog = console.log.bind(console)\n\n\tlog(\"Android detected\")\n\texports.core.vendor = \"google\"\n\texports.core.device = 2\n\texports.core.os = \"android\"\n\n\texports.core.keyCo...
javascript
edit
0
1
mit
3e83a5606d57ac25b194f93fe602adee185d6418
pureqml/qmlcore,pureqml/qmlcore,pureqml/qmlcore
platform/android/.core.js
rejected_duplicate
Near-duplicate of sample 74905
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('myApp')\n.controller('UserCtrl', ['userService', '$scope', '$rootScope', 'ctrlPanelService',\n function(userService, $scope, $rootScope, ctrlPanelService) {\n\n \t// initialize data\n \t$scope.users = ctrlPanelService.us...
javascript
edit
0
1
mit
4ed42119f5b556dc8fa1e8cfdc7e49fe9f5ea357
godspeedyoo/Breeze-Mapper,godspeedyoo/Breeze-Mapper,godspeedyoo/Breeze-Mapper
app/assets/javascripts/ng-app/controllers/user-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { Listener } = require('discord-akairo');\n\nclass MessageReactionAddListener extends Listener {\n\tconstructor() {\n\t\tsuper('messageReactionAdd', {\n\t\t\teventName: 'messageReactionAdd',\n\t\t\temitter: 'client',\n\t\t\tcatego...
javascript
edit
0
3
mit
36c0faf7b51eb701770b205b7d45c092b8489b2a
1Computer1/hoshi
src/listeners/client/messageReactionAdd.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPromiseAllSync = {\n extend: function(PromiseClass) {\n var emptyPromise = PromiseClass.resolve || PromiseClass.when;\n PromiseClass.allSync = function(collection, fn, unfn) {\n var stack = [];\n return collection.reduc...
javascript
edit
0
2
mit
cba85310e545fb0c6b3c052893cadbffb45c4788
deckar01/PromiseAllSync
PromiseAllSync.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nvar shimmer = require('shimmer')\nvar asyncState = require('../../async-state')\n\nvar SERVER_FNS = ['on', 'addListener']\n\nmodule.exports = function (http, client) {\n client.logger.trace('shimming http.Server.prototy...
javascript
edit
0
3
bsd-2-clause
aee68fef5987d4a5451876a0289947ce6ac6e5ff
opbeat/opbeat-node,opbeat/opbeat-node
lib/instrumentation/modules/http.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function (require) {\n\n return function (seriesType, ecModel) {\n ecModel.eachSeriesByType(seriesType, function (seriesModel) {\n var data = seriesModel.getData();\n var coordSys = seriesModel.coo...
javascript
edit
0
4
apache-2.0
4fce75775ca238eeab9d2b726a090579f4196f3a
apache/incubator-echarts,chenfwind/echarts,ecomfe/echarts,100star/echarts,100star/echarts,ecomfe/echarts,chenfwind/echarts,apache/incubator-echarts
src/layout/points.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nAFRAME.registerComponent('death-listener', {\n schema: {\n characterId: {default: undefined}\n },\n\n init: function () {\n const el = this.el;\n const data = this.data;\n window.addEventListener('characterDestroyed', func...
javascript
edit
0
4
mit
176519847555a6b4eb5ed9858b56580b516bdbb7
ourvrisrealerthanyours/tanks,elliotaplant/tanks,elliotaplant/tanks,ourvrisrealerthanyours/tanks
client/aframeComponents/death-listener.js
rejected_duplicate
Near-duplicate of sample 86548
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createStore, applyMiddleware, compose } from 'redux';\nimport { reduxReactRouter } from 'redux-router';\nimport thunk from 'redux-thunk';\nimport createHistory from 'history/lib/createBrowserHistory';\nimport routes from '../ro...
javascript
edit
0
2
mit
7c10b216fab5b1000464ee481873d48dad59ffb4
benjaminhoffman/Encompass,benjaminhoffman/Encompass,benjaminhoffman/Encompass
server/frontend/store/configureStore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports.in = function(_msg) {\n if (_msg.properties.contentType === 'application/json') {\n try {\n return JSON.parse(_msg.content.toString());\n } catch(e) {}\n }\n\n return _msg.content.toString();\n};\n\nmodule....
javascript
edit
0
3
mit
e1fe5a876ab104f5396f9ba3533943cbe8f53e52
dial-once/node-bunnymq
lib/helpers/message-parsers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('app.controllers')\n .controller('HomeController', ['$scope', '$state', 'fileModel', 'imageModel', function HomeController($scope, $state, fileModel, imageModel) {\n \n // private\n va...
javascript
edit
0
3
mit
83a23a7183bdb68a71468965508be5bd64877c23
SamVerschueren/imagery,SamVerschueren/selfie-wall,SamVerschueren/selfie-wall,SamVerschueren/imagery
src/app/controllers/HomeController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function bars (data, x, y) {\n x = x || 'x'\n y = y || 'y'\n\n return {\n type: 'vegalite',\n data: {\n values: data\n },\n mark: 'bar',\n encoding: {\n x: {\n field: x,\n type: '...
javascript
edit
0
3
apache-2.0
b530a17c0d730f586dd44708d04d6c825fcb475b
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
src/js-context/functions/plot/bars.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\n\nimport './SocialLink.css';\n\nclass SocialLink extends Component {\n\n static propTypes = {\n name: PropTypes.string.isRequired,\n url: PropTypes.string.isRequired,\n ico...
javascript
edit
0
2
mit
14585d45e2d732cb5b20da0fc60dec615772feee
cooperka/personal-website,cooperka/personal-website
src/components/SocialLink/SocialLink.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { combineReducers } from \"redux\";\n\nimport { JOB_START, JOB_CREATED } from \"./actions\";\n\nfunction views(state = {}, action) {\n switch (action.type) {\n\n case JOB_START:\n let views = {};\n\n ...
javascript
edit
0
3
apache-2.0
2baf7a841755723c8e922b34c03b7ea8d0a98a4f
juttle/juttle-client-library,juttle/juttle-client-library
src/view/reducers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Assert = require('assert');\nconst Child = require('child_process');\nconst Fs = require('fs');\nconst Path = require('path');\n\nvar packagePath = Path.join(process.cwd(), 'package.json');\nvar out = Object.prototype, keys = [];\...
javascript
edit
0
2
mit
2e673c353c93832c3ac61fd7c9f370386f29159e
jackboberg/knock-knock,onmodulus/knock-knock
lib/knock-knock.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport SelectPickerMixin from 'ember-cli-select-picker/mixins/select-picker';\n\nvar I18nProps = (Ember.I18n && Ember.I18n.TranslateableProperties) || {};\n\nvar SelectPickerComponent = Ember.Component.extend...
javascript
edit
0
4
mit
f73ef8d6468960012c4971cdf91c2c8fee6cc51b
sukima/ember-cli-select-picker,sukima/ember-cli-select-picker
app/components/select-picker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nrequire('js-yaml');\nmodule.exports = function(grunt, options) {\n var cwd = process.cwd();\n\n var defaults = {\n configPath: path.join(cwd, 'grunt'),\n init: true\n };\n\n options = grunt.util._....
javascript
edit
0
7
mit
f2e8cf8a4c9eac21222a1a66225399e90af61f78
schmod/load-grunt-config,SolomoN-ua/load-grunt-config,firstandthird/load-grunt-config,SolomoN-ua/load-grunt-config,firstandthird/load-grunt-config
lib/load-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Backbone = require('backbone');\nvar BusinessModel = Backbone.Model.extend({\n\tidAttribute: 'id',\n\tparse: function(data) {\n var hash = {};\n hash.name = data.name;\n hash.id = data.id;\n ...
javascript
edit
0
5
mit
2cf94c1093147559e581c3c7e161261018c63521
Localhost3000/along-the-way
app/js/models/business-model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint camelcase: 0 */\nconst { get, merge, pickBy } = require('lodash')\n\nconst { transformInteractionResponseToForm } = require('../transformers')\nconst { transformDateStringToDateObject } = require('../../transformers')\nconst {...
javascript
edit
0
1
mit
b42288d77f8908a4ded960548e1b8f54311882d3
uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2
src/apps/interactions/controllers/edit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function(require) {\n\n var test = require('../../../test')\n\n test.assert(require('./missing/missing').bogus === null, 'return null when module file is 404')\n test.assert(require('./nested/b/c/d').foo() === 1, 'nested modul...
javascript
edit
0
1
mit
13cc35a9c5c4dad333e1f8b8d6dfc5be02510899
judastree/seajs,lovelykobe/seajs,ysxlinux/seajs,jishichang/seajs,coolyhx/seajs,angelLYK/seajs,zwh6611/seajs,uestcNaldo/seajs,twoubt/seajs,zaoli/seajs,LzhElite/seajs,FrankElean/SeaJS,Lyfme/seajs,wenber/seajs,lee-my/seajs,kuier/seajs,moccen/seajs,PUSEN/seajs,yern/seajs,treejames/seajs,twoubt/seajs,eleanors/SeaJS,zwh6611/...
tests/specs/module/path-resolve/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Class for drawing elements in canvas\n * @param {object} canvasElem handler of canvas\n*/\nvar CanvasScreen = function ( canvasElem ) {\n const SIZE = 40; //size of square\n let ctx = canvasElem.getContext( \"2d\" ),\n ...
javascript
edit
0
2
mit
29905f1312d3ea4cc498f9718ed253f02d1e1c00
Ziken/Tetris,Ziken/Tetris
js/CanvasScreen.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport { IFrame } from './iframe';\n\nexport default {\n Component: IFrame,\n title: 'Components|Preview/Iframe',\n};\n\nconst style = { width: '100%', height: '500px' };\n\nexport const workingStory = ()...
javascript
edit
0
1
mit
085c2840110381f83bbc9792c1cd10252e7dc04e
kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,kadirahq/react-storybook
lib/components/src/preview/iframe.stories.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { Card } from 'native-base';\nimport CardImageHeader from '../../common/card-image-header/cardImageHeader';\nimport SimpleCardBody from '../../common/simple-card-body/simpleCardBody';\n\...
javascript
edit
0
1
mit
540eedcc66307842341a5fe963b500882e8ecbec
justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client
js/components/developer/choose-job-type-screen/jobTypeCard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// simple script to advertise a MDNS service for local API\n// TODO(mc, 2017-10-31): remove this file once API can advertise for itself\nconst bonjour = require('bonjour')()\n\nconsole.log('Publishing local MDNS service for API')\n\ncon...
javascript
edit
0
1
apache-2.0
03fc387d87c3313e4e4cf027bace3d16598d9ee4
OpenTrons/opentrons-api,OpenTrons/opentrons-api,Opentrons/labware,OpenTrons/opentrons-api,OpenTrons/opentrons-api,OpenTrons/opentrons_sdk,OpenTrons/opentrons-api
app/scripts/advertise-local-api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs')\nconst path = require('path')\nconst chalk = require('chalk')\nconst emojify = require('node-emoji').emojify\nconst program = require('commander')\nconst getConfig = require('lingui-conf').default\nconst plurals...
javascript
edit
0
2
mit
0f598fbea8060615a8ff07e1e130cb1c8777a2d1
lingui/js-lingui,lingui/js-lingui
packages/lingui-cli/src/lingui-add-locale.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nTemplate.lottoAdd.created = function() {\n Session.set('lottoAddErrors', {});\n};\nTemplate.lottoAdd.rendered = function() {\n this.find('input[name=date]').valueAsDate = new Date();\n};\n\nTemplate.lottoAdd.helpers({\n errorMessage:...
javascript
edit
0
3
mit
103ae46c7fb9251fccfca39e0ae345e9c1fce9f6
jujaga/ice-lotto-meteor,charlieman/ice-lotto-meteor,charlieman/ice-lotto-meteor,jujaga/ice-lotto-meteor
client/views/lotto/lotto_add.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst express = require('express');\nconst router = express.Router();\nconst bodyParser = require('body-parser');\nconst request = require('request');\nconst models = require('../../db/models');\n\nmodule.exports.getAll =...
javascript
edit
0
3
mit
058de9719a38b6392952aadb13272c4efd54293b
FuriousFridges/FuriousFridges,FuriousFridges/FuriousFridges
server/controllers/cityinfo.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n $('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');\n $('.tree li.parent_li > span').on('click', function (e) {\n var children = $(this).parent('li.parent_li'...
javascript
edit
0
2
apache-2.0
b467204d7433eeb982de659a5222b93f9115e964
pyfarm/pyfarm-master,pyfarm/pyfarm-master,pyfarm/pyfarm-master
pyfarm/master/static/js/bootstrap-tree.js
rejected_duplicate
Near-duplicate of sample 81064
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2019 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'foam.u2.view',\n name: 'StrategizerChoiceView',\n extends: 'foam.u2.view.Choic...
javascript
edit
0
1
apache-2.0
9dcda4391d5be5d6a4a4b81373ec257c3944f456
foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm
src/foam/u2/view/StrategizerChoiceView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint es3: false, esnext: true */\n/* global jasmine, beforeEach, describe, it, expect, module, inject */\n\n(function () {\n\n var helpers = window._helpers = window._helpers || {};\n\n helpers.testModuleDependencies = functi...
javascript
edit
0
2
mit
6a5207d0c5765a1d958e93db79545b494a142729
incuna/angular-user-management,incuna/angular-user-management
tests/helpers/test-module-dependencies.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { IconWarningBadgedMediumOutline } from '@teamleader/ui-icons';\n\nimport { Dialog, Box, TextBody } from '../..';\n\nexport default {\n component: Dialog,\n title: 'Dialog',\n};\n\nexport const Main ...
javascript
edit
0
1
mit
9811554e696601d38943f01bd0cf681ba3bfedc1
teamleadercrm/teamleader-ui
src/components/dialog/dialog.stories.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PureComponent from '../components/purecomponent.react';\n\nimport ProductImage from './product-image.react';\n\nexport default class ProductTile extends PureComponent {\n render() {\n const title =...
javascript
edit
0
1
mit
486b3f995e3ca9b8583809d86eec919a12bcbd13
lassecapel/este-isomorphic-app
src/client/products/product-tile.react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (angular) {\r\n \r\n 'use strict';\r\n \r\n angular.module('birdyard.users')\r\n \r\n .factory('presenceService', ['$q', 'firebaseService', \r\n\r\n function ($q, firebaseService) {\r\n \r\n // Private\r\n \r\n...
javascript
edit
0
2
mit
3369358f466ba1edcf270c7c9808c73c660e7445
birdyard/birdyard,bebopchat/bebop,robotnoises/bebop,bebopchat/bebop,birdyard/birdyard,robotnoises/bebop
src/modules/user/services/presence-svc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport buildFormatLongFn from '../../../_lib/buildFormatLongFn/index.js'\n\nvar dateFormats = {\n full: 'EEEE, d MMMM yyyy',\n long: 'd MMMM yyyy',\n medium: 'd MMM yyyy',\n short: 'dd/MM/yyyy'\n}\n\nvar timeFormats = {\n full: 'HH...
javascript
edit
0
0
mit
c00042ddf46c4c2ef2b24bc28861445961c3be98
date-fns/date-fns,date-fns/date-fns,date-fns/date-fns
src/locale/en-AU/_lib/formatLong/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst KMSProvider = require('../../providers/kms');\n\n/**\n * AWS-SDK gives out weirdly formatted keys, so make them\n * consistent with formatting across the rest of Tokend\n *\n * @param {Object} obj\n * @returns {Ob...
javascript
edit
0
4
mit
ff6a1d88d17e1db4754ab4c4c5f0ba13f89fffd8
rapid7/tokend,rapid7/tokend,rapid7/tokend
lib/control/v1/kms.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Resolver from 'ember/resolver';\nimport config from '../../config/environment';\n\nconst resolver = Resolver.create();\n\nresolver.namespace = {\n modulePrefix: config.modulePrefix,\n podModulePrefix: config.podModulePrefix\n};...
javascript
edit
0
0
mit
5555b40cb3979223489376e01b742aeb36685244
softlayer/sl-ember-behavior,softlayer/sl-ember-behavior,SpikedKira/sl-ember-behavior,SpikedKira/sl-ember-behavior,notmessenger/sl-ember-behavior,notmessenger/sl-ember-behavior
tests/helpers/resolver.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n(function() {\n angular.module('ncsaas')\n .service('invoicesService', ['baseServiceClass', '$http', 'ENV', '$state', invoicesService]);\n\n function invoicesService(baseServiceClass, $http, ENV, $state) {\...
javascript
edit
0
1
mit
ea8286318fa319bb6b5b4f01a9b134e5ad22bd2c
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/services/invoices-service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Meteor } from 'meteor/meteor'\nimport { render } from 'react-dom'\nimport { createStore } from 'redux'\n\nimport { renderRoutes } from './routes.jsx'\nimport withProvider from '../both/withProvider'\nimport mainReducer from '.....
javascript
edit
0
1
mit
66b978b2ea8476aebec071ee9c2c56465a86bf8d
LuisLoureiro/placard-wrapper
imports/startup/client/index.js
rejected_duplicate
Near-duplicate of sample 71243
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar mongoose = require('mongoose');\n\n/**\n * Define a visit model:\n *\t-\n */\n\nvar VisitSchema = mongoose.Schema({\n visitor_id: String,\n session_id: String,\n\tdomain_id: String,\n host: String,\n ref...
javascript
edit
0
0
mit
8f6b5b8247af23fc3190e0a71d5507ceeac7fe4a
Sextant-WDB/sextant-ng
models/visit-model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n(function() {\n angular.module('ncsaas')\n .service('paymentsService', ['baseServiceClass', paymentsService]);\n\n function paymentsService(baseServiceClass) {\n /*jshint validthis: true */\n var ServiceClass...
javascript
edit
0
1
mit
d9414d4f976e54e4385860430d2205576684cbb2
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/services/payments-service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('mwUI.Form')\n .config(function(mwValidationMessagesProvider){\n mwValidationMessagesProvider.registerValidator(\n 'customValidation',\n 'mwErrorMessages.invalidInput'\n );\n })\n\n .directive('mwCustom...
javascript
edit
0
5
apache-2.0
3cee68679bb3fa8aa31e452aad766ac3e7c89967
mwaylabs/uikit,mwaylabs/uikit,mwaylabs/uikit
src/mw-form/directives/validators/mw_custom_error_validator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\n'use strict';\n\nmodule.exports = {\n normalizeEntityName() {},\n\n afterInstall() {\n let pkg = require('../../package.json');\n\n return this.addPackageToProject('jquery-datetimepicker', pkg.devDependenc...
javascript
edit
0
1
mit
770878186419573c2287d957a1fa8510cdf1fe92
kellyselden/ember-datetimepicker,kellyselden/ember-datetimepicker
blueprints/ember-datetimepicker/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n 'circle': {\n 'radius': 'r',\n 'x': 'cx',\n 'y': 'cy'\n }\n};\n```\n\nApply this change: Make Attribute Map a white-list" }, { "role": "assistant", "content": "/*\n This acts as both a way to no...
javascript
edit
0
0
mit
28cd2e42ed7461c4713148b4f32b96f62d31abab
taras/e3,RavelLaw/e3,MattMSumner/e3,taras/e3,elwayman02/e3,asennikov/e3,sly7-7/e3,asennikov/e3,elwayman02/e3,RavelLaw/e3,sly7-7/e3,MattMSumner/e3
addon/utils/shadow/types/svg-attribute-map.js
rejected_duplicate
Near-duplicate of sample 72132
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { isHaiku } = require('./validateHaiku');\n\nclass ChannelProcessor {\n constructor(channelID) {\n this.channelID = channelID;\n this.messages = [];\n this.onHaiku = () => {};\n }\n\n processMessage(newMessage) {\n ...
javascript
edit
0
4
mit
21bc56622f1d9eb7845592defe9777e6ae7d6ffa
bumblepie/haikubot
discord-client/src/channelProcessor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Component from 'ember-forge-ui/components/ef-nav';\n\n/**\n * @module\n * @augments ember-forge-ui/components/ef-nav\n */\nexport default Component.extend({\n\n // ----------------------------------------------------------------...
javascript
edit
0
1
mit
f342efe16718bfc2bf253e3433506c60850c6087
ember-forge/ember-forge-ui-bootstrap4,ember-forge/ember-forge-ui-bootstrap4
addon/components/ef-nav.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst BaseStep = require('./base-step');\n\nmodule.exports = class WhitelistChoice extends BaseStep {\n start(state, install) {\n return new Promise((resolve, reject) => {\n this.subscriptions.add(install.on('d...
javascript
edit
0
1
bsd-3-clause
7f84f3ddebe8728537f3e6be4765222970842172
kiteco/kite-installer
lib/install/whitelist-choice.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n\n\tshowAlertDialog: function(options, callback) {\n\t\tsetTimeout(function() {\n\t\t\tif (navigator.notification && navigator.notification.alert) {\n\t\t\t\tnavigator.notification.alert(\n\t\t\t\t\toptions.message,\...
javascript
edit
0
6
mit
e2b573dc2c6251eb131cecfe92f1fe81b2a4574b
aitnasser/touchstonejs,electronspin/touchstonejs,noikiy/touchstonejs,aitnasser/touchstonejs,wmyers/touchstonejs,sebmck/touchstonejs,KeKs0r/touchstonejs,frederickfogerty/touchstonejs,KeKs0r/touchstonejs,kittens/touchstonejs,electronspin/touchstonejs,touchstonejs/touchstonejs,lzhengms/touchstonejs,noikiy/touchstonejs,fre...
lib/mixins/Dialogs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar keystone = require('keystone'),\n\tTypes = keystone.Field.Types;\n\n// Create model. Additional options allow menu name to be used what auto-generating URLs\nvar MailingList = new keystone.List('Mailing List', {\n\tautokey: { path: ...
javascript
edit
0
0
mit
44d59f05d01232b9bbddd57848d38225b1354289
autoboxer/MARE,autoboxer/MARE
models/MailingList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { Simulate } from 'react-addons-test-utils';\nimport Checkbox from '../../../../src/components/checkbox.jsx';\nimport toggleableTests from '../toggleable/base.spec.js...
javascript
edit
0
1
mit
ec7ae3a9bbccc4a3ed247ea56e6c333af3fa8031
NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet
tests/unit/components/checkbox/base.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar sidebar = require('npm-documentation-pagelet').sidebar;\n\n//\n// Add some different styling to the sidebar to make it a table of contents.\n//\nmodule.exports = sidebar.extend({\n css: [\n sidebar.prototype.css...
javascript
edit
0
0
mit
1ae73ee2a3d5388db5c0b45f5f95db3ce246048e
nodejitsu/browsenpm.org,warehouseai/browsenpm.org
pagelets/toc/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Karma configuration\n// http://karma-runner.github.io/0.10/config/configuration-file.html\n\nmodule.exports = function(config) {\n config.set({\n // base path, that will be used to resolve files and exclude\n basePath: '',\n\n...
javascript
edit
0
1
apache-2.0
84dc49850c6a1f26f7ea9446dce309b734c0e036
despairblue/scegratoo3,despairblue/scegratoo3,despairblue/scegratoo3
karma-e2e.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from \"react\";\nimport cx from 'classNames';\n\n/**\n * Simple Card component that wraps a div around content with card styling.\n */\nconst Card = ({ children, ...props }) => {\n return <div styleName={cx(...
javascript
edit
0
1
mit
035222ba06f4da0b66a2f8d824a148a57fba2177
Magneticmagnum/react-atlas,DigitalRiver/react-atlas
packages/react-atlas-core/src/card/Card.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar os = require('os');\nvar path = require('path');\nvar paths = require('./paths');\n\n// Guess proxy defined in the env\n/*jshint camelcase: false*/\nvar proxy = process.env.HTTP_PROXY\n || process.env.http_proxy\n || null;\n\n...
javascript
edit
0
0
mit
a0caa73cfeb7346022b0e98fa127fb245fc6b975
adriaanthomas/config,pdxjohnny/config,moni220670/config
lib/util/defaults.js
rejected_duplicate
Near-duplicate of sample 81702
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n initHeartAnimation();\n initSubscribeForm();\n});\n\nfunction scrollToAnchor(element) {\n $('html,body').animate({scrollTop: $(element).offset().top}, 'slow');\n}\n\nfunction toggleMobileMenu(element) {\n $('#mobile...
javascript
edit
0
1
mit
11ae6e95b3215ec2e2c2a7dc4557f73704b3d29e
borwahs/natalieandrob.com,borwahs/natalieandrob.com
client/javascripts/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Node = require('../node');\nvar debug = require('../../util/debug')('analysis:georeference-country');\n\nvar TYPE = 'georeference-country';\nvar PARAMS = {\n source: Node.PARAM.NODE(Node.GEOMETRY.ANY),\n count...
javascript
edit
0
1
bsd-3-clause
4e08d4a9c7f4fec6cd40bd184af49dce3e65829a
CartoDB/camshaft
lib/node/nodes/georeference-country.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport '../../public/dist/styles/main.css'\nimport React from 'react'\nimport ReactDOM from 'react-dom'\nimport { Provider } from 'react-redux'\nimport store from './store'\nimport Root from './containers/Root'\nimport { addLocaleData }...
javascript
edit
0
1
mit
aee581308ac27fcd8360e6f2d935afcea75abe9f
digibib/ls.ext,digibib/ls.ext,digibib/ls.ext,digibib/ls.ext
redef/patron-client/src/frontend/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nvar N3 = require('../N3');\nvar fs = require('fs'),\n assert = require('assert');\n\nif (process.argv.length !== 3)\n return console.error('Usage: N3Parser-perf.js filename');\n\nvar filename = process.argv[2];\...
javascript
edit
0
2
mit
6bd86735696307bbe1130f1b6ec8a30ae4d245a7
warpr/n3,ahmadassaf/N3.js
perf/N3Parser-perf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint esversion:6, node:true*/\n'use strict';\n\nconst extend = require('gextend');\n\nvar DEFAULTS = {\n middleware: require('./middleware')\n};\n\nmodule.exports = function(options){\n\n return {\n init: function(conte...
javascript
edit
0
2
mit
ba5001e23855bae3a9c67f5f06a35adda52cdaee
goliatone/core.io-express-server,goliatone/core.io-express-server,goliatone/core.io-express-server
lib/defaultApp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport shortid from 'shortid';\nimport styled, { keyframes } from 'styled-components';\n\nconst stagger = keyframes`\n to {\n opacity: 1;\n transform: translateY(0%...
javascript
edit
0
1
mit
dcad43185911ba3d17f818ef533186a34fbd12c5
theshaune/react-animated-typography-experiments,theshaune/react-animated-typography-experiments
src/components/MotionTypography.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\ngoog.provide('urlbuilder');\n\ngoog.require('urlbuilder.Controller');\n\nurlbuilder.init = function()\n{\n var controller = new urlbuilder.Controller();\n controller.init();\n};\n\n```\n\nApply this change: Add entry point for any b...
javascript
edit
0
1
mit
3e6f916ed3021326d37568d0aff48fd17144cda5
4lbertoC/uribuilder,4lbertoC/uribuilder
scripts/urlbuilder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar bytes = require('bytes');\nvar tpb = require('thepiratebay');\ntpb.setUrl('http://thepiratebay.la');\n\nmodule.exports = function (program, query, done) {\n program.log.debug('tpb: searching for %s', query);\n\n t...
javascript
edit
0
2
mit
32989c866fd815e6a132ccc202f56e117efed028
Gobie/tor
plugins/search/providers/tpb.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar funcs = require('./funcs.js')\n\nmodule.exports = function (dist, release) {\n var contents = funcs.replace(header, {dist: dist, release: release}) + '\\n\\n' +\n funcs.replace(pkgs, {pkgs: funcs.generatePkgStr(commonPkgs)})\n\n...
javascript
edit
0
1
mit
b785c69f19178344d2c707ae1f87c3a0f2d0b540
nodesource/docker-node
dockerfiles/debian-base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport webpack from 'webpack';\nimport path from 'path';\nimport CopyWebpackPlugin from 'copy-webpack-plugin';\nimport autoprefixer from 'autoprefixer';\n\nimport loaders from './webpack.loaders';\nimport config from './config';\n\ncons...
javascript
edit
0
1
mit
158469b33337468deb4de93e0c91099c0b0a88ec
AdamSalma/Lurka,AdamSalma/Lurka
config/webpack.dev.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nbrowser.on(\"init\", function () {\r\n \"use strict\";\r\n\r\n // Show the refresh button\r\n this.showRefresh = () => {\r\n this.stopButton.classList.remove(\"stopButton\");\r\n this.stopButton.classList.add(\"r...
javascript
edit
0
2
mit
2f996c0074f7df969f94ffde92bb1eb83191b709
shaunstanislaus/JSBrowser,haj/JSBrowser,WebAppsAndFrameworks/JSBrowser,lastout5/lastout5,goofwear/JSBrowser,gnanam336/JSBrowser,amitla/JSBrowser,Wagnerp/JSBrowser,LagunaJS/JSBrowser,shaunstanislaus/JSBrowser,Jericho25/JSBrowser,cpsloal/JSBrowser,jackalchen/JSBrowser,SpotLabsNET/JSBrowser,Mosoc/JSBrowser,WebAppsAndFrame...
UWPWebBrowser/js/components/navigation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * TestFixture for browser options WebUI testing.\n * @ex...
javascript
edit
0
1
bsd-3-clause
3b93b2391455dd1dcf36f891256a0a37f4ecb6c2
TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,mogoweb/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,ondra-novak/chromium.src,nacl-webkit/chrome_deps,ondra-novak/chromium.src,littlstar/chr...
chrome/browser/ui/webui/options2/browser_options2_browsertest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function(appModule) {\n appModule.config(function($stateProvider, $locationProvider) {\n 'ngInject';\n\n $stateProvider\n .state({\n name: 'stopwatch',\n url: '/stopwatch',\n component: 'a...
javascript
edit
0
1
mit
6cd213a6d70af30e166181879edd04eb8aab0da8
JavierPDev/AudioTime,JavierPDev/AudioTime
src/app/app.routes.js
accepted
null
true