messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport moment from 'moment';\n\nclass Activity extends Component {\n\n render() {\n const { timestamp, activity, deleteActivity } = this.props;\n\n return (\n <div classN...
javascript
edit
0
1
mit
a0bfebc24d8eec171cbca7696a3823c388b543c1
mknudsen01/today,mknudsen01/today
src/components/Activity.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {Observable, Disposable} from 'rx';\n\nObservable.prototype.subUnsub = function(onSub=null, onUnsub=null) { \n return Observable.create((subj) => {\n if (onSub) onSub();\n let d = this.subscribe(subj);\n \n return Di...
javascript
edit
0
2
mit
6b701f707390938a069ab5742a15668e5c03f91d
surf-build/surf,surf-build/surf,surf-build/surf,surf-build/surf
src/custom-rx-operators.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport '../styles/games.css';\n\nexport default class GameList extends React.Component {\n constructor(props) {\n super(props);\n\n this.state = {games: []};\n }\n\n componentWillReceiv...
javascript
edit
0
2
mit
9a26b6c509419f91726a4b31c93931540ddd33f0
Julzso23/player.me-one-click-share,Julzso23/player.me-one-click-share
src/components/GameList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Results formatter for --format=tap\n *\n * @see http://podwiki.hexten.net/TAP/TAP.html?page=TAP\n * @see https://github.com/isaacs/node-tap\n */\nvar Producer = require('tap').Producer;\n\nmodule.exports = function(results) {\n\...
javascript
edit
0
4
bsd-2-clause
18a6a22170a2f0d4adb304351cd2c073942586b1
william-p/phantomas,ingoclaro/phantomas,william-p/phantomas,gmetais/phantomas,ingoclaro/phantomas,william-p/phantomas,macbre/phantomas,ingoclaro/phantomas,macbre/phantomas,gmetais/phantomas,gmetais/phantomas,macbre/phantomas
reporters/tap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Controller.extend({\n session: Ember.inject.service(),\n isExpanded: true,\n isNotLogin: Ember.computed('this.currentPath', function() {\n if (this.currentPath !== 'logi...
javascript
edit
0
3
apache-2.0
0d1917939110865a62136dc6d66fac5749574881
abought/experimenter,abought/experimenter
app/controllers/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n /* Services */\n\n angular.module('myApp.services', [])\n\n // put your services here!\n // .service('serviceName', ['dependency', function(dependency) {}]);\n\n .service('messageLis...
javascript
edit
0
1
mit
268db5ed4558028c630c3b03bcd9b5cd4a578686
birdwell/Fantasy-Football,kmarwah/Seed,rawrsome/angularfire-seed,harish-myaccount/vigilante,russellf9/diary,u910328/Coding-Parrot-2.1,timothy-clifford/dashshelf,snowpeame/snowpeas,JonBergman/angularfire-seed,morganric/wildfirio,morganric/wildfirio,robotnoises/angularfire-seed,pmconnolly80/angularfire-seed,dialectica/an...
app/js/services.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconsole.log('Started', self);\nself.addEventListener('install', function(event) {\n self.skipWaiting();\n console.log('Installed', event);\n});\nself.addEventListener('activate', function(event) {\n console.log('Activated', event);\n...
javascript
edit
0
5
mit
319871c7b722c2a540ba48c9fe0fdfe07df9fef5
coreyja/glassy-collections,coreyja/glassy-collections,coreyja/glassy-collections
app/assets/javascripts/sw.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Call the fancybox for displaying organism details in a lightbox\n */\n $(\".fancybox\").fancybox({\n maxWidth: 1000,\n maxHeight: 800\n });\n```\n\nApply this change: Set size of fancy box" }, { "role...
javascript
edit
0
0
mit
f9faf808f414ae53d372fe3ad5b4c6ca9b6e86c9
molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec,molbiodiv/fennec
src/webroot/js/fancybox.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst exec = require('child_process').execSync;\nconst ios = require('./contours-ios.json');\nconst web = require('./contours-web.json');\nconst fs = require('fs');\n\nvar offsets = {};\n\nfor (let font in web) {\n c...
javascript
edit
0
0
mit
88207533c117a9ccc89f0d0b0e4a74fb97b6c821
ninjaprox/TextContour,ninjaprox/TextContour,ninjaprox/TextContour,ninjaprox/TextContour
scripts/offsets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar buster = require(\"buster\");\n\nvar firestarter = require('../')();\n\nbuster.testCase('Test testing framework', {\n\n\t'Test' : function(){\n\t\t'use strict';\n\t\t\n\t\tassert(firestarter.config.testValue);\n\t}\n});\n```\n\nAppl...
javascript
edit
0
1
mit
f486e827dbfa258cbb051fd0ba08da86940ba066
davewilliamson/firestarter
test/tests-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @fileoverview Enforce emojis are wrapped in <span> and provide screenreader access.\n * @author Ethan Cohen\n */\n\n// ----------------------------------------------------------------------------\n// Rule Definition\n// --------...
javascript
edit
0
7
mit
4ed6fd92ad2f2b3b4088842d544e2154c4302b49
evcohen/eslint-plugin-jsx-a11y,jessebeach/eslint-plugin-jsx-a11y
src/rules/accessible-emoji.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function (obj, props) {\n Object.keys(props).forEach(function (name) {\n const desc = Object.getOwnPropertyDescriptor(obj, name);\n if (!desc || desc.configurable) {\n Object.defineProperty(obj, name, props[na...
javascript
edit
0
6
mit
0d56522d9ae59d9d62c6787421cfcc4daf489a92
chrisdarroch/skatejs,skatejs/skatejs,chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs
src/util/define-properties.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport PropTypes from 'prop-types';\nimport { connect } from 'react-redux';\nimport InputContainer from '../Input/InputContainer';\nimport { inputChanged } from './PlatbyActions';\nimport {\n formatValue,\n inputOptions,\n inputValid...
javascript
edit
0
1
mit
0c0fa72464530d3a9896a18d9b752626835dc1b2
ivosh/jcm2018,ivosh/jcm2018,ivosh/jcm2018
ui/src/registrator/PrihlaskyDohlasky/Platby/NovaPlatbaInputContainer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport React from 'react';\nimport { Link } from 'react-router';\nimport type { AggregatedActivity } from './types';\n\nexport function lookupContext(\n aggregatedActivity: AggregatedActivity,\n key: string\n) {\n return ag...
javascript
edit
null
null
mit
5bbc62fe150789c63b557fab36b56781ba329f0b
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
app/components/Feed/context.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express'),\n\trouter = express.Router(),\n\tnet = require('net'),\n\tfs = require('fs'),\n\tsocketPath = '/tmp/haproxy';\n\n\n/* GET home page. */\nrouter.post('/', function(req, res) {\n\t// console.log(req.body)...
javascript
edit
0
1
mit
117802c072678f1eab4fd12474b22e3d12226678
PontoServerSide/LiveUpdater
GitEventChecker/routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass MainController {\n constructor(_, $scope, $state, $log, SocketService) {\n 'ngInject';\n\n this._ = _;\n this.$log = $log;\n this.$state = $state;\n this.$scope = $scope;\n this.SocketService = SocketService;\n ...
javascript
edit
0
3
mit
65b9ec6e02399db66b51a4a15f3c52fe2ee04b9a
hendryl/Famous-Places-Mobile,hendryl/Famous-Places-Mobile
src/app/main/main.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction select(database, options, callback) {\n var results = [];\n database.command('select', options, function(error, data) {\n if (error) {\n callback(error);\n } else {\n var columnNames = [];\n var i, j;\n ...
javascript
edit
0
5
mit
86e0ecae9697c9a7a10eddff320fb3679f5b22a2
groonga/gcs,groonga/gcs
lib/api/search.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\nvar LegendTypes = require('builder/editor/layers/layer-content-views/legend/legend-types');\n\nmodule.exports = [\n {\n value: LegendTypes.NONE,\n tooltipTranslationKey: 'editor.legend.tooltips.sty...
javascript
edit
0
3
bsd-3-clause
b42d2aa652b987865d3a6f55f601b98f21a76137
CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb
lib/assets/javascripts/builder/editor/layers/layer-content-views/legend/size/legend-size-types.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar math = require('mathjs');\n\nvar ERROR_RESPONSE = 'I can\\'t calculate that!';\n\nmodule.exports = function(argv, response) {\n var respBody;\n\n try {\n var expression = argv.slice(1).join('');\n respBody = math.eval(expr...
javascript
edit
0
3
mit
52c04555ff2c5c7e4f41eaa3cd422e9d386dfdee
elvinyung/scalk
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * User: powerumc\n * Date: 2014. 5. 18.\n */\n\n\n$(function() {\n\t$(function () {\n\t\t$.ajax({\n\t\t\turl: \"Requirements.md\",\n\t\t\ttype: \"GET\",\n\t\t\tsuccess: function (data) {\n\t\t\t\tvar html = marked(data);\n\t\t\t\t...
javascript
edit
0
1
mit
e2ede78fcf2076a40835909e9c5e01a76fdf1424
ernstki/TeamMachine-Docs,ernstki/TeamMachine-Docs,ernstki/TeamMachine-Docs
js/markdown-toc.js
rejected_duplicate
Near-duplicate of sample 87899
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n /**\n * Serialize metadata to json for submission\n */\n $(\"#edit-form\").submit(function(){\n var metadata = {};\n $(\"#other-metadata\").find(\".metadata-entry\").each(funct...
javascript
edit
0
2
apache-2.0
ff5f0558be982d50aa74991051b676ec4c263482
phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida,phac-nml/irida
src/main/webapp/resources/js/pages/samples/edit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction dialogClose() {\n return {\n restrict: 'EA',\n require: '^dialog',\n scope: {\n returnValue: '=?return'\n },\n link(scope, element, attrs, dialog) {\n element.on('clic...
javascript
edit
0
2
mit
a658a63b42244b826fbe2daee2b7509749681623
olympicsoftware/oly-dialog,olympicsoftware/oly-dialog
src/dialog-action-directives.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// Dependencies\nconst readJson = require(\"r-json\")\n , writeJson = require(\"w-json\")\n , mapO = require(\"map-o\")\n , ul = require(\"ul\")\n , findValue = require(\"find-value\")\n ;\n\n/**\n * pa...
javascript
edit
0
3
mit
71b158d08ea4ba715d3054da430c93e91dfcedbf
IonicaBizau/packy
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as React from 'react';\n\nconst HEADERS = ['no', 'text', 'log'];\n\n/**\n * Table responsible for storing the data for a builder.\n *\n * @param {Object[]} props.buildSteps - The build steps for a given builder.\n * @param {str...
javascript
edit
0
1
apache-2.0
494ecc627106cb7f9532f88db97b5d2f45fa23dc
googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020,googleinterns/step240-2020
src/main/webapp/components/BuilderDataTable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = {\n getAuthorizedAclMethods,\n};\n\nfunction getAuthorizedAclMethods(Model) {\n let authorizedMethods = [];\n let acls = Model.definition.settings.acls || [];\n\n acls.forEach((acl) => {\n if (ac...
javascript
edit
0
4
mit
3b53fc0ff2a2ecb022f35926d37a1a0f140ae640
devsu/loopback-setup-remote-methods-mixin
lib/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar chat = angular.module('chat', ['btford.socket-io']);\n\nvar channel = new Channel('hellas');\nvar me = null;\n\nchat.factory('chatServer', function (socketFactory) {\n var url = '/';\n\n if (location.port != '') {\n url...
javascript
edit
0
2
mit
c0002c7f3a62e90b62e9f821b4f13c80bdbae324
gtklocker/ting,odyvarv/ting-1,odyvarv/ting-1,sirodoht/ting,gtklocker/ting,odyvarv/ting-1,dionyziz/ting,dionyziz/ting,mbalamat/ting,sirodoht/ting,sirodoht/ting,mbalamat/ting,mbalamat/ting,dionyziz/ting,gtklocker/ting,VitSalis/ting,gtklocker/ting,dionyziz/ting,sirodoht/ting,VitSalis/ting,VitSalis/ting,odyvarv/ting-1,VitS...
chat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n// =========================================================================\n//\n// Controller for orgs\n//\n// =========================================================================\nvar path = require('path')...
javascript
edit
0
1
apache-2.0
3f855c3b1e7b0a6ce546fa9e422fd478a5eb1f1c
logancodes/esm-server,logancodes/esm-server,logancodes/esm-server
modules/recent-activity/server/controllers/recent-activity.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mqtt = require('mqtt');\nvar SensorTag = require('sensortag');\n\nvar client = mqtt.connect('mqtt://tree:<EMAIL>:19539');\n\nclient.on('connect', function () {\n\tclient.publish('sensor', \"foo\");\n\tSensorTag.discoverAll(function ...
javascript
edit
0
2
mit
b2a119f8d4685e96a2bf338ab1a933b9bba13b27
jphacks/KB_12,jphacks/KB_12,jphacks/KB_12,jphacks/KB_12,mikoim/mori,mikoim/mori,jphacks/KB_12,mikoim/mori,mikoim/mori,mikoim/mori
unit/poller/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\"\nimport Link from \"gatsby-link\"\nimport Helmet from \"react-helmet\"\n\nexport default class Index extends React.Component {\n render() {\n return (\n <div>\n <h1>Hi people</h1>\n <p>...
javascript
edit
0
1
mit
9d1ce946bb52111a738fac77d1512f0c4127f4c3
TasGuerciMaia/tasguercimaia.github.io,benruehl/gatsby-kruemelkiste
src/pages/page-2.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { expect } from 'chai';\nimport { shallow } from 'enzyme';\nimport React from 'react';\nimport Posts from '../../src/js/components/Posts';\nimport PostPreview from '../../src/js/components/PostPreview';\n\ndescribe('<Posts/>', ()...
javascript
edit
0
1
mit
da5e854055509992103561f5134dea0ef094bec9
slavapavlutin/pavlutin-node,slavapavlutin/pavlutin-node
test/components/Posts.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { fetchRecipes, setSearchTerm } from '../actions/';\nimport Header from '../components/Header';\nimport SearchHeader from '../components/SearchHeader';\nimport C...
javascript
edit
0
2
mit
37eae0ebce6e466319ac991a2b810b7a260ffb7d
hihuz/meny,hihuz/meny
src/views/Browse.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst gatherResources = require('../utils/gatherResources')\n\nconst auth = [\n 'options',\n 'token'\n]\n\nmodule.exports = gatherResources(auth, __dirname)\n\n```\n\nApply this change: Include oauth2 and couchdb auth in `integreat.au...
javascript
edit
0
0
isc
930326fafe7a14b472fece345572c184de542a6e
kjellmorten/integreat
lib/auths/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction hex2bin(s) {\n // discuss at: http://phpjs.org/functions/hex2bin/\n // original by: Dumitru Uzun (http://duzun.me)\n // example 1: bin2hex('44696d61');\n // returns 1: 'Dima'\n // example 2: bin2hex('00');\n // r...
javascript
edit
0
4
mit
3b3f61946d2c8bc79fbccc171035612293209c58
revanthpobala/phpjs,praveenscience/phpjs,strrife/phpjs,davidgruebl/phpjs,w35l3y/phpjs,VicAMMON/phpjs,Mazbaul/phpjs,J2TeaM/phpjs,cigraphics/phpjs,praveenscience/phpjs,janschoenherr/phpjs,VicAMMON/phpjs,ajenkul/phpjs,cigraphics/phpjs,VicAMMON/phpjs,ajenkul/phpjs,mojaray2k/phpjs,imshibaji/phpjs,Mazbaul/phpjs,FlorinDragota...
functions/strings/hex2bin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(gulp, $, config, _) {\n\tvar proxyTarget = _.get(config, 'proxy.url', config.consts.proxy.url);\n\tvar proxyPrefixes = _.get(config, 'proxy.prefixes', config.consts.proxy.prefixes);\n\tvar prox...
javascript
edit
0
2
mit
098185af723d83e2ace531d0644b1cda414d8bcd
akullpp/akGulp,akullpp/myGulp
lib/tasks/serve.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar units = {\n datacenter: {\n unitName: 'adminsys',\n unitStats: {\n attack: 10,\n security: 50,\n power: 5\n }\n },\n personal_computer: {\n unitName: 'zombie_comp...
javascript
edit
0
0
mit
b7d6033ada80ac9979c084cc357e2c541a05ee62
romain-grelet/HackersWars,romain-grelet/HackersWars
server/config/config.units.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar spawn = require('child_process').spawn;\nvar which = require('which');\n\nmodule.exports.transformer = childProcTransformer;\nmodule.exports.transform = childProcTransform;\n\nfunction childProcTransformer(prog, transformer) {\n ...
javascript
edit
0
3
mit
1563437daf745c6ba5dcc3b732241c7a9b9c523b
jcorbin/lesspipe.js
transformers/lib/child_proc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport types from '../constants/ActionTypes'\nimport utils from '../../shared/utils'\n\nfunction replaceUserInfo(userInfo) {\n return {\n type: types.REPLACE_USER_INFO,\n userInfo\n }\n}\n\nfunction clearUserInfo() {...
javascript
edit
0
1
mit
805a979307583490d89197c8a82e7ba9fcae27ce
qiuye1027/screenInteraction,qiuye1027/screenInteraction,chikara-chan/react-isomorphic-boilerplate,chikara-chan/react-isomorphic-boilerplate
client/common/actions/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express')\nconst ERRORS = require('../../errors')\nconst User = require('../../models/User')\nconst utils = require('../../utils')\nconst router = express.Router()\n\nrouter.post('/', register)\nfunction registe...
javascript
edit
0
4
mit
2223e83d7ea673bad92f89df32da4ee72bdac360
14Plumes/Hexode,KtorZ/Hexode,KtorZ/Hexode,14Plumes/Hexode,KtorZ/Hexode,14Plumes/Hexode
backend/src/routes/users/index.js
rejected_duplicate
Near-duplicate of sample 89482
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n 'responses': {\n 'GREET': 'Hello! How are you doing today :\\)',\n 'HELP': 'I can help you with a bunch of things around your house.\\n\\n'\n + 'You can check in on your security cameras, ask me the temp...
javascript
edit
0
0
mit
0fc62a076bf8d9afb215c386688ef35cc4b8e559
Eaton-Software/messenger-home
server/res/strings/english.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction Game(){\n this.$track = $('#racetrack');\n this.finishLine = this.$track.width() - 54;\n}\n\nfunction Player(id){\n this.player = $('.player')[id - 1];\n this.position = 10;\n}\n\nPlayer.prototype.move = function(){\n this...
javascript
edit
0
3
mit
1d7da8b90ffc9d685a247e426c696d85b38201c4
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 { takeLatest, delay } from 'redux-saga';\nimport { fork, select, put, take } from 'redux-saga/effects';\n\nimport * as actions from '../screens/List/constants';\nimport updateParams from './updateParams';\nimport { loadItems } fr...
javascript
edit
0
2
mit
2522192ae32bbe89bc9882717833f32a5ae4424a
creynders/keystone,creynders/keystone
admin/client/App/sagas/index.js
rejected_duplicate
Near-duplicate of sample 82263
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport padStart from './polyfill/padStart';\n\nconst THREE_MINUTES = 3 * 60 * 1000;\nconst privateDateProperty = typeof Symbol !== 'function' ?\n Symbol('privateDateProperty') : '_privateDateProperty';\n\nfunction computeEorzeaDate(dat...
javascript
edit
0
1
mit
6c4bab22ae449af235ea33499061113a140b7595
flowercartelet/eorzea-time
src/eorzea-time.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ./src/hello-world.js\n\nvar console = require('gulp-messenger');\n\nconsole.success('Hello World!');\n```\n\nApply this change: Create merge conflict in master branch" }, { "role": "assistant", "content": "// ./src/hello-...
javascript
edit
0
0
mit
3934fbf1024d52b8b8429a5d073b7b8526521d25
mikeerickson/gitflow
src/hello-world.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$( \".users-show, .users-sample\" ).ready( function() {\n $( \"#stats-area\" ).tabs({\n // Ajax request stuff, mostly pulled from jQuery UI's docs.\n beforeLoad: function( event, ui ) {\n\n // There's no need to do a fresh A...
javascript
edit
0
3
mit
f658e382b0974c53edc828efac5d4f182fbd3c08
steve-mcclellan/j-scorer,steve-mcclellan/j-scorer,steve-mcclellan/j-scorer
app/assets/javascripts/users.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction filter(arr) {\n var filteredArray = [], prev;\n arr.sort();\n for (var i = 0; i < arr.length; i++) {\n if (arr[i] !== prev) {\n filteredArray.push(arr[i]);\n }\n prev = arr[i];\n }\n return filteredArray\n}\n...
javascript
edit
0
3
mit
3a4aae6cfb1f664afd8943a1a49d3de0062eb2b9
bdfinlayson/annotation-tool,bdfinlayson/annotation-tool
app/js/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(d3, fc) {\n 'use strict';\n\n fc.series.line = function() {\n\n // convenience functions that return the x & y screen coords for a given point\n var x = function(d) { return line.xScale.value(line.xValue.va...
javascript
edit
0
1
mit
bcb666e596c694f432340e780aff05530b0df40a
alisd23/d3fc-d3v4,bjedrzejewski/d3fc,fxcebx/d3fc,djmiley/d3fc,fxcebx/d3fc,janakerman/d3-financial-components,alisd23/d3fc-d3v4,djmiley/d3fc,fxcebx/d3fc,bjedrzejewski/d3fc,janakerman/d3-financial-components,djmiley/d3fc,bjedrzejewski/d3fc,alisd23/d3fc-d3v4
src/series/line.js
rejected_duplicate
Near-duplicate of sample 82050
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fetch from 'isomorphic-fetch'\n\nexport function signUpUser(register, history) {\n return(dispatch) => {\n\n const options = {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.s...
javascript
edit
0
1
mit
f1aa082977ee0679cfa1e96d3fa3a2e3fdefa8fe
snsavage/timer-react,snsavage/timer-react
src/actions/sessionActions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (ioradWebWidget.util.common.isFreshdeskKnowledgebase()) {\n ioradWebWidget.freshdesk.runApp(jQuery, window);\n}\n\nif (ioradWebWidget.util.common.isDeskKnowledgebase()) {\n ioradWebWidget.desk.runApp(jQuery, window);\n}\n\n```\n\n...
javascript
edit
0
0
mit
f54167b6ce911acd2a4ecd05db25f11558ed870f
iorad/integrations,iorad/integrations,iorad/integrations
IoradWebWidget/scripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// A bit of pseudo-code\n//\n// tickModel\n// var dt\n// for each canvas\n// canvasParticles = canvasParticles.filterOut(particlesOutsideOrTimeout)\n//\n// for each particle in canvasParticles\n// tick(particle)\n//\n// fo...
javascript
edit
0
2
mit
943282e096fe7a36e035fccd069eb8f843b686b0
axelpale/sprinkler
src/animate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* globals __DEV__ */\nimport Phaser from 'phaser'\nimport Mushroom from '../sprites/Ship'\n\nexport default class extends Phaser.State {\n init () {}\n preload () {}\n\n create () {\n game.physics.startSystem(Phaser.Physics.ARCAD...
javascript
edit
0
2
mit
d0e3a74be246e9b43189d1c2d3a39fce357a146d
killer-robots/killer-robots,killer-robots/killer-robots
src/states/Game.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst declarationBlockPropertiesOrder = require(`./.csscomb.json`)[`sort-order`][0];\n\nmodule.exports = {\n extends: `stylelint-config-modularis`,\n rules: {\n 'declaration-block-properties-order': declarationBlockPropertiesOrder,...
javascript
edit
0
0
mit
6e1b30ca8028d016fc2a566141f6cabbe1acaaa4
avalanchesass/avalanche-website,avalanchesass/avalanche-website
.stylelintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { isDev, getDevelopmentPackages } from 'worona-deps';\nimport { map } from 'lodash';\nimport { combineReducers } from 'redux';\nimport * as deps from '../deps';\n\nconst env = isDev ? 'dev' : 'prod';\nconst mapPkg = pkg => ({ ......
javascript
edit
0
2
mit
2aecea32c53f551069b43ac6e2e9da3831a9b667
worona/worona-dashboard,worona/worona-dashboard,worona/worona,worona/worona,worona/worona-core,worona/worona,worona/worona-core
client/packages/settings-dashboard-extension-worona/src/dashboard/reducers/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst eg = require('../../eg');\nmodule.exports = class extends eg.Generator {\n constructor (args, opts) {\n super(args, opts);\n\n this.configureCommand({\n command: 'create [options] <scope..>',\n desc: 'Create a sco...
javascript
edit
0
3
apache-2.0
b3f449dace39b99aca7046b4eddc9dd7ae81c141
ExpressGateway/express-gateway
bin/generators/scopes/create.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DicewareOptions from './DicewareOptions'\nimport React, { PureComponent } from 'react'\n\nexport default class App extends PureComponent {\n state = {\n length: 6\n }\n\n handleLengthChange = event => this.setState({ length...
javascript
edit
0
2
isc
88f0989207c048b60a72cca136bc5d912c77ebd3
nickmccurdy/password-entropy,nickmccurdy/password-entropy
src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// Bitazza uses Alphapoint, also used by ndax\n// In order to use private endpoints, the following are required:\n// - 'apiKey'\n// - 'secret',\n// - 'uid' (userId in the api info)\n// - 'login' (the email address used ...
javascript
edit
0
1
mit
962dd6226d16428acf12993eb35c6b90d29bc109
ccxt/ccxt,ccxt/ccxt,ccxt/ccxt,ccxt/ccxt,ccxt/ccxt
js/bitazza.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (config) {\n config.set({\n basePath: '',\n frameworks: ['mocha', 'sinon-chrome', 'karma-typescript'],\n files: [\n 'src/ts/**/*.ts'\n ],\n exclude: [\n 'src/ts/constants.ts'\n ],\n...
javascript
edit
0
1
mit
dbaaef857da2f402700e254f0ee0d63bb56b6870
xtangle/ZoundCloud,xtangle/ZoundCloud
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n\nclass App extends React.Component { // eslint-disable-line no-unused-vars\n render () {\n return (\n <div className=\"container-fluid\">\n <div className=\"r...
javascript
edit
0
1
mit
2b65809bc9b134d281a5552387e385fda7b63b84
cpwilkerson/login-server,cpwilkerson/login-server
src/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\n // Add class to all inputs (input's type attribute value)\n $('input').each(function() {$(this).addClass(this.type)});\n \n // put all your jQuery code here\n});\n```\n\nApply this change: Add clas...
javascript
edit
0
1
mit
2d839b07c96bbfc38588bb3e32aece3e6d9be6d6
maciejsmolinski/html-go
js/js-engine.js
rejected_duplicate
Near-duplicate of sample 73386
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport expect from 'expect.js';\n\nimport constantMirror from '../src';\n\ndescribe('constantMirror', () => {\n it('exports a function', () => {\n expect(constantMirror).to.be.a('function');\n });\n\n it('creates a mirrored hash f...
javascript
edit
0
1
mit
a7591058f6fe14412ea645703695b2ebad987083
tough-griff/constant-mirror
test/index.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable no-use-before-define */\n\nfunction toCodeArray(array) {\n return `[${array.map(item => toCode(item)).join(\",\")}]`\n}\n\nfunction toCodeObject(object) {\n return `{${Object.keys(object).map(key => `\"${key}\": ${to...
javascript
edit
0
5
mit
6e6a449ddda27c2471a72b436fb7074ac5ae7403
mavenlink/mavenlink-ui-concept,ahuth/mavenlink-ui-concept
lib/loaders/utils/to-code.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function($) {\n\n $.fn.majesty = function() {\n\n var findDependents = function(rootElement) {\n return rootElement.find('[data-depends-on]');\n };\n\n var findMatches = function(searchValue, elements) {\n\n searchV...
javascript
edit
0
4
mit
f4489c9b6cc45d41bd0ee41c7988af369dc249d9
craigerm/majesty-js
src/majesty.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n /* globals define */\n 'use strict';\n\n function l(config) {\n var i = function() {\n i.c(arguments);\n };\n i.q = [];\n i.c = function(args) {\n i.q.push(args);\n };\n\n window.Intercom =...
javascript
edit
0
3
mit
9b9a73c31eddf1c7e70bb89352c3cf84edededea
mike-north/ember-intercom-io,levanto-financial/ember-intercom-io,seawatts/ember-intercom-io,seawatts/ember-intercom-io,levanto-financial/ember-intercom-io,mike-north/ember-intercom-io
client/intercom-shim.js
rejected_duplicate
Near-duplicate of sample 97857
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {webpack} = require('@webpack-blocks/webpack2');\n\n\n/**\n * Sets environment variables with all possible ways.\n */\nmodule.exports = (options = {}) => {\n const {\n nodeEnv = 'development',\n babelEnv = 'develo...
javascript
edit
0
1
mit
986faef86b65b9ab7471077da321020ee5164cf8
fugr-ru/webpack-custom-blocks
src/set-env.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar connections = {};\n\nvar expire = function(id) {\n Presences.remove(id);\n delete connections[id];\n};\n\nvar tick = function(id) {\n connections[id].lastSeen = Date.now();\n};\n\nMeteor.startup(function() {\n Presences.remove({...
javascript
edit
0
3
mit
7106e052ff1e92dd7792908798c595b4bc4f6410
minden/meteor-presence
lib/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction makeFrontMatter(ast, dependencies) {\n\tvar value = [\n\t\t'es6id: ',\n\t\t'description: >'\n\t];\n\tvar includes;\n\n\tif (dependencies.length) {\n\t\tincludes = dependencies.map(function(file) {\n\t\t\treturn...
javascript
edit
0
2
mit
649509ca76845e45825ee75f6841d1cb894ff1e4
bocoup/test262-v8-machinery,bocoup/test262-v8-machinery
scripts/transform/comments.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\nimport {\n StyleSheet,\n Text,\n View,\n TextInput,\n TouchableHighlight,\n} from 'react-native';\n\nclass Login extends Component{\n constructor(){\n super();\n\n this.state = {\...
javascript
edit
0
1
mit
9df8d7dca7a9f881eca551551b856f8cdf5ae6a4
sf-red-pandas-2016/simul-react-native,sf-red-pandas-2016/simul-react-native,sf-red-pandas-2016/simul-react-native
simul/app/components/login.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar HttpError = require('../../lib/http-error');\nvar messageRepo = require('../../repository/message-repo');\n\nmodule.exports.create = function (req, res, next) {\n var message = req.body.message;\n checkDefined(message, 'messag...
javascript
edit
0
2
mit
94a9cefb34e1adcdae67a9402e8a6745f9e85496
rhmeeuwisse/KletsApp,rhmeeuwisse/KletsApp
klets-server/routes/messages/messages-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass ClassWithStaticMethod {\n static staticMethod() {\n return 'static method has been called.';\n }\n}\n\nconsole.log(ClassWithStaticMethod.staticMethod());\n// expected output: \"static method has been called.\"\n\n```\n\nApply...
javascript
edit
0
1
cc0-1.0
d47521a1d9281c2a89cf78bd8902c112ae16e38e
mdn/interactive-examples,mdn/interactive-examples,mdn/interactive-examples
live-examples/js-examples/classes/classes-static.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport initialState from './initialState'\n\nexport default function sourcesReducer(state = initialState.sources, action) {\n switch (action.type) {\n case 'GET_SOURCES':\n return action.payload.map (source => (\n {...so...
javascript
edit
0
2
mit
287c5ef21117352df8cde5eaa4592ce15c01031c
kevinladkins/newsfeed,kevinladkins/newsfeed,kevinladkins/newsfeed
client/src/reducers/sourcesReducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst script = String.raw`<script type=\"text/javascript\">\n var emojis = \"tada, fire, grinning\"\n var selector = \"body\"\n var url = window.location.href.replace(/(http:\\/\\/|https:\\/\\/)/gi, '').replace(/^\\/|\\/$/g, '');\n\n...
javascript
edit
0
1
mit
581b9393ac0e0c6a505bedaaf6cbb7d30c0e4f4f
EagerIO/InstantPlugin,EagerIO/InstantPlugin
app/components/application/emoji-react-demo.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @file Defines the provider settings.\n *\n * Will set the path to Mongo, and applications id\n * Most of the configuration can be done using system environment variables.\n */\n\n// Load environment variables from .env file\nvar...
javascript
edit
0
0
mit
4c2067c2609ad7af84e0384c39b0452341fb0358
AnyFetch/gcontacts-provider.anyfetch.com
config/configuration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar pg = require('pg');\nvar Hapi = require('hapi');\n\nvar server = new Hapi.Server();\n\n\nserver.connection({ port: 3000 });\n\nserver.start(function () {\n console.log('Server running at:', server.info.uri);\n});\n\n\nserver.ro...
javascript
edit
0
1
bsd-2-clause
22c91010c17691aceb15523cfa052b60cdc47d23
SpotScore/spotscore
app.js
rejected_duplicate
Near-duplicate of sample 101700
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n// Blank the document so the 404 page doesn't show up visibly.\ndocument.documentElement.style.display = 'none';\n\n// Can't use DOMContentLoaded, calling document.write or document.close inside it from\n// inside an extension causes ...
javascript
edit
0
1
bsd-3-clause
8dc31229b164225e2aa8d84f499b7bc0ef9be9f2
esprehn/chromium-codereview,esprehn/chromium-codereview
ui/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from 'tape';\nimport { Database, Router, Server } from '../../src';\n\n//\n// TODO: Check the same with XHR\n//\n\n\nexport const serverSpec = () => {\n // @TODO Test Server's config\n\n test('Server # use database', (asse...
javascript
edit
0
1
mit
41aece86398d40e173f6ed14a633a66b90f804b2
devlucky/Kakapo.js,devlucky/Kakapo.js
test/specs/server_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\nvar chalk = require('chalk');\nvar meow = require('meow');\nvar process = require('process');\n\nvar allPrograms = [\n 'atom',\n 'bash',\n 'bin',\n 'git',\n 'gnome-terminal',\n 'vim',\n 'vsco...
javascript
edit
0
2
mit
e76026335f7d999168fa377bc6b9f76295f4c7f1
Tyriar/dotfiles,Tyriar/tyr-tools,Tyriar/tyr-tools,Tyriar/dotfiles,Tyriar/dotfiles
cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nconst { run } = Ember;\n\nexport function initialize(app) {\n let config = app.container.lookupFactory('config:environment');\n let env = config.environment;\n\n if (config.cordova && config.cordova.relo...
javascript
edit
0
6
mit
9702cf0a66e26860102b2a091bc1d1600d200e57
isleofcode/ember-cordova,isleofcode/corber,isleofcode/ember-cordova,isleofcode/corber
app/instance-initializers/in-app-livereload.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport rd3 from 'rd3';\nconst BarChart = rd3.BarChart;\n\nconst barData = [\n {\n name: 'Series A',\n values: [\n { x: 1, y: 91 },\n { x: 2, y: 290 },\n { x: 3, y: 30 },\n...
javascript
edit
0
1
mit
e3adf790c0b87f32b83f9b1199268ab8374c9eb8
Bucko13/kinects-it,brnewby602/kinects-it,brnewby602/kinects-it,Kinectsit/kinects-it,Bucko13/kinects-it,Kinectsit/kinects-it
src/components/DeviceChart.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar async = require('async');\nvar _ = require('lodash');\n\nvar readTOML = require('./utils').readTOML;\nvar fileExists = require('./utils').fileExists;\n\nvar defaults = {\n account: {\n username: 'admin',\n password: 'password...
javascript
edit
0
2
mit
d0eace4d14f980d2afd1d8967b0cc9a9cd9a4468
KenanY/nwitch
lib/core/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar fs = require('fs');\nvar path = require('path');\nvar nodedir = require('node-dir');\n\nvar unzipGeoStream = require('./unzipGeoStream');\n\n\nfunction discover(input, counter, callback, silent, afterProcessingCb){\n ...
javascript
edit
0
8
cc0-1.0
566b86d0c11e8def2e018c0bfcae1ca8c7efb4f4
awolfe76/grasshopper-loader,awolfe76/grasshopper-loader,cfpb/grasshopper-loader,cfpb/grasshopper-loader
lib/getGeoFiles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n function RelatedLinksAppController($scope) {\n var vm = this;\n\n vm.relations = $scope.model.viewModel; \n var currentVariant = _.find($scope.content.variants, function...
javascript
edit
0
4
mit
7e894bf4593a3ce542ae8bfd9af05835712497e7
dawoe/umbraco-nexu,dawoe/umbraco-nexu,dawoe/umbraco-nexu
src/Our.Umbraco.Nexu.Web/App_Plugins/Nexu/controllers/related-links-app-controller.js
rejected_duplicate
Near-duplicate of sample 100306
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar TokenCache = require('./token-cache'),\n\ttokens = new TokenCache();\n\n/**\n * Returns a JWT-enabled request module.\n * @param request The request instance to modify to enable JWT.\n * @returns {Function} The JWT-enabled request m...
javascript
edit
0
9
mit
79adb264ac417a93ca252e66750076fd937142f1
extrabacon/google-oauth-jwt,0xPIT/google-oauth-jwt
lib/request-jwt.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar vows = require('vows'),\n assert = require('assert'),\n AssetGraph = require('../lib/AssetGraph');\n\nvows.describe('transforms.compressJavaScript').addBatch(function () {\n var test = {};\n [undefined, 'uglifyJs', 'yuic...
javascript
edit
0
2
bsd-3-clause
f95cf530a32f0637536e606d864139d0cde80372
jscinoz/assetgraph,jscinoz/assetgraph,papandreou/assetgraph,papandreou/assetgraph,assetgraph/assetgraph,jscinoz/assetgraph,papandreou/assetgraph
test/compressJavaScript-test.js
rejected_duplicate
Near-duplicate of sample 99643
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { makeStyles } from '@material-ui/core/styles'\nimport Fab from '@material-ui/core/Fab'\nimport Badge from '@material-ui/core/Badge'\n\nconst useStyles = makeStyles(() => ({\n\tfork: {\n\t\tposition: 'a...
javascript
edit
0
2
mit
6a1d280e8a0f576b4129b7fe5ca71ba93a1095b6
ooade/NextSimpleStarter
components/Fork.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { createSelector } from 'reselect';\nimport isEmpty from 'lodash/isEmpty';\nimport {\n parseSelectedLocations,\n getSelectedLocationsFilter,\n addSelectedNameToLocations\n} from 'selectors/compare';\n\n// values from search\nc...
javascript
edit
0
4
mit
f0356ca4109dcb20143aeaa703d74d7f13c65451
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
app/javascript/app/components/compare/compare-ndc-content-overview/compare-ndc-content-overview-selectors.js
rejected_duplicate
Near-duplicate of sample 73015
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction get(i){\n\treturn document.getElementById(i)\n}\nfunction random_number(){\n\tif(value('repeat')<1){\n\t\tget('repeat').value=1\n\t}\n\ti=value('repeat')-1;\n\trange=parseInt(value('range'))+1;\n\tdo{\n\t\tresult+=Math.floor(Ma...
javascript
edit
0
5
cc0-1.0
952b351d8a7be859c22f79ea5d2225acf87b3ccb
iterami/RNG.htm,iterami/RNG.htm
rng.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance wi...
javascript
edit
0
3
apache-2.0
1634fe192df5994ce9ce4b323de89f5351fbfffb
Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode,Ensembl/ensembl-webcode
htdocs/components/00_jquery_togglebutton.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * App Dependencies.\n */\n\nvar loopback = require('loopback')\n , app = module.exports = loopback()\n , fs = require('fs')\n , path = require('path')\n , request = require('request')\n , TaskEmitter = require('sl-task-emitte...
javascript
edit
0
1
mit
c554a2b89f64b9f522a16d3080d8c81990b09d82
strongloop-bluemix/loopback-example-app,svennam92/loopback-example-app,hacksparrow/loopback-example-app,sam-github/sls-sample-app,jewelsjacobs/loopback-example-app,jewelsjacobs/loopback-example-app,rvennam/loopback-example-app,svennam92/loopback-example-app,rvennam/loopback-example-app,Joddsson/loopback-example-app,rve...
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * GET /api/challenges\n * List of challenges.\n */\nexports.getChallenges = function getChallenges(req, res) {\n res.json({ challenges: [] });\n};\n\n/**\n * POST /api/challenges\n * Create new challenges.\n */...
javascript
edit
0
1
mit
801e990ae4b3433ab1800bbdfd6d8c9921fc2029
lostatseajoshua/Challenger
controllers/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n isSecure: function (successCallback, errorCallback) {\n cordova.exec(successCallback, errorCallback, \"MobitorSecure\", \"isSecure\", [null]);\n }\n};\n```\n\nApply this change: Fix method and add d to ...
javascript
edit
0
1
mit
89a9146eb112386279c5bfb54845e93a571b62a7
jmoore6364/mobitor-cordova-secure,jmoore6364/mobitor-cordova-secure
www/mobitorSecure.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport sourcemaps from 'rollup-plugin-sourcemaps';\n\nexport const globals = {\n // Apollo\n 'apollo-client': 'apollo.core',\n 'apollo-link': 'apolloLink.core',\n 'apollo-link-batch': 'apolloLink.batch',\n 'apollo-utilities': 'apol...
javascript
edit
0
2
mit
2d94f56750717d4a6479b8eed940b103b53a0f61
apollographql/apollo-link,apollographql/apollo-link
rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\ntype Configuration = {\n refreshToken: () => Promise<void>,\n shouldRefreshToken: (error: any) => boolean,\n fetch: (url: any, options: Object) => Promise<any>\n}\n\nfunction configureRefreshFetch (configuration: Configur...
javascript
edit
null
null
mit
bc1ab08e8f40fd8586cfb91e18e2c28868700a21
vlki/refresh-fetch
src/configureRefreshFetch.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst elements = document.querySelectorAll('bracket-less');\n\nfunction doAction(e) {\n if (e.target.tagName !== 'BRACKET-LESS') return;\n e.target.classList.toggle('bracket-less');\n e.stopPropagation();\n}\n\ndocument.body.addEvent...
javascript
edit
0
2
isc
b52476d5f5c59cc2f0d5df2270b4f35b86b166c0
mrv1k/bracketless,mrv1k/bracketless
core/src/action.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This file exists because it is the file in the tool that is not automatically\n// transpiled by Babel\n\nfunction babelRegister() {\n require(\"meteor-babel/register\")({\n babelOptions: require(\"meteor-babel\").getDefaultOption...
javascript
edit
0
1
mit
01526d30ab470b2872ac98f62d6a8712d78eddbc
cherbst/meteor,jeblister/meteor,kengchau/meteor,cherbst/meteor,deanius/meteor,karlito40/meteor,h200863057/meteor,Jonekee/meteor,guazipi/meteor,Puena/meteor,planet-training/meteor,deanius/meteor,namho102/meteor,chiefninew/meteor,TechplexEngineer/meteor,allanalexandre/meteor,baiyunping333/meteor,jeblister/meteor,katopz/m...
tools/main-transpile-wrapper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Greasemonkey EndomondoDesign\n// @namespace https://github.com/JanisE\n// @include *www.endomondo.com/*\n// @version 1\n// @grant none\n// ==/UserScript==\n\nvar css = document.createElement('style');\ncss.ty...
javascript
edit
0
0
mit
0b49d0bb7a4dc577c0664775f2c53d86c3c6f486
JanisE/greasemonkey-endomondo-design
greasemonkey-endomondo-design.user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport Document, { Head, Main, NextScript } from 'next/document'\nimport stylesheet from 'pages/styles.scss'\n\nexport default class MyDocument extends Document {\n render () {\n return (\n <html>\n ...
javascript
edit
0
1
mit
dd1fa20110373e12ac2b9a67ace0d6cf4dabea0c
bmagic/acdh-client
pages/_document.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar playlist = WaveformPlaylist.init({\n samplesPerPixel: 3000,\n mono: true,\n waveHeight: 100,\n container: document.getElementById(\"playlist\"),\n state: 'cursor',\n waveOutlineColor: '#E0EFF1',\n colors: {\n waveOutline...
javascript
edit
0
1
mit
fb3508a81f101d1c376deff610d7f93af5d426ba
naomiaro/waveform-playlist,naomiaro/waveform-playlist
ghpages/js/stationary-track.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst components = require('idyll-components');\nconst IdyllDocument = require('idyll-document');\nconst React = require('react');\n\nclass Renderer extends React.PureComponent {\n render() {\n const { idyllMarkup, ast, idyllHash } ...
javascript
edit
0
1
mit
4b956b5e7fb6206f17fdaf9f770afe6734827455
idyll-lang/idyll,idyll-lang/idyll
packages/idyll-editor/src/renderer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport {withInfo} from '@storybook/addon-info'\nimport {storiesOf} from '@storybook/react'\n\nimport Board from '../src'\n\nconst data = {\n lanes: [\n {\n id: 'lane1',\n title: 'Planned Tasks',\...
javascript
edit
0
1
mit
18b70b1dfc2e258215596e561cf37369fc467a9d
rcdexta/react-trello,rcdexta/react-trello
stories/Interactions.story.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('The constructor is supposed a proper WgaPipeline object', function(){\n\tit('Constructor wgaPipeline exists', function(){\n\t\texpect(WgaPipeline).toBeDefined();\n\t});\n\tvar svg = $('<svg></svg>');\n\tvar wga = new WgaPipeli...
javascript
edit
0
1
mit
76f211a93cba95050f5fcbcdada228f9e3c42936
AliTVTeam/AliTV,BioInf-Wuerzburg/AliTV,AliTVTeam/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV,BioInf-Wuerzburg/AliTV
d3/test/spec/test_wgaPipeline.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar f = \"MMM Do YYYY\";\n\nfunction calcWidth(name) {\n return 250 + name.length * 6.305555555555555;\n}\n\nWebApp.connectHandlers.use(\"/package\", function(request, response) {\n if(request.url.split('/')[1] != ''){\n var url = `h...
javascript
edit
0
2
mit
8b96e99cb55204088d239e2ec63e5af535068786
sungwoncho/meteor-icon,sungwoncho/meteor-icon
server/routes.js
accepted
null
true