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 keystone = require('../../../');\nvar session = require('../../../lib/session');\n\nmodule.exports = function (req, res) {\n\tsession.signout(req, res, function () {\n\t\tif (typeof keystone.get('signout redirect') === 'string') {\n...
javascript
edit
0
3
mit
8192938a9d5028a772f150965f97b9f9d3fe3be1
rafmsou/keystone,frontyard/keystone,joerter/keystone,andrewlinfoot/keystone,cermati/keystone,Pop-Code/keystone,linhanyang/keystone,dryna/keystone-twoje-urodziny,ONode/keystone,joerter/keystone,qwales1/keystone,ratecity/keystone,xyzteam2016/keystone,michaelerobertsjr/keystone,jstockwin/keystone,suryagh/keystone,danielma...
admin/server/routes/signout.js
rejected_duplicate
Near-duplicate of sample 86530
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Controller to bring functionality for the modal.\n *\n * @author Claire Wilgar\n */\n\n/**\n * Module export of controller function.\n *\n * @ngInject\n * @param {angular.Service} $scope\n * @param {angular.Service} $mdDialog\n ...
javascript
edit
0
3
mit
2c9dc54e90aff065be59fa970975b33edc497e53
clairebones/stockkeeper,clairebones/stockkeeper
src/scripts/formController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n// All actions, used by actions or reducers, go here\n\nexport const CLOSE_CARD = 'CLOSE_CARD'\nexport const LOAD_CARD_PAGE = 'LOAD_CARD_PAGE'\nexport const NAVIGATE = 'NAVIGATE'\nexport const OPEN_CARD = 'OPEN_CARD'\n\nexport const R...
javascript
edit
0
0
mit
21898f01d9ee9559e7d5413f6e96ab65ff2f02b1
bengler/imdikator,bengler/imdikator
actions/actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { PLUGIN_TYPE } from 'rotonde-plugin';\n\nexport const TYPE = PLUGIN_TYPE.ISOMORPHIC;\nexport { default as ChatClientPlugin } from './client';\nexport { default as ChatServerPlugin } from './server';\n\n```\n\nApply this change: ...
javascript
edit
0
0
mit
5cd9024bbc121cdcd3590d84cc5e3bb9e6efde64
merveilles/Rotonde,merveilles/Rotonde
packages/rotonde-plugin-chat/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Vue from 'vue'\nimport distanceInWords from 'date-fns/distance_in_words'\n\nexport default new Vue({\n data: {\n locale: 'en',\n loadedLocale: 'en',\n locales: {},\n now: new Date(),\n },\n created () {\n setInt...
javascript
edit
0
3
mit
0011f6d4c08e2b5992e8329b5a60291c72144bf9
yunity/karrot-frontend,yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/foodsaving-frontend,yunity/karrot-frontend,yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/foodsaving-frontend
src/services/dateFnsHelper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n!function(){\n\n window.attachSpinnerEvents = function () {\n\n var spinners = document.querySelectorAll('.toggle-spinner'),\n i = spinners.length;\n\n while (i--) {\n console.log('Attaching spinners');\n var s = s...
javascript
edit
0
2
mit
591d4366c43173fa4d0490a1325a3eef25f95c48
Distrotech/fries,lilien1010/fries,wleopar-d/Fires,lilien1010/fries,jaunesarmiento/fries,eyecatchup/fries,wleopar-d/Fires,ao-forks/fries,ao-forks/fries,lilien1010/fries,jaunesarmiento/fries,wleopar-d/Fires
lib/js/spinners.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* See license.txt for terms of usage */\n\n\"use strict\";\n\nconst { Trace, TraceError } = require(\"../core/trace.js\").get(module.id);\nconst { once } = require(\"sdk/dom/events.js\");\nconst { getMostRecentBrowserWindow } = require...
javascript
edit
0
2
bsd-3-clause
4e1b1049d2b07d625a5473fbde365987f69bf5ab
vlajos/firebug.next,firebug/firebug.next,bmdeveloper/firebug.next,firebug/firebug.next,bmdeveloper/firebug.next,vlajos/firebug.next
lib/core/window.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'meteortesting:mocha',\n summary: 'Run Meteor package or app tests with Mocha',\n git: 'https://github.com/meteortesting/meteor-mocha.git',\n documentation: '../README.md',\n version: '0.5.1',\n testOnly...
javascript
edit
0
1
mit
0f160ecadb5487f42f540eeb038197f924d25647
DispatchMe/meteor-mocha,meteortesting/meteor-mocha,meteortesting/meteor-mocha,DispatchMe/meteor-mocha,meteortesting/meteor-mocha,DispatchMe/meteor-mocha
package/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nmodule.exports = function(sequelize, DataTypes) {\n var Task = sequelize.define(\"Task\", {\n taskID: { type: DataTypes.INTEGER, autoIncrement: true, primaryKey: true },\n name: { type: DataTypes....
javascript
edit
0
1
mit
7e4b602f830308cb8c0d2c1c066c9254b42dd87a
sirgraystar/diddleplan,sirgraystar/diddleplan
app/models/task.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar env = process.env.NODE_ENV || 'development'\n , config = require('../config/config')[env]\n , nodemailer = require('nodemailer')\n ;\n\nvar transporter = nodemailer.createTransport({\n host: process.env.EMAIL_HOST || config.EM...
javascript
edit
0
0
mit
c555183ef8f7a70ed4f9d1d8128e3aba50be937a
open-austin/mybuildingdoesntrecycle,open-austin/mybuildingdoesntrecycle,open-austin/mybuildingdoesntrecycle
lib/transporter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Game(){\n this.$track = $('#racetrack');\n}\n\nfunction Player(id){\n this.player = $('.player')[id - 1];\n this.position = 10;\n}\n\nPlayer.prototype.move = function(){\n this.position += 10;\n};\n\nPlayer.prototype.update...
javascript
edit
0
3
mit
0468f019b6c040b978d6aae55dea27ec22a85cb7
SputterPuttRedux/basic-javascript-racer,SputterPuttRedux/basic-javascript-racer
assets/js/racer.js
rejected_duplicate
Near-duplicate of sample 71981
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n beforeModel: function(transition) {\n var win = window.open('/github_login', 'Authorization',\n 'width=1000,height=450,' +\n ...
javascript
edit
0
5
apache-2.0
b4b7fd4f7353c92587b55afc7ad593787575fe09
withoutboats/crates.io,Gankro/crates.io,steveklabnik/crates.io,chenxizhang/crates.io,mbrubeck/crates.io,Gankro/crates.io,steveklabnik/crates.io,BlakeWilliams/crates.io,rust-lang/crates.io,achanda/crates.io,chenxizhang/crates.io,withoutboats/crates.io,achanda/crates.io,sfackler/crates.io,BlakeWilliams/crates.io,Gankro/c...
app/routes/login.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n // TODO: This should likely be a directive, something like nih-navbar once\n // we have profiles to link to\n\n /* ngInject */\n function NavbarController($scope, $timeout, $state, N...
javascript
edit
0
2
apache-2.0
3f0e7f20fcb361418c7cf76c89c034540dec7382
azavea/nih-wayfinding,azavea/nih-wayfinding
src/nih_wayfinding/app/scripts/views/navbar/navbar-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst expect = require('../../helpers/expect');\n\nconst ValidatePlatforms = require('../../../src/utils/validate-platforms');\n\ndescribe('ValidatePlatforms', () => {\n context('when platforms contain valid pla...
javascript
edit
0
1
mit
ed3c2a0de70dd7e96fcb376d2199425f0130809a
isleofcode/splicon
node-tests/unit/utils/validate-platforms-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by Leandro Luque on 24/07/17.\n */\n\n/* JSHint configurations */\n/* jshint esversion: 6 */\n/* jshint -W097 */\n\n'use strict';\n\n// A.\nconst ATTRIBUTE = \"A1\";\n\n// C.\nconst CLASS = \"C1\";\n\n// D.\nconst DEFAUL...
javascript
edit
0
0
mit
929a80bb98e44a2c0f0bd05716d3152d7828e72f
leluque/webdiagrams,leluque/webdiagrams
webdiagrams/uml.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { remote } = require('electron');\nconst path = require('path');\nconst Config = require('electron-config');\n\nconst DEFAULT_BASE_DESTINATION = path.join(remote.app.getPath('videos'), 'YouTube');\n\nconst KEYS = {\n BASE_DESTINA...
javascript
edit
0
2
mit
ff15e37b70578c1eb202773f310879e6451b4e9e
yannbertrand/youtube-dl-gui,yannbertrand/youtube-dl-gui,yannbertrand/youtube-dl-gui
src/storage/storage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction generate_key_pair() {\n generateKeyPair().then(function(key) {\n exportKey(key.privateKey).then(function(exported_private_key) {\n chrome.storage.local.set(\n { exported_private_key: exported_private_key },\n ...
javascript
edit
0
1
bsd-3-clause
cab77f9829497b5557ca33ccea9ae1bd52e5e351
microwaves/autonomous-messages,microwaves/autonomous-messages
options.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n // construct Headroom\n var headroom = new Headroom(document.querySelector(\".js-nvbr\"), {\n \"offset\": Options.navbarOffset,\n \"tolerance\": Options.navbarTolerance\n });\n\n // initialize Headroom\n head...
javascript
edit
0
2
mit
cdf96b8268996f5c4b7eea4fe2077d0b37205d79
acch/XML-to-bootstrap,acch/XML-to-bootstrap
js/navbar.js
rejected_duplicate
Near-duplicate of sample 90331
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global MusicPlayer, Vue */\n(function (global, undefined) {\n 'use strict';\n\n document.addEventListener('DOMContentLoaded', function () {\n var musicPlayer = new MusicPlayer();\n var hasSource = false;\n v...
javascript
edit
0
3
mit
e41da8cb181392a7cc5f7ed4afcfe469f9b3d2b6
kubosho/simple-music-player
scripts/main/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n;(function(){\n angular.module('flockTogether', ['ngRoute'], function($routeProvider, $httpProvider) {\n $routeProvider\n .when('/', {\n templateUrl: 'partials/home.html',\n controller: 'loginCtrl'\n })//EN...
javascript
edit
0
1
mit
575077bf8be2efc2809fa8aa2a77f122f3239396
flock-together/flock-fee,flock-together/flock-fee
src/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Fast and reactive jQuery DataTables using standard Cursors / DataTables API. Supports Bootstrap 3.\",\n version: \"1.0.1\",\n git: \"https://github.com/ephemer/meteor-reactive-datatables.git\"\n});\n\n...
javascript
edit
0
1
mit
f8aa1ab924c19b8bab4be2b9f69b68b70bae6576
rossmartin/meteor-reactive-datatables,ephemer/meteor-reactive-datatables,rossmartin/meteor-reactive-datatables,ephemer/meteor-reactive-datatables
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n\tscripts: {\n\t\tloader: 'browserify',\n\t\tfiles: [\n\t\t\t'public/scripts/main.js'\n\t\t]\n\t},\n\tstyles: {\n\t\tdirectory: 'public/styles'\n\t},\n\tserver: {\n\t\tfiles: [\n\t\t\t'views/**/*.ejs',\n\t\t\t'routes...
javascript
edit
0
0
mit
5a75c19eb69bb3d00ec892e6334fb7e6202c8eb8
hammour/perk,hammour/perk,alarner/perk,alarner/perk
config/build.js
rejected_duplicate
Near-duplicate of sample 77905
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport React, { Component } from 'react';\nimport Quote from './Quote';\n\ntype Props = {\n quotes: Array<Object>,\n approve: number => Promise<*>,\n deleteQuote: number => Promise<*>,\n unapprove: number => Promise<*>,\...
javascript
edit
null
null
mit
61edab4f12e26652f6d53f3456b0b1c75de8faa4
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
app/routes/quotes/components/QuoteList.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nimport React from 'react'\nimport FormSelect from '../../components/form-select'\nimport FormSearch from './form-search'\n\nconst filterFields = [{\n icon: { id: 'date', label: 'Data' },\n label: 'Escolha um mês',\n o...
javascript
edit
0
1
mit
53d364b5d98c7e2d83b7d8c3d5bde46c37615d64
campinas-front-end/institucional,campinas-front-end-meetup/institucional,campinas-front-end-meetup/institucional,campinas-front-end/institucional,frontendbr/eventos
src/js/containers/main-content/header-filter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar util = require('util'),\n path = require('path'),\n jsParser = require('uglify-js').parser,\n compressor = require('uglify-js').uglify,\n\n Asset = require('../Asset'),\n JSAsset = function(settings...
javascript
edit
0
2
mit
033ee79b6e2fd0ff747efab5b42e8a03ff65d92d
2sidedfigure/exstatic
lib/assets/javascript.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Router from '@ember/routing/router';\n\nexport function initialize() {\n const isEmbedded = window !== window.top;\n\n if (isEmbedded) {\n Router.reopen({\n notifyTopFrame: function() {\n window.top.postMessage({...
javascript
edit
0
6
apache-2.0
7c5db77f4b63c60f06cd2f872d09bf83acaf5c7b
westlywright/ui,vincent99/ui,westlywright/ui,rancherio/ui,rancherio/ui,vincent99/ui,rancher/ui,rancher/ui,vincent99/ui,rancherio/ui,westlywright/ui,rancher/ui
app/initializers/route-spy.js
rejected_duplicate
Near-duplicate of sample 80241
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
3fb764521d2f503bf33e667c2ea1b7a524526359
TerrenceLJones/not-bored-tonight,TerrenceLJones/not-bored-tonight
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 71958
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport function initialize(/*application */) {\n Ember.LinkComponent.reopen({\n attributeBindings: ['tooltip', 'data-placement'],\n\n // Set activeParent=true on a {{link-to}} to automatically propag...
javascript
edit
0
7
apache-2.0
542491ba818da8768340464323e9fa38fff268cf
rancher/ui,rancherio/ui,rancherio/ui,vincent99/ui,westlywright/ui,lvuch/ui,rancher/ui,westlywright/ui,lvuch/ui,rancherio/ui,rancher/ui,vincent99/ui,pengjiang80/ui,pengjiang80/ui,lvuch/ui,vincent99/ui,pengjiang80/ui,westlywright/ui
app/initializers/extend-ember-link.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('bootstrap toggle', function() {\n var header;\n beforeEach(function() {\n setFixtures('<li class=\"dropdown\" id=\"menuOrgs\">'+\n '<a class=\"dropdown-toggle\" href=\"#\" data-toggle =\"dropdown\">Orga...
javascript
edit
0
1
mit
85c90d0443f280fe722619a735a9866239e94322
Aleks4ndr/LocalSupport,SergiosLen/LocalSupport,dsbabbar/LocalSupport,Aleks4ndr/LocalSupport,marianmosley/LocalSupport,Aleks4ndr/LocalSupport,Aleks4ndr/LocalSupport,tansaku/LocalSupport,curlygirly/LocalSupport,intfrr/LocalSupport,tansaku/LocalSupport,tansaku/LocalSupport,SergiosLen/LocalSupport,dsbabbar/LocalSupport,dav...
spec/javascripts/bootstrap_toggle_spec.js
rejected_duplicate
Near-duplicate of sample 74543
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar settings = require(\"./settings\");\n\n/*\n * This file defines socket routes for data-transmission to the client-side.\n */\n\n//function initUserSockets(Socket) {\n// Socket[settings.iD] = function (socket, dat...
javascript
edit
0
1
mit
296408107789c142f65f4b6434d85a78a31a51bc
NodeBB-Community/nodebb-grunt,NodeBB-Community/nodebb-grunt
setups/plugin/lib/socketRoutes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n \n var mr = sparks.activities.mr;\n var str = sparks.string;\n \n mr.ActivityDomHelper = {\n ratedResistanceFormId: '#rated_resistance',\n ratedResistanceValueId: '#rated_resistance_value_i...
javascript
edit
0
5
apache-2.0
630e1aefd56854b312b16c2ccd1fcde677a3da00
concord-consortium/sparks,concord-consortium/sparks,concord-consortium/sparks,concord-consortium/sparks,concord-consortium/sparks
activities/measuring-resistance/javascript/activity-dom-helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n\n function random(a,b) {\n return Math.floor(Math.random() * b) + a;\n };\n\n function obfuscateEmail(email) {\n if (!email) return email;\n var re = /^(.*)(@)(.*?)(\\.)(.*)$/;\n\n return email.replace(re, ...
javascript
edit
0
6
mit
5f57ba41403a960278da9e08f71a53fabfb86726
miguelmota/obfuscate-email
obfuscate-email.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar expect = chai.expect;\n\ndescribe('StatusCtrl', function(){\n \n});\n\n```\n\nApply this change: [CHORE] Initialize StatusCtrl and add basic tests\n\nTest that private functions and functions on $scope are present" ...
javascript
edit
0
1
isc
2e28dec3d91379b4bc7ed93d854fe5d1e080495e
bankonme/ripple-client-desktop,dncohen/ripple-client-desktop,MatthewPhinney/ripple-client,ripple/ripple-client,xdv/ripple-client-desktop,h0vhannes/ripple-client,ripple/ripple-client,wangbibo/ripple-client,MatthewPhinney/ripple-client,thics/ripple-client-desktop,resilience-me/DEPRICATED_ripple-client,xdv/ripple-client,r...
test/unit/controllers/statusControllerSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('jquery');\nvar CoreView = require('backbone/core-view');\nvar iconTemplates = {};\n\nvar importAllIconTemplates = function () {\n var templates = require.context('./templates', false, /\\.tpl$/);\n\n templates.keys()....
javascript
edit
0
4
bsd-3-clause
6fd9db13f5e52651029d18615fd24359898865d5
CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb
lib/assets/core/javascripts/cartodb3/components/icon/icon-view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(window, karma) {\n window.should = window.chai.should();\n window.expect = window.chai.expect;\n window.assert = window.chai.assert;\n\n var chaiConfig = karma.config.chai;\n if (chaiConfig) {\n for (var key in chaiCon...
javascript
edit
0
4
mit
39a23c72bc6c082a69c8aa61abfc6b83cb267c28
kmees/karma-sinon-chai
chai-adapter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n*\n* InputSearchLi\n*\n*/\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport styles from './styles.scss';\n\nfunction InputSearchLi({ onClick, isAdding, item }) {\n const icon = isAdding ? 'fa-plus' : 'fa-m...
javascript
edit
0
4
mit
22a7e91036fb1556edeb638610631f49a38efdcb
wistityhq/strapi,wistityhq/strapi
packages/strapi-plugin-users-permissions/admin/src/components/InputSearchLi/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction generate_board_page(that, board_id){\n /* Generate the board page */\n\n // Gets the node of board page\n var bp_node = that.nodeById('board_page');\n\n // Make a serverCall to gets lists and cards related\n // t...
javascript
edit
0
3
mit
5e9bea97acb8948f41b5f3d007ccc250dab13e51
mkshid/genrello,mkshid/genrello,mkshid/genrello
packages/base/resources/js/main_page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * TemplateLayout Wef plugin\n * Copyright (c) 2011 Pablo Escalada\n * MIT Licensed\n */\n\n//requires: cssParser\n//exports: templateLayout\n(function () {\n var templateLayout = {\n name:\"templateLayout\",\n ver...
javascript
edit
0
1
mit
61a3ac70939314548f8e3d31a2de6124cc72cce1
diesire/wef,diesire/wef,diesire/wef
plugins/templateLayout/src/templateLayout.wef.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst leancloudHeaders = require('leancloud-cors-headers');\n\nmodule.exports = function() {\n return function(req, res, next) {\n res.setHeader('Access-Control-Allow-Origin', req.headers.origin || '*');\n\n if (req.method.toLowe...
javascript
edit
0
3
mit
53c000c7c048f8a8ccbd66415f94f7d079598961
leancloud/leanengine-node-sdk,sdjcw/leanengine-node-sdk
middleware/cors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction rewireLess (config, env, lessLoaderOptions = {}) {\n const lessExtension = /\\.less$/;\n\n const fileLoader = config.module.rules\n .find(rule => rule.loader && rule.loader.endsWith('/file-loader/index.js'));\n fileLoader...
javascript
edit
0
2
mit
d5f48fe6281e63f60ffd1c9737d6f04bb58c2d70
timarney/react-app-rewired,timarney/react-app-rewired
packages/react-app-rewire-less/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function (require, exports, module) {\n 'use strict';\n\n function CodeWriter(indentString) {\n this.lines = [];\n this.indentString = (indentString ? indentString : ' ');\n this.indentations = [];\n }\n\n CodeWrite...
javascript
edit
0
2
mit
4c44ced323cd3efba9b6590ceaa99e3915cf9f69
meisyal/staruml-ruby
code-generator-utils.js
rejected_duplicate
Near-duplicate of sample 74318
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.BattleFormatsData = {\n\tkangaskhanmega: {\n\t\trandomBattleMoves: [\"fakeout\",\"return\",\"suckerpunch\",\"earthquake\",\"poweruppunch\",\"crunch\"],\n\t\trandomDoubleBattleMoves: [\"fakeout\",\"return\",\"suckerpunch\",\"eart...
javascript
edit
0
0
mit
2dfa337cd2ccaf9bdd98c47c99b5180846285e57
lFernanl/Mudkip-Server,MayukhKundu/Technogear,MayukhKundu/Pokemon-Domain,yashagl/pokemon-showdown,TheManwithskills/DS,yashagl/pokemon,MayukhKundu/Flame-Savior,yashagl/yash-showdown,SkyeTheFemaleSylveon/Mudkip-Server,MayukhKundu/Flame-Savior,MayukhKundu/Technogear-Final,MayukhKundu/Mudkip-Server,MayukhKundu/Pokemon-Doma...
mods/lowtierrandom/formats-data.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n $('.log-btn').click(function(){\n\t$('.log-status').addClass('wrong-entry');\n $('.alert').fadeIn(500);\n setTimeout( \"$('.alert').fadeOut(1500);\",3000 );\n });\n $('.form-control')...
javascript
edit
0
2
apache-2.0
60e6634acab3e41f3cee688b9379e21040763254
KalenWessel/lockandkey,KalenWessel/lockandkey,KalenWessel/lockandkey
public/js/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport AdvancedSelect, {\n propTypes as advancedSelectPropTypes\n} from \"components/advancedSelectWidget/AdvancedSelect\"\nimport { AdvancedSingleSelectOverlayTable } from \"components/advancedSelectWidget/AdvancedSelectOverlayTable\"...
javascript
edit
0
3
mit
04ad49650b7aca55d03a7a90097a038d6195345a
NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet,NCI-Agency/anet
client/src/components/advancedSelectWidget/AdvancedSingleSelect.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar link = document.getElementsByClassName('octicon-link')[0],\n path = document.location.pathname,\n details,\n login,\n url;\n\nif (m = path.match(/^\\/([\\w-]+)\\??.*?/)) {\n login = m[1].trim();\n if (-1 === ['time...
javascript
edit
0
2
mit
7bc420a4da3b05819b57737b37d1fc8bae6f729b
coderstats/fxt_coderstats
coderstats/data/coderstats.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nconst Form = ({fields, handleChange, handleSubmit, submitValue, message}) => {\n const formFields = fields.map(field => {\n return (\n <div>\n <label>{field.label} </label>\n <input ty...
javascript
edit
0
1
mit
361ae111b35cc261cfad3f1b37477b93dc15cbda
kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed
client/src/components/Form.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport sanitizeHtml from 'sanitize-html';\nimport { Utils } from '../modules';\nimport { throwError } from './errors.js';\n\nUtils.sanitizeAllowedTags = [\n 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote', 'p', 'a', 'ul',\n 'ol', 'nl...
javascript
edit
0
3
mit
2087652170835f7542746d81f2e693738dce1210
Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2
packages/vulcan-lib/lib/server/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n model(params) {\n let node = this.modelFor('nodes.detail');\n this.store.adapterFor('draft-registration').set('namespace', 'v2/nodes/' + node.id);\n ...
javascript
edit
0
1
apache-2.0
47e8d2692ea40a3a8d31433f53ac530c8bea85cf
chrisseto/ember-osf,binoculars/ember-osf,jamescdavis/ember-osf,cwilli34/ember-osf,hmoco/ember-osf,baylee-d/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,hmoco/ember-osf,cwilli34/ember-osf,pattisdr/ember-osf,CenterForOpenScience/ember-osf,binoculars/ember-osf,pattisdr/ember-osf,jamescdavis/ember-osf,crcres...
tests/dummy/app/routes/nodes/detail/draft-registrations/detail.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { moduleForComponent, test } from 'ember-qunit';\nimport hbs from 'htmlbars-inline-precompile';\n\nmoduleForComponent('maintenance-banner', 'Integration | Component | maintenance banner', {\n integration: true\n});\n\ntest('it r...
javascript
edit
0
1
apache-2.0
d19531fe58474652b45f133fcc8cf34724c6e965
jamescdavis/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,binoculars/ember-osf,jamescdavis/ember-osf,CenterForOpenScience/ember-osf,baylee-d/ember-osf,binoculars/ember-osf
tests/integration/components/maintenance-banner/component-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Route } from 'react-router';\n\nimport App from 'containers/App';\nimport HomePage from 'containers/HomePage';\nimport LoginPage from 'containers/LoginPage';\nimport UserReservationsPage from 'contai...
javascript
edit
0
3
mit
8c0c4f4f3016cca574878c27be9ecbeebc4e844d
fastmonkeys/respa-ui
app/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar defaults = require('./defaults.json'),\n _ = require('lodash'),\n path = require('path'),\n fs = require('fs'),\n mkpath = require('mkpath'),\n home = process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'],\n conf...
javascript
edit
0
2
mit
664d631ff80e2d1adf29138cb0ccfbb3c3412155
YaManicKill/ymklogue,YaManicKill/ymklogue
src/config/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component} from \"react\";\nimport RaisedButton from \"material-ui/RaisedButton\";\n\nconst styles = {\n button: {\n margin: 12,\n },\n}\n\nclass Home extends Component {\n render() {\n return (\n <div class...
javascript
edit
0
1
isc
05056d99ade4e113419db11c4897fd1157774d81
gnkatchmar/new-gkatchmar,gnkatchmar/new-gkatchmar
src/Home.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar path = require('path');\nvar yaml_config = require('node-yaml-config');\nvar _ = require('lodash');\n\nfunction ymlHerokuConfigModule() {\n\n var HEROKU_VARS_SUPPORT = [\n 'user', 'password', 'url', 'pipeline', 'jobs', 'key', ...
javascript
edit
0
7
mit
a54ad382cdfa461d705e0d8c469a793680b71d3b
birgitta410/monart,artwise/artwise,birgitta410/monart,birgitta410/monart,artwise/artwise,artwise/artwise
server/ymlHerokuConfig.js
rejected_duplicate
Near-duplicate of sample 78048
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Fragment, PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport theme from './theme.css';\n\nclass Link extends PureComponent {\n render() {\n const { children, clas...
javascript
edit
0
6
mit
82ab743f3c119e1036151c7a68d506c35bd6396e
teamleadercrm/teamleader-ui
components/link/Link.js
rejected_duplicate
Near-duplicate of sample 74319
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PropTypes from 'prop-types'\nimport EditableLabel from 'components/widgets/EditableLabel'\n\nimport {Title, LaneHeader, RightContent } from 'styles/Base'\nimport LaneMenu from './LaneHeader/LaneMenu'\n\...
javascript
edit
0
4
mit
db7c53d359e9bc56fcddea038e0dc7acb1cdaffb
rcdexta/react-trello,rcdexta/react-trello
src/components/Lane/LaneHeader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njQuery(function($) {\n $('.setting .js-save-on-change').each(function () {\n var $field = $(this);\n $field.closest('.setting').data('old', $field.val());\n });\n\n\t$(document).on('change', '.js-save-on-change', fun...
javascript
edit
0
2
mit
68f2a223588cf0be920427ca4f39124a063d0a30
fluxbb/core,fluxbb/core
public/js/admin.js
rejected_duplicate
Near-duplicate of sample 82147
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2018 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.GENMODEL({\n package: 'foam.nanos.client',\n name: 'Client',\n implements: [ 'foam.box.Context' ],...
javascript
edit
0
1
apache-2.0
dc39de1103dc4f0f5e29f88fbed4d3d704a1b46b
foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2
src/foam/nanos/client/Client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nimport React, { Component } from 'react';\nimport ReactCSS from 'reactcss';\n\nclass FloatingButton extends Component {\n classes() {\n return {\n 'default': {\n\n },\n };\n }\n\n render() {\n retu...
javascript
edit
0
2
mit
9869d0cf8a88e3d5c88c5f0cb49c1b3debf16c02
henryboldi/felony,tobycyanide/felony,tobycyanide/felony,henryboldi/felony
src/components/floating-button/FloatingButton.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nenyo.kind({\n\tname: \"enyo.canvas.Text\",\n\tkind: enyo.canvas.Shape,\n\tpublished: {\n\t\ttext: \"\",\n\t\tfont: \"12pt Arial\",\n\t\talign: \"left\",\n\t},\n\trenderSelf: function(ctx) {\n\t\tctx.textAlign = this.align;\n\t\tctx.font...
javascript
edit
0
1
apache-2.0
e1d37539f73bc201bc4b65baa6f77727ac4adc99
wleopar-d/html5-Canvas2-,enyojs/canvas
Text.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar router = new VueRouter({\n routes: [\n { path: \"/search\", component: Vue.component(\"main-search\") },\n { path: \"/tags\", component: Vue.component(\"main-tags\") },\n { path: \"/upload\...
javascript
edit
0
6
mit
5760b9bc06813d6411b9d575d5f7d918e49217d3
Dexesttp/jsbooru,Dexesttp/jsbooru
public/js/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { fetch } from 'domain/Api';\nimport ApiCall from 'containers/ApiCalls';\n\n/*\n * Supports currying so that args can be recycled more conveniently.\n * A contrived example:\n * ```\n * const createCreatorForX =\n * createApiA...
javascript
edit
0
2
mit
8c2dff812e52fcc0cad59778675a5a9f4e78ca0a
e1-bsd/omni-common-ui,e1-bsd/omni-common-ui
src/domain/createApiActionCreator/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar express = require('express')\n , logger = require('morgan')\n , mongoose = require('mongoose')\n , path = require('path')\n , messages = require('./routes/messages')\n , users = require('./routes/users')\n , c...
javascript
edit
0
3
mit
12d0f923a9d8f45d131aa54d8a92784a743449db
Hilzu/SecureChat
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express'),\n routes = require(__dirname + '/app/routes.js'),\n app = express(),\n port = (process.env.PORT || 3000);\n\n// Application settings\napp.engine('html', require(__dirname + '/lib/template-engin...
javascript
edit
0
1
mit
44465f21591a5497a687e2cceecaef5cb278833e
joelanman/govuk_elements,joelanman/govuk_elements
server.js
rejected_duplicate
Near-duplicate of sample 85054
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$('.help-content').hide()\n$('.help-toggle').click(function(){\n $(this).toggleClass('open').next('.help-content').slideToggle('slow');\n});\n```\n\nApply this change: Tweak JavaScript to pass lint" }, { "role": "assistant", ...
javascript
edit
0
1
mit
3a5c59ddecc7e5948d93afb00e2487c9001d64f3
MjAbuz/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,ministryofjustice/peoplefinder,MjAbuz/peoplefinder,MjAbuz/peoplefinder,MjAbuz/peoplefinder,ministryofjustice/peoplefinder
app/assets/javascripts/peoplefinder/help-area.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\n\nclass IntroWithButton extends React.Component {\n static displayName = \"Panel.IntroWithButton\";\n\n static propTypes = {\n children: React.PropTypes.node.isRequired\n };\n\n render() {\n retur...
javascript
edit
0
3
mit
f7443077399ae76499cb339afcbef5db45c5ace8
buildkite/frontend,fotinakis/buildkite-frontend,buildkite/frontend,fotinakis/buildkite-frontend
app/components/shared/Panel/intro-with-button.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar redis = require('ioredis');\nvar logger = require('morgan');\nvar cookieParser = require('cookie-parser');\nvar bodyParser = require('body-parser');\n\nvar routes = require('./routes/endpoints');\n...
javascript
edit
0
1
mit
35debf8c05fb5233841374331ae40853ec851437
nathansmyth/node-stack,nathansmyth/node-stack
server.js
rejected_duplicate
Near-duplicate of sample 80144
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function main() {\n\tvar active = $('ul.nav li.active');\n\n\t$('#ART').add('#credits').show(900);\n\n\t$('ul.nav').on('click', 'li', function() {\n\t\t$(active.removeClass('active')\n\t\t .find('a')\n\t\t .attr('href'))....
javascript
edit
0
1
mit
57ec8ec0afca5b79742deecddb4fe4a509b05918
artbytrie/artbytrie.github.io,artbytrie/artbytrie.github.io
commons/js/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('caco.bookmark.crtl', ['caco.bookmark.REST'])\n .controller('BookMarkCrtl', function ($rootScope, $scope, $stateParams, $location, BookMarkREST) {\n $rootScope.module = 'bookmark';\n\n if ($stateParams.id...
javascript
edit
0
4
mit
ee33df0c5c35339239ce82662d295dc2204035a5
Cacodaimon/CacoCloud,Cacodaimon/CacoCloud,Cacodaimon/CacoCloud,Cacodaimon/CacoCloud
assets/scripts/bookmark/controller/BookMark.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nDarwinator.Bow = function(game, coolDown, bulletSpeed, bullets, damage, owner) {\n Darwinator.Weapon.call(this, game, coolDown, bulletSpeed, damage, owner);\n this.bullets.createMultiple(30, 'arrow');\n this.bullets....
javascript
edit
0
1
mit
068b8cb55fb5f0ab6e51f9a19e202c88f1cc1210
werme/DATX02
src/js/weapon/bow.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport createGraph from '../query/lib/createGraph.js';\nimport {Match} from 'meteor/check';\n\nexport const ExposureDefaults = {\n blocking: false,\n method: true,\n publication: true,\n};\n\nexport const ExposureSchema = {\n ...
javascript
edit
0
2
mit
f2354cb75e3413130d53ae7fe81572d1d43a46c1
cult-of-coders/grapher
lib/exposure/exposure.config.schema.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar async = require('async');\n\nvar pingdom = require('./pingdom');\n\n\nfunction checks(config, limit, done) {\n var api = pingdom(config);\n\n api.checks(function(err, checks) {\n if(err) return console.error(err);\n\n ...
javascript
edit
0
2
mit
470493391503d7884774348909dc78b2c0f3cb06
bebraw/cdnperf,cdnperf/cdnperf,cdnperf/cdnperf,bebraw/cdnperf
data.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('dotenv/config')\nconst sinon = require('sinon')\nconst tap = require('tap')\n\nconst App = require('../lib/app')\n\ntap.test('App', async t => {\n\tawait t.test('run', async t => {\n\t\tawait t.test(`logs 'Hello, $NAME!'`, asyn...
javascript
edit
0
1
mit
b5a89d7e56dac058396cbd417c1c0abedc5f5aac
jordanbtucker/node-init,jordanbtucker/node-init
test/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from 'react-bootstrap/Button';\nimport OverlayTrigger from 'react-bootstrap/OverlayTrigger';\n\nimport { getButtonHintString } from '../utils';\nimport Filte...
javascript
edit
0
1
apache-2.0
39d54af818c9c1c02c79b041fc662e49c1879ec5
thecartercenter/elmo,thecartercenter/elmo,thecartercenter/elmo
app/javascript/components/Filters/FilterOverlayTrigger/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mongoose = require('mongoose');\nconst Schema = mongoose.Schema;\n\nvar SettingSchema = new Schema({\n modLogID: {\n type: Number,\n required: false\n },\n filterInvites: {\n type: Boolean,\n r...
javascript
edit
0
0
mit
0f0e4153ad6041a834d06a7947662e6e15e3eca4
steamboat-dev/shared
schema/settings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nExt.namespace('Kwf.Utils.YoutubePlayer');\nKwf.Utils.YoutubePlayer.isLoaded = false;\nKwf.Utils.YoutubePlayer.isCallbackCalled = false;\nKwf.Utils.YoutubePlayer.callbacks = [];\n\nKwf.Utils.YoutubePlayer.load = function(callback, scope)...
javascript
edit
0
4
bsd-2-clause
20347bfe721a0189e77978561400e5cb23132a11
koala-framework/koala-framework,yacon/koala-framework,nsams/koala-framework,Ben-Ho/koala-framework,Sogl/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework,yacon/koala-framework,kaufmo/koala-framework,Sogl/koala-framework,Ben-Ho/koala-framework,yacon/koala-framework,kaufmo/koala-framework,nsams/koala...
Kwf_js/Utils/YoutubePlayer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n$(document).ready(function(){\n var simplemde = new SimpleMDE({\n element: $(\"#postreply\")[0],\n autosave: {\n enabled: true,\n delay: 2000,\n unique_id: \"thread-\" + window.thread_...
javascript
edit
0
1
mit
779fdd103374a6edb27d555e23aaace7a6f7caa3
clearboard/clearboard,mitchfizz05/clearboard,mitchfizz05/clearboard,clearboard/clearboard
public/assets/default/js/thread.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport theme from '../theme';\nimport { StyleSheet, Text } from 'react-native';\n\nconst styles = StyleSheet.create({\n text: {\n color: theme.textColor,\n fontFamily: theme.f...
javascript
edit
0
3
mit
585467648d0ec67da6cde967a1e17b07014638b8
este/este,robinpokorny/este,TheoMer/Gyms-Of-The-World,skallet/este,christophediprima/este,robinpokorny/este,cjk/smart-home-app,christophediprima/este,TheoMer/Gyms-Of-The-World,TheoMer/este,christophediprima/este,christophediprima/este,steida/este,TheoMer/este,TheoMer/este,sikhote/davidsinclair,sikhote/davidsinclair,est...
src/native/app/components/Text.react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar componentEvent = require('kwf/component-event');\nvar cookies = require('js-cookie');\n\nvar CookieOpt = {};\n\nCookieOpt.getDefaultOpt = function() {\n return 'in'; // TODO get from baseProperty\n};\n\nCookieOpt.isSetOpt = funct...
javascript
edit
0
3
bsd-2-clause
45dfb547c46f25255759f6ebcdc95f59cf1d9c75
koala-framework/koala-framework,kaufmo/koala-framework,kaufmo/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework
commonjs/cookie-opt.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"QueryString\", function() {\n\n describe(\"#setParam\", function() {\n\n it(\"sets the query string to include the given key/value pair\", function() {\n var windowLocation = {\n search: \"\"\n },\n ...
javascript
edit
0
1
mit
ba9c863de909906382b55309e1cfe0e0ce935308
faizalpribadi/jasmine,danielalexiuc/jasmine,GerHobbelt/jasmine,Contagious06/jasmine,tsaikd/jasmine,negherbon/jasmine,soycode/jasmine,mashroomxl/jasmine,mashroomxl/jasmine,WY08271/jasmine,GerHobbelt/jasmine,songshuangkk/jasmine,rlugojr/jasmine,paulcbetts/jasmine,IveWong/jasmine,leahciMic/jasmine,morsdyce/jasmine,daniela...
spec/html/QueryStringSpec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst RoundpiecesBot = require('./../src/roundpiecesbot');\n\nconst token = process.env.ROUNDPIECES_API_KEY;\nconst adminUserName = process.env.ROUNDPIECES_ADMIN_USERNAME;\nconst listPath = process.env.ROUNDPIECES_LIST_PATH;\n\nconst st...
javascript
edit
0
0
mit
9692dfc1f91f9fe3c87a1afe4df8d613f78f885c
jbroni/roundpieces-slackbot
bin/startBot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require( 'path' )\nconst fs = require( 'fs' )\n\n// Create a new path from arguments.\nconst getAbsolutePath = ( ...args ) => path.resolve( path.join.apply( null, args ) )\nconst isExist = filePath => {\n try {\n fs.s...
javascript
edit
0
2
mit
cc033abb20799f36b170e607ce95297491781eda
Yacona/yacona
utility.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from 'ava';\nimport avaRuleTester from 'eslint-ava-rule-tester';\nimport rule from '../src/rules/jsx-no-logical-expression';\n\nconst ruleTester = avaRuleTester(test, {\n parserOptions: {\n ecmaVersion: 2018,\n ecmaFe...
javascript
edit
0
0
mit
f55703a7a027651e141b753058abec7cbdf28e89
CoorpAcademy/eslint-plugin-coorpacademy
test/jsx-no-logical-expression.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst chalk = require('chalk');\nfunction benchmarkResultsToConsole(suite){\n console.log(\"\\n\");\n console.log(\"==================\");\n console.log(\"Benchmark results:\");\n console.log(\"------------------\");\n va...
javascript
edit
0
3
mit
edeca61db29c3076b41c005eace74e2555f76be3
baranga/JSON-Patch,Starcounter-Jack/JSON-Patch,baranga/JSON-Patch,Starcounter-Jack/JSON-Patch,baranga/JSON-Patch,baranga/JSON-Patch,Starcounter-Jack/JSON-Patch,Starcounter-Jack/JSON-Patch
test/helpers/benchmarkReporter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { moduleFor, test } from 'ember-qunit';\n\nmoduleFor('adapter:github-release', 'Unit | Adapter | github release', {\n // Specify the other units that are required for this test.\n // needs: ['serializer:foo']\n});\n\n// Replace...
javascript
edit
0
1
mit
d05e4d520f627b555fc52f243db307275eb7ca39
elwayman02/ember-data-github,jimmay5469/ember-data-github,elwayman02/ember-data-github,jimmay5469/ember-data-github
tests/unit/adapters/github-release-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$( document ).ready(function() {\n\n\t/* Sidebar height set */\n\t$('.sidebar').css('min-height',$(document).height());\n\n\t/* Secondary contact links */\n\tvar scontacts = $('#contact-list-secondary');\n\tvar contact_list = $('#contac...
javascript
edit
0
1
mit
0b13a34c60150e8eee5394b61233d451c7a933cb
meumobi/meumobi.github.io,meumobi/meumobi.github.io,meumobi/meumobi.github.io
assets/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport WebSocketRequestContext from './WebSocketRequestContext.js'\n\n// TODO this should be probably moved to utils, and combined with other header\n// functions and utilities\nfunction createMultiValueHeaders(headers) {\n return Obje...
javascript
edit
0
1
mit
59c5b0cf7aade3943a2d9b664c5efacd4f23a14d
dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline,dherault/serverless-offline
src/api-gateway-websocket/lambda-events/WebSocketDisconnectEvent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function skipSpace() {\n // https://github.com/ternjs/acorn/blob/master/src/tokenize.js#L100-L116\n return function ha(endSign) {\n const endS = endSign ? endSign : '*/';\n let startLoc = this.options.onComment &&...
javascript
edit
0
8
mit
153b9121bc2971e916ddc78045ebc6afc8a8ec5e
laosb/hatp
src/acorn_plugin/skipBlockComment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = require('./webpack.config.js');\nvar webpack = require('webpack');\nvar webpackDevServer = require('webpack-dev-server');\nvar compiler;\nvar server;\n\n// Source maps\nconfig.devtool = 'source-map';\n\nconfig.output.public...
javascript
edit
0
0
mit
3a1638c1538b902bc8cebbf6b969798240f84157
acorn421/react-html5video-subs,mderrick/react-html5video,Caseworx/inferno-html5video,Caseworx/inferno-html5video,acorn421/react-html5video-subs
demo/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport VideoListItem from './video_list_item'\n\nconst VideoList = (props) => {\n\n const videoItems = props.videos.map((video) => {\n return <VideoListItem video={video} />\n });\n\n return (\n <ul c...
javascript
edit
0
1
mit
49d8d01a14fb235c999473915667144d890e125b
fifiteen82726/ReduxSimpleStarter,fifiteen82726/ReduxSimpleStarter
src/components/video_list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(function(require) {\n\n var test = require('../../../test')\n var n = 0\n\n\n // 404\n var a = require('./a')\n test.assert(a === null, '404 a')\n\n // exec error\n setTimeout(function() {\n var b = require('./b')\n },...
javascript
edit
0
2
mit
bc24c83daef21248ee0ab141675bd6170c399403
jishichang/seajs,eleanors/SeaJS,baiduoduo/seajs,ysxlinux/seajs,kaijiemo/seajs,wenber/seajs,uestcNaldo/seajs,PUSEN/seajs,zaoli/seajs,JeffLi1993/seajs,13693100472/seajs,tonny-zhang/seajs,chinakids/seajs,ysxlinux/seajs,kuier/seajs,Gatsbyy/seajs,wenber/seajs,miusuncle/seajs,mosoft521/seajs,treejames/seajs,Lyfme/seajs,imcys...
tests/specs/misc/on-error/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel';\n\nimport {filter} from 'fuzzaldrin';\nimport commands from './commands';\nimport variables from './variables';\n\nexport const selector = '.source.cmake';\nexport const disableForSelector = '.source.cmake .comment';\nexpor...
javascript
edit
0
3
mit
670dff868d04ab149bd252b6835b224a202a5bd1
NealRame/autocomplete-cmake
lib/provider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport uuid from 'uuid';\nimport { Record as record } from 'immutable';\n\nexport class CardModel extends record({\n name: '',\n mana: null,\n attack: null,\n defense: null,\n portrait: null,\n}) {\n constructor(obj) {\n super(...
javascript
edit
0
0
mit
60b20d83f4fdc9c625b56a178c93af1533b82a60
inooid/react-redux-card-game,inooid/react-redux-card-game
src/redux/modules/card.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Link } from 'react-router';\n\nfunction NavbarLink({to, href, className, component, children}) {\n const Comp = component || Link;\n\n return (\n <span>\n { href ?\n <a href={href}>Y...
javascript
edit
0
3
cc0-1.0
5a3b4b8010d20793c0ffcb36caeb27283aef61c5
cape-io/acf-client,cape-io/acf-client
src/components/Members/NavbarLink.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n \"download-atom-shell\": {\n version: \"0.20.3\",\n outputDir: \"./atom-shell\",\n ...
javascript
edit
0
1
mit
7bfb2f65427182294c4582bb6bf1234daa193791
kolya-ay/LightTable,masptj/LightTable,youprofit/LightTable,kausdev/LightTable,0x90sled/LightTable,EasonYi/LightTable,youprofit/LightTable,kenny-evitt/LightTable,kenny-evitt/LightTable,brabadu/LightTable,ashneo76/LightTable,rundis/LightTable,0x90sled/LightTable,youprofit/LightTable,fdserr/LightTable,kolya-ay/LightTable,...
shell/Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport { List } from 'immutable';\nimport Polyline from './Polyline';\nimport Marker from './Marker';\n\nclass TaskPlot extends React.Component {\n\n shouldComponentUpdate(nextProps) {\n re...
javascript
edit
0
3
mit
741414856087c820963d3e688d5bbf88f5edf82a
alistairmgreen/soaring-analyst,alistairmgreen/soaring-analyst
src/components/googlemap/TaskPlot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport axios from 'axios';\n\nconst API_BASE = 'http://api.zorexsalvo.com/v1';\n\n\nexport default {\n getPosts: ({ commit }) => {\n axios.get(`${API_BASE}/posts/`).then(\n (response) => {\n commit('getPosts', response.d...
javascript
edit
0
1
mit
e8a00e1baad5e8ae7baa8afd9502f20cd0cd0687
zorexsalvo/zorexsalvo.github.io,zorexsalvo/zorexsalvo.github.io
src/store/actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// remove all children of the main `g` element\n// prepare for re-drawing (e.g. during resize) with margins\nexport default ({\n g,\n margin\n}) => {\n g.selectAll('*').remove()\n g.attr('transform', 'translate(' + margin.left + ','...
javascript
edit
0
1
mit
c435fa54c5416bda364e7e3aa23230df1d7faf37
simonwoerpel/d3-playbooks-maps,simonwoerpel/d3-playbooks-maps
src/utils/draw/reset_g.js
rejected_duplicate
Near-duplicate of sample 90109
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require cfme_application\n//= require dialog_import_export\n//= require widget_import_export\n//= require jquery.jqplot\n//= require jqplot-plugins/jqplot.pieRenderer\n//= require jqplot-plugins/jqplot.barRenderer\n//= require jqplo...
javascript
edit
0
0
apache-2.0
8d94ee098cbde06564c72cbd44574bd47fd207a5
juliancheal/manageiq,jvlcek/manageiq,jameswnl/manageiq,djberg96/manageiq,maas-ufcg/manageiq,josejulio/manageiq,fbladilo/manageiq,romanblanco/manageiq,lpichler/manageiq,agrare/manageiq,romanblanco/manageiq,NaNi-Z/manageiq,aufi/manageiq,jntullo/manageiq,tinaafitz/manageiq,tinaafitz/manageiq,mfeifer/manageiq,branic/manage...
vmdb/app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Bacon from \"baconjs\"\nimport React from \"react\"\n\nexport default React.createClass({\n getInitialState() {\n return {}\n },\n tryDispose() {\n const {dispose} = this.state\n if (dispose) {\n dispose()\n ...
javascript
edit
0
4
mit
50ff129e6e3a02a03aa63a26e5c7d782a722db0e
polytypic/bacon.react
src/bacon.react.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmi2JS.comp.add('base/Button', 'Base', '',\n\n// component initializer function that defines constructor and adds methods to the prototype \nfunction(proto, superProto, comp, superComp){\n\n\tproto.construct = function(el, tpl, parent)...
javascript
edit
0
5
mit
02e191dabf4485f305c09c37592fcdfdf477553b
hrgdavor/mi2js,hrgdavor/mi2js,hrgdavor/mi2js
src/base/Button.js
rejected_duplicate
Near-duplicate of sample 83498
true