messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n isPlayable,\n isVideo,\n isAudio,\n isPlayableTorrent\n}\n\nvar path = require('path')\n\n/**\n * Determines whether a file in a torrent is audio/video we can play\n */\nfunction isPlayable (file) {\n return is... | javascript | edit | 0 | 2 | mit | ade6c1e4a0b1de5e95cf10e9f80c85c2fd1d2ad1 | feross/webtorrent-desktop,michaelgeorgeattard/webtorrent-desktop,yciabaud/webtorrent-desktop,feross/webtorrent-app,webtorrent/webtorrent-desktop,michaelgeorgeattard/webtorrent-desktop,feross/webtorrent-app,webtorrent/webtorrent-desktop,yciabaud/webtorrent-desktop,feross/webtorrent-desktop,michaelgeorgeattard/webtorrent... | renderer/lib/torrent-player.js | rejected_duplicate | Near-duplicate of sample 86718 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n\n model () {\n return this.get('store').findAll('expense');\n // return this.get('store').findAll('expense')\n // .then(response => response.filter(expense ... | javascript | edit | 0 | 2 | mit | c6fd27aada1305fbf54e46033fdecc70c2ee86bc | pe1te3son/spendings-tracker,pe1te3son/spendings-tracker | app/routes/home.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction download(filename, text, click = true) {\n const element = document.createElement('a');\n element.setAttribute('href', `data:text/plain;charset=utf-8,${encodeURIComponent(text)}`);\n element.setAttribute('download', filename... | javascript | edit | 0 | 2 | mit | 48b12c46bc2dcd425c0f0dfcd33466d12136cccd | mhoffman/CatAppBrowser,mhoffman/CatAppBrowser | app/utils/index.js | rejected_duplicate | Near-duplicate of sample 85921 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nApplication.Services.factory('watcher',\n function () {\n var watcherService = {};\n\n watcherService.watch = function (scope, variable, fn) {\n scope.$watch(variable, function (newval, oldval) {\n ... | javascript | edit | 0 | 5 | mit | 00046478f03823f0ac4467c7648dcace43078050 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | website/app/application/services/watcher-service.js | rejected_duplicate | Near-duplicate of sample 72775 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport {\n withHistory,\n Route,\n Switch,\n Router\n} from './Core'\n\n// Accessories\nexport Link from './Link'\nexport Redirect from './Redirect'\nexport Prompt from './Prompt'\n\n// High-level wrappers\nexport BrowserRouter from... | javascript | edit | null | null | mit | 67c61692571c9ab236fb44df3b5916a5b77a0b02 | asaf/react-router,OpenGov/react-router,ReactTraining/react-router,rackt/react-router,OpenGov/react-router,rafrex/react-router,rafrex/react-router,reactjs/react-router,d-oliveros/react-router,rackt/react-router,d-oliveros/react-router,reactjs/react-router,OpenGov/react-router,goblortikus/react-router,goblortikus/react-r... | modules/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(document) {\n\n document.addEventListener(\"wheel\", function(e) {\n if (e.shiftKey) {\n if (e.deltaX > 0) {\n window.history.back();\n return e.preventDefault();\n } else if (e.deltaX < 0) {\n ... | javascript | edit | 0 | 3 | mit | 5ae87d670f47e10c460a52bb0adc7846aa0ebb1a | jezcope/chrome-scroll-back | js/scrollback.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport * as React from 'react'\nimport {StyleSheet, ScrollView} from 'react-native'\nimport {TableView} from 'react-native-tableview-simple'\nimport type {TopLevelViewPropsType} from '../types'\n\nimport CredentialsLoginSect... | javascript | edit | null | null | mit | 58b783b877d56b29bd7c2075625374ee76d7720f | carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls,carls-app/carls | source/views/settings/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar md = (function () {\n // marked\n var defaults = {\n gfm: true,\n tables: true,\n breaks: false,\n pedantic: false,\n sanitize: false,\n // sanitizer: null,\n // mangle: true, // mangling of email addresses\... | javascript | edit | 0 | 2 | mit | 20cadcb89995c43ff04d67d643ae896ab2380fd2 | simov/markdown-viewer,simov/markdown-viewer,simov/markdown-viewer | js/background/markdown.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n\nvar nodeUtils = require('util');\n\n\nvar REASONS = {\n 'values' : 'Given objects are not equal',\n 'types' : 'Given objects are of different types',\n 'prototypes' :... | javascript | edit | 0 | 3 | mit | d75b2eb07a271a6ffe1854f15fcc4838c80b8e12 | dervus/assert-paranoid-equal | lib/assert-full-equal/report.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Angular crypto-js\n * https://github.com/janppires/angular-crypto-js.git\n **/\n (function(angular, CryptoJS){\n 'use strict';\n\n angular\n .module('angular-crypto-js', [])\n .factory('cryptoJs', [cryptoJs... | javascript | edit | 0 | 1 | mit | ffcca5e47eafa16d271847ad0dc412265c7e279f | janppires/angular-crypto-js | angular-crypto-js.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Copyright 2002-2014, University of Colorado Boulder\n\n/**\n * Base class for button models, which describe the behavior of buttons when users interact with them. Property values\n * are set by an associated listener, see ButtonList... | javascript | edit | 0 | 1 | mit | 23d0b9e021d3635bbc3465c4adb27c45fa5b110c | phetsims/sun,phetsims/sun,phetsims/sun | js/buttons/ButtonModel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {bindable, customAttribute} from 'aurelia-templating';\r\nimport {inject} from 'aurelia-dependency-injection';\r\nimport {fireEvent} from '../common/events';\r\n\r\n@customAttribute('md-autocomplete')\r\n@inject(Element)\r\nexpor... | javascript | edit | 0 | 3 | mit | 6a2ed6e510932edce48dddb2ff35462fb9a677bd | aurelia-ui-toolkits/aurelia-materialize-bridge,aurelia-ui-toolkits/aurelia-materialize-bridge,aurelia-ui-toolkits/aurelia-materialize-bridge | src/autocomplete/autocomplete.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nif (typeof define === \"function\" && define.amd) {\n define(function() {\n return jBone;\n });\n}\n\nif (typeof win === \"object\" && typeof win.document === \"object\") {\n win.jBone = win.$ = jBone;\n}\n\n}());\n\n```... | javascript | edit | null | null | mit | ba3ee93d05d7cd3c1baa7d739e909b39762fb9dc | kupriyanenko/jbone,npmcomponent/kupriyanenko-jbone,kupriyanenko/jbone | build/footer.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst RateLimiter = require(\"rolling-rate-limiter\");\n\nconst config = require('../config');\n\nconst validKeys = ['key1','key2', 'key3', 'key4', 'key5']; //TODO replace API keys in request with JWT-token?\nconst limiter = RateLimiter... | javascript | edit | 0 | 2 | mit | 904d671d035dbc294a1e4415191cb75492a37040 | umasudhan/weather | lib/validator.js | rejected_duplicate | Near-duplicate of sample 73255 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2012 The Chromium Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style license that can be\n * found in the LICENSE file.\n **/\n\n/**\n * Listens for the app launching then creates ... | javascript | edit | 0 | 1 | bsd-3-clause | 8fd4eac5073272ca3f71cb469f402140162035b9 | Jonekee/chromium.src,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,jaruba/chromium.src,patrickm/chromium.src,dushu1203/chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,Chilled... | chrome/common/extensions/docs/examples/apps/calculator/app/background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar debug = require('debug')('passport-mongo');\nvar app = require('./app');\n\napp.set('port', 27017);\n\nvar server = app.listen(app.get('port'), function() {\n debug('Express server listening on port ' + serve... | javascript | edit | 0 | 1 | mit | e12cf258825375468cb191982b6a8cc445135e16 | KevinElberger/MtgCardApp,KevinElberger/MtgCardApp | app/server/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// We save the user language preference in the user profile, and use that to set\n// the language reactively. If the user is not connected we use the language\n// information provided by the browser, and default to english.\n\nTracker.a... | javascript | edit | 0 | 6 | mit | 1c206d0d367cbb4b6aa2e350ce944397bd48b988 | wekan/wekan,mario-orlicky/wekan,wekan/wekan,oliver4u/sap-wekan,mario-orlicky/wekan,libreboard/libreboard,johnleeming/wekan,ddanssaert/wekan,johnleeming/wekan,Serubin/wekan,libreboard/libreboard,GhassenRjab/wekan,nztqa/wekan,wekan/wekan,jtickle/wekan,nztqa/wekan,nztqa/wekan,jtickle/wekan,Serubin/wekan,wekan/wekan,wekan/... | client/lib/i18n.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst updateComment = (body, commentArr = []) => {\n body = body.map((obj, index, array) => {\n if (obj.type === 'Line' || obj.type === 'Block') {\n commentArr.push(obj)\n if (array[index + 1] === undefined) {\n arr... | javascript | edit | 0 | 7 | mit | 6be0661e9715b39a308cb5c89fd7cf074610fa35 | cleanlang/clean,cleanlang/clean,cleanlang/clean | lib/updateComment.js | rejected_duplicate | Near-duplicate of sample 100126 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ngoog.provide('ngeo.proj.EPSG32631');\n\ngoog.require('ol.proj');\n\nif (typeof proj4 == 'function') {\n const epsg32631def = [\n '+proj=utm',\n '+zone=31',\n '+ellps=WGS84',\n '+datum=WGS84',\n '+units=m',\n '+no_defs... | javascript | edit | 0 | 0 | mit | 4a23530a861c0a733521a9c3a5cc8f165de97fee | adube/ngeo,Jenselme/ngeo,adube/ngeo,camptocamp/ngeo,adube/ngeo,camptocamp/ngeo,adube/ngeo,camptocamp/ngeo,camptocamp/ngeo,camptocamp/ngeo,Jenselme/ngeo,Jenselme/ngeo,Jenselme/ngeo | src/proj/epsg32631projection.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//Render a simple vertical check box group, where the buttons all have the same sizes\n//TODO: not ready for use in simulations, it will need further development & discussion first.\ndefine( function( require ) {\n \"use strict\";\n\n ... | javascript | edit | 0 | 4 | mit | 8488da0e96cf30bf7f064a13292b2e0a5d03c5b8 | phetsims/sun,phetsims/sun,phetsims/sun | js/VerticalCheckBoxGroup.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add day 7 solution part 2"
},
{
"role": "assistant",
"content": "// Part 1\nI=document.body.innerText.split`\\n`,I.map(x=>x.split` `[0]).find(w=>!I.some(e=>[...e.split`>`,''][1].includes(w)))\n\n// Part 2\nP={},document.body.... | javascript | new_file | 0 | 2 | mit | 5401f4f4c8ae6ca81cabc84a5fbd247e4b1f82ae | yishn/adventofcode,yishn/adventofcode | 2017/07.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar step = '<font style=\"font-size:85%\">'\n + '<p>Test Purpose: </p>'\n + '<p>Verifies the device supports tizen vehicle information and vehicle data API.</p>'\n + '<p>Test Step: </p>'\n + '<p>'\n ... | javascript | edit | 0 | 0 | bsd-3-clause | 703a27408398344ce53b38727ea96ee6ebd53922 | ibelem/crosswalk-test-suite,yunxliu/crosswalk-test-suite,ibelem/crosswalk-test-suite,yunxliu/crosswalk-test-suite,crosswalk-project/crosswalk-test-suite,haoxli/crosswalk-test-suite,yunxliu/crosswalk-test-suite,chunywang/crosswalk-test-suite,kaixinjxq/crosswalk-test-suite,kangxu/crosswalk-test-suite,haoyunfeix/crosswalk... | usecase/usecase-webapi-xwalk-tests/steps/Vehicle/step.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * JADE DIRECTIVES\n *\n */\n\nvar module = angular.module('jade', []);\n\n/**\n * Jade Replace\n */\nmodule.directive('rpJadeReplace', function($rootScope, $compile) {\n return {\n restrict: 'A',\n scope: false,\n link: ... | javascript | edit | 0 | 2 | isc | e728d402d02b480e1d89ed63cca3ab42c4d2ef0c | dncohen/ripple-client-desktop,MatthewPhinney/ripple-client,xdv/ripple-client-desktop,vhpoet/ripple-client-desktop,dncohen/ripple-client-desktop,yxxyun/ripple-client,MatthewPhinney/ripple-client,resilience-me/DEPRICATED_ripple-client,vhpoet/ripple-client,darkdarkdragon/ripple-client-desktop,darkdarkdragon/ripple-client-... | src/js/directives/jade.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n/**\n * @fileOverview Find scroll parent\n */\n\nexports.default = function (node) {\n if (!node) {\n return document.documentElement;\n }\n\n... | javascript | edit | 0 | 12 | mit | 7217cb603778f2d9459ae65c21b5bf77971157dc | jasonslyvia/react-lazyload | lib/utils/scrollParent.js | rejected_complexity | Cyclomatic complexity too high: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.up = function(knex) {\n return knex.schema.createTable('users', table => {\n table.increments().primary();\n table.timestamps();\n table.string('name');\n });\n};\n\nexports.down = function(knex) {\n return knex.sche... | javascript | edit | 0 | 1 | mit | 89251d5a6a09e221832572b70cc09f98dbc7989e | pushkin-npm/pushkin-cli,pushkin-npm/pushkin-cli,pushkin-npm/pushkin-cli | templates/migrations/4_users.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n commands: {\n fullwidth: {\n help: 'Creates an aesthetic',\n aliases: [ 'vw', 'fw' ],\n command: function (bot, msg) {\n let codePoints = Array.prototype.map.call(msg.body, (c) => c.codePoi... | javascript | edit | 0 | 4 | isc | 3f8a23d785e1036fe65315938a0dee9bb8a77eba | zuzakistan/civilservant,zuzakistan/civilservant | modules/fullwidth.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n\n \"use strict\";\n\n window.addEventListener('message', function(event) {\n if (event.data === 'debugger-client') {\n var port = event.ports[0];\n listenToPort(port);\n } else if (event.data.type) {\n ... | javascript | edit | 0 | 3 | mit | ae530367b59848c2259bf50e85e087634dab9bb1 | teddyzeenny/ember-extension,NikkiDreams/ember-inspector,emberjs/ember-inspector,vvscode/js--ember-inspector,knownasilya/ember-inspector,jryans/ember-inspector,dsturley/ember-inspector,chrisgame/ember-inspector,teddyzeenny/ember-extension,teddyzeenny/ember-inspector,maheshsenni/ember-inspector,sivakumar-kailasam/ember-i... | dist_chrome/content-script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Link } from 'react-router';\n\nclass HeaderDashboard extends React.Component {\n shouldComponentUpdate(nextProps, nextState, nextContext) {\n const { location: key, currentUser } = this.context;\... | javascript | edit | 0 | 2 | apache-2.0 | 30d0019b24834e89de7e20345939f6a5db852951 | evancorl/skate-scenes,evancorl/skate-scenes,evancorl/portfolio,evancorl/portfolio,evancorl/portfolio,evancorl/skate-scenes | imports/client/components/main-layout/user-navigation/header-dashboard.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport CodeMirror from \"codemirror\"\nimport _ from \"underscore\"\n\nrequire(\"codemirror/addon/mode/multiplex\")\nrequire(\"codemirror/addon/edit/trailingspace\")\n\n// Load modes\n_.each([\n \"gfm\",\n \"javascript\",\n \"ruby\",... | javascript | edit | 0 | 1 | mit | 5bd66d4f6c3bbda62f52d2e7dc0001a567741e85 | doryphores/down-quark,doryphores/down-quark | src/utils/code_mirror_setup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport primerStyles from '!!raw-loader!postcss-loader!../../../../../src/index.scss'\n\nfunction LivePreviewWrapper({children}) {\n return (\n <>\n <style>{primerStyles}</style>\n <link rel=\"sty... | javascript | edit | 0 | 1 | mit | 00690d2d264841a73a6728efc77dd3defe095fe0 | primer/primer,primer/primer,primer/primer-css,primer/primer-css,primer/primer,primer/primer-css | docs/src/@primer/gatsby-theme-doctocat/components/live-preview-wrapper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n\n // Send GA event when user scrolls to the bottom of the page, which we interpret as them reading the content\n // on the page.\n (function(){\n var triggered = false;\n $(window... | javascript | edit | 0 | 2 | mit | 6cfb39df1495d209966f216c6d4838b1bcfd7559 | MasterRoot24/masterroot24.github.io,MasterRoot24/masterroot24.github.io,MasterRoot24/masterroot24.github.io | assets/js/cv.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nlet lib = require('../index'),\n Point2D = lib.Point2D,\n Intersection = lib.Intersection;\n\nlet circle = {\n cx: new Point2D(0, 0),\n r: 50,\n};\n\nlet rectangle = {\n p1: new Point2D(0, 0),\n ... | javascript | edit | 0 | 0 | bsd-3-clause | a0c5179d4c68e169d6deae210aec415db84fa161 | thelonious/kld-intersections,thelonious/kld-intersections,thelonious/kld-intersections | examples/example-1.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright (C) 2017 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a ... | javascript | edit | 0 | 1 | apache-2.0 | d108bdc4cc7e1ae8bb7c25c80987eb8d0afefb0e | GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit | polygerrit-ui/app/elements/plugins/gr-endpoint-param/gr-endpoint-param.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar rootPath = path.normalize(__dirname + '/../');\n\nmodule.exports = {\n development: {\n rootPath: rootPath,\n dbConn: 'mongodb://localhost:27017/fileuploadsystem',\n uploadsPath: ... | javascript | edit | 0 | 0 | mit | 9d524748e5ab9773b7960fcbd6f52afa6bfd457b | georgiwe/FileUploadSystem | config/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst StripeResource = require('../StripeResource');\nconst stripeMethod = StripeResource.method;\n\nmodule.exports = StripeResource.extend({\n path: 'invoices',\n\n includeBasic: ['create', 'del', 'list', 'retrieve',... | javascript | edit | 0 | 0 | mit | 16e5e6f977a38b1d02044bea72046fbe4d3e8c95 | stripe/stripe-node,stripe/stripe-node | lib/resources/Invoices.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nmodule.exports = {\n up: function(queryInterface, Sequelize) {\n return queryInterface.createTable('Users', {\n id: {\n allowNull: false,\n autoIncrement: true,\n primaryKey: true,\n t... | javascript | edit | 0 | 1 | mit | fe6bb263e461b810d36fa7492e1d437dc52287e5 | nowhere-cloud/node-api-gate | migrations/0000-create-user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n\nrequire('babel-register');\n\n\nconst RG = require('../client/src/battles');\nconst RGTest = require('../tests/roguetest');\n\nconst fact = new RG.Factory.Base();\n\nconst levels = [];\n\nfor (let i = 0; i < 1000; i++) {\n const ... | javascript | edit | 0 | 0 | mit | 40d335f2cad4f73df28a6401ae1f7917072758dc | tpoikela/battles,tpoikela/battles,tpoikela/battles,tpoikela/battles,tpoikela/battles | scripts/mem-test-with-levels.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst banner = [\n '/**',\n ' * Sanity role: ROLE_NAME',\n ' * ',\n ' * Sanity plugin loader multi-fulfiller wrapper',\n ' * Imports all fulfillers, then exports them as an array',\n ' */'\n]\n\nmodule.exports = fu... | javascript | edit | 0 | 1 | mit | 4857a10de605839440a9a259a848612b53efe79c | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | packages/@sanity/webpack-loader/src/multiFulfillerHandler.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'libs/bean',\n 'libs/bonzo',\n 'libs/qwery'\n], function(\n bean,\n bonzo,\n qwery\n) {\n\n var defaultValue = bonzo(qwery('.sign-up__input')).attr('value');\n\n return {\n init: function() {\n ... | javascript | edit | 0 | 2 | mit | f52de73995018b521786154b04c9995551a65dd7 | sammorrisdesign/Monthly-mix,sammorrisdesign/Monthly-mix,sammorrisdesign/Monthly-mix | source/_js/modules/sign-up.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport addons, { makeDecorator } from '@storybook/addons';\nimport marked from 'marked';\n\nfunction renderMarkdown(text, options) {\n marked.setOptions({ ...marked.defaults, options });\n return marked(text);\n}\n\nexport const withN... | javascript | edit | 0 | 6 | mit | 6cc25b6d16cb0aad4a1bded14bb754bc4fc476f6 | storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook | addons/notes/src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react'\n\nimport SearchFilter from './SearchFilter'\nimport Labels from '../constants/Labels'\n\nexport default React.createClass({\n propTypes: {\n filters: PropTypes.array.isRequired,\n locatio... | javascript | edit | 0 | 3 | mit | 55a818b10e50942c684db80f983a395ea2890bbd | digibib/ls.ext,digibib/ls.ext,digibib/ls.ext,digibib/ls.ext | redef/patron-client/src/frontend/components/SearchFilters.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// base path, that will be used to resolve files and exclude\nbasePath = '../';\n\n\n// list of files / patterns to load in the browser\nfiles = [\n ANGULAR_SCENARIO,\n ANGULAR_SCENARIO_ADAPTER,\n 'test/e2e/*.spec.js'\n];\n\n\n// lis... | javascript | edit | 0 | 0 | mit | 94ebc193a331c50a9c4648fcf6024eb807cb4a4f | qloo/angular-prevent-default,jackvsworld/angular-prevent-default,minddistrict/angular-prevent-default,jackvsworld/angular-prevent-default | config/karma-e2e.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport const dataKey = 'value'\nconst createOnDragStart =\n (name, value) =>\n event => {\n event.dataTransfer.setData(dataKey, value)\n }\n\nexport default createOnDragStart\n\n```\n\nApply this change: Change drag dataKey ... | javascript | edit | 0 | 1 | mit | 96760d99ac0cd49384f624cfe85a104655fe00e5 | erikras/redux-form,erikras/redux-form | src/events/createOnDragStart.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst path = require('path');\n\nlet version;\nmodule.exports = () => {\n if (!version) {\n version = `v${require(path.join(process.cwd(), 'package.json')).version}`;\n try {\n version += '-' + fs.... | javascript | edit | 0 | 4 | mit | 3db52d56f46609c7c658eeca8032a3142a89f79f | maxdome/maxdome-node,maxdome/maxdome-node | packages/version/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport DS from \"ember-data\";\r\n\r\nexport default DS.Model.extend( {\r\n\tbody: DS.attr(\"string\"),\r\n\tsolution: DS.attr(\"string\"),\r\n\tthread: DS.belongsTo(\"thread\", { async: true }),\r\n\tmodules: DS.hasMany(\"module\"),\r... | javascript | edit | 0 | 0 | mit | fee19fd577b5b43fb94a2b9729981441c2e0bd8d | fi-ksi/web-frontend,fi-ksi/web-frontend,fi-ksi/web-frontend | app/models/task-detail.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport { render } from \"react-dom\";\nimport ProjectSamples from \"./components/ProjectSamples\";\nimport { configureStore } from \"@reduxjs/toolkit\";\nimport { setupListeners } from \"@reduxjs/toolkit/qu... | javascript | edit | 0 | 1 | apache-2.0 | b963eb61d7cfb35b992ee6b094800eadd207f752 | 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/projects/samples/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar ObjectId = mongoose.Schema.Types.ObjectId;\nvar Location = require('./location_model');\n\nvar XeroAccountSchema = new Schema({\n\tlocation_id: { type... | javascript | edit | 0 | 0 | mit | ffc2fc89e92c4e53756d7ceae34c0c881d0bbbd0 | 10layer/jexpress,10layer/jexpress | models/xeroaccount_model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { KEYBINDING_UPDATE } from 'core/actions/types';\nimport { defaultCommands } from './defaults';\n\nexport default function keyboardConfigReducer(\n state = defaultCommands,\n action,\n) {\n if (action.type !== KEYBINDING_UPDAT... | javascript | edit | 0 | 3 | mit | ae6bc681638ab96f274ae083cedcf6d86d42c3dd | reblws/tab-search,reblws/tab-search | src/core/reducers/keyboard.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Path = require('path')\n\nconst action = process.argv[2]\nvar args = process.argv.slice(3)\nvar env, bin\n\nswitch (action) {\n case 'build':\n bin = 'webpack'\n env = 'production'\n break\n\n case 'dist':\n case 'stat... | javascript | edit | 0 | 0 | mit | 174750770ae42a0b4ae1969c5ac2be5e7364bf0e | neves/vwp,neves/vwp | bin/vwp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nMeteor.methods({\n 'addFirstUserToAdminRole': function () {\n /*\n Look for existing users and set initial user as admin\n */\n\n // Count registered users\n var userCount = Meteor.users().count();\n\n // If there is... | javascript | edit | 0 | 4 | mit | 0dc2b1f648a0d7fe74a8c2bc15da318b1a63e048 | brylie/meteor-first-user-admin | server/methods/users.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Vector from \"./Vector.js\";\nimport * as constants from \"./constants\";\nimport * as pointUtils from \"./pointUtils\";\n\nimport * as movementUtils from \"./movementUtils\";\n\nlet initNum = 0;\nexport default class Body {\n ... | javascript | edit | 0 | 2 | mit | cc0c2a5263509b9c32b2e58962545034ede91ef6 | Mark-Simulacrum/gravity-simulator,Mark-Simulacrum/gravity-simulator | public/javascript/Body.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n\t$('textarea').focus();\n\n\t$('form').on('submit', function (event) {\n\t\tevent.preventDefault();\n\n\t\tvar text = $('textarea').val();\n\t\tvar y = 0;\n\n\t\tif (text == '') {\n\t\t\ttext = 'You sho... | javascript | edit | 0 | 2 | mit | f42add059011861b4db0d49c6d328619f70038bc | jendewalt/jennifer_dewalt,cgvarela/jennifer_dewalt,cgvarela/jennifer_dewalt,altairn5/jennifer_dewalt,Jessieca/jennifer_dewalt,Jessieca/jennifer_dewalt,Jessieca/jennifer_dewalt,altairn5/jennifer_dewalt,jendewalt/jennifer_dewalt,altairn5/jennifer_dewalt,jendewalt/jennifer_dewalt,cgvarela/jennifer_dewalt | public/js/teleprompter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar node = nodeDefinitions(\n function(globalId, ast) {\n var gid = fromGlobalId(globalId);\n var fieldKind = gid.id.match(/^[0-9]+$/) ? 'IntValue' : 'StringValue';\n var override = { arguments: [{ name: { value:... | javascript | edit | 0 | 2 | mit | 4760d6baeba25706dc6268af3f64e97a7c009dab | rexxars/sql-to-graphql,rexxars/sql-to-graphql,vaffel/sql-to-graphql,vaffel/sql-to-graphql | steps/ast-builders/templates/node-def-cjs.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function (window) {\n window.__env = window.__env || {};\n if (window.location.port) {\n window.__env.hostUrl = window.location.protocol + '//' + window.location.hostname + ':' + window.location.port + '/';\n }\n els... | javascript | edit | 0 | 3 | mit | 04a43ec149c38f5acc013237899cfbe6822af91a | MontrealCorpusTools/polyglot-server,MontrealCorpusTools/polyglot-server,MontrealCorpusTools/polyglot-server,MontrealCorpusTools/polyglot-server | iscan/static/iscan/env.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport resolve from 'rollup-plugin-node-resolve';\nimport commonjs from 'rollup-plugin-commonjs';\nimport babel from 'rollup-plugin-babel';\n\nexport default {\n entry: 'src/index.js',\n plugins: [\n commonjs(),\n re... | javascript | edit | 0 | 0 | mit | a429e6a5d3af7a847000a36fee67da3423dc8c8e | ConrabOpto/komx-react | rollup.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar SettingsGeneralController = Ember.ObjectController.extend({\n isDatedPermalinks: function (key, value) {\n // setter\n if (arguments.length > 1) {\n this.set('permalinks', value ? '/:year/:month/:day/:slu... | javascript | edit | 0 | 3 | mit | 613a39031fc6322f04cf6730bbc09d9b984d313f | dbalders/Ghost-Admin,airycanon/Ghost-Admin,JohnONolan/Ghost-Admin,airycanon/Ghost-Admin,TryGhost/Ghost-Admin,kevinansfield/Ghost-Admin,JohnONolan/Ghost-Admin,acburdine/Ghost-Admin,acburdine/Ghost-Admin,dbalders/Ghost-Admin,kevinansfield/Ghost-Admin,TryGhost/Ghost-Admin | controllers/settings/general.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport logger from 'morgan';\nimport validator from 'express-validator';\nimport bodyParser from 'body-parser';\nimport verifyToken from './middlewares/auth';\nimport valueChecker from './middlewares/valu... | javascript | edit | 0 | 1 | mit | 0ee382387ff83da0c740dbc05c1a567b4f60cde1 | vynessa/dman,vynessa/dman | server/server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport styles from './Icon.css';\n\ntype Props = {\n /** Name of the icon can be found on the webpage*/\n name: string,\n scaleOnHover?: boolean,\n className?: string,\n size?: number,\n style?: Object,\n};\n\n/**\n * ... | javascript | edit | null | null | mit | e04ca3b0e41a521422876cfdc0d81f2afb7791ad | webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp | app/components/Icon/index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * This file specifies the database collection and field names.\n */\nexport const COLLECTION_TRIPS = 'trips';\nexport const TRIPS_TITLE = 'title';\nexport const TRIPS_DESCRIPTION = 'description';\nexport const TRIPS_DESTINATION = ... | javascript | edit | 0 | 0 | apache-2.0 | 7e932c5804173f5de76995d900c67d9b53a62194 | googleinterns/SLURP,googleinterns/SLURP,googleinterns/SLURP | frontend/src/constants/database.js | rejected_duplicate | Near-duplicate of sample 79747 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar wompt = require('./includes');\n\nfunction MetaUserManager(){\n\tthis.meta_users = {};\n\tthis.expirer = new wompt.Expirer(this.meta_users,{\n\t\tkeep_if: function(mu){\n\t\t\treturn mu.clients.count > 0;\n\t\t},\n\t\ttime_attribute... | javascript | edit | 0 | 3 | mit | d07c941ae1b443a83e76ded60167ddb80f37c0ed | Wompt/wompt.com,Wompt/wompt.com,iFixit/wompt.com,iFixit/wompt.com,iFixit/wompt.com,iFixit/wompt.com,Wompt/wompt.com | nodejs/lib/meta_user_manager.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndocument.getElementById(\"ayuda\").setAttribute(\"aria-current\", \"page\");\n\nfunction prueba() {\n\talert(\"prueba\");\n}\n\nvar aside = document.getElementById(\"complementario\");\nvar button = document.createElement(\"BUTTON\");\n... | javascript | edit | 0 | 1 | mit | 498880103fa05d9422ec377dc9f2bb85e557240c | nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io | scripts/ayuda.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\nconst InsertionSort = require('../../../src').Algorithms.Sorting.InsertionSort;\nconst assert = require('assert');\n\ndescribe('Insertion Sort', () => {\n it('should have no data when empty initialization', () =... | javascript | edit | 0 | 1 | mit | b38cae7323a77cb488f4404df0885eb2c5f44c99 | ManrajGrover/algorithms-js | test/algorithms/sorting/testInsertionSort.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\n'use strict'\n\nconst chai = require('chai')\nchai.should()\n\nlet result = ''\n\nmodule.exports = function () {\n this.registerHandler('BeforeFeatures', function (features, cb) {\n result += features.length\... | javascript | edit | 0 | 2 | mit | 4699f68746a15d9cf39cac307ee3609fcdf6031d | mucsi96/nightwatch-cucumber,mucsi96/nightwatch-cucumber | test/fixture/event-handlers-with-callback.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//Dear source-code readers, pay no attention to these global variables\nvar APP_ID = 'YtKfTS2Zo8ELUk63LzB0';\nvar APP_CODE = 'SB1wcsUEGzLA3SRHJJ7CPw';\n\n// Reference to the root of the Firebase database\nvar database = new Firebase(\"h... | javascript | edit | 0 | 3 | mit | d382b1d0cac8b071432e88bebca3e8fd636b31dd | vingkan/conquiz,vingkan/conquiz | backend.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\r\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\r\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insert... | javascript | edit | 0 | 2 | bsd-3-clause | 57b7b3d47d0f0950dc4c0f478eb280d134b1c692 | BloodAxe/CloudCV,BloodAxe/CloudCV | public/javascripts/ga.js | rejected_duplicate | Near-duplicate of sample 79185 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\n\nmodule.exports = exports = function (options) {\n var BasicAuth = require('./middleware/auth/basic');\n\n var TradesRouter = require('./routers/trades');\n var UserRouter = require('./routers/user... | javascript | edit | 0 | 1 | mit | d6f1706e7c0b242167b6bfaace6aceee54987324 | davidknezic/bitcoin-trade-guard-backend | app/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n/*\n * mochify.js\n *\n * Copyright (c) 2014 Maximilian Antoni <<EMAIL>>\n *\n * @license MIT\n */\n'use strict';\n\nvar mochify = require('../lib/mochify');\nvar args = require('../lib/args');\n\nvar opts = args... | javascript | edit | 0 | 2 | mit | 512fac75c3b4809b159f639476a98c0253a47013 | Swaagie/mochify.js,mantoni/mochify.js,jhytonen/mochify.js,mantoni/mochify.js,Heng-xiu/mochify.js,boneskull/mochify.js,mantoni/mochify.js,Heng-xiu/mochify.js,Swaagie/mochify.js,jhytonen/mochify.js,boneskull/mochify.js | bin/cmd.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar readJson = require('read-package-json');\nvar minimist = require('minimist');\nvar path = require('path');\nvar url = require('url');\n\nvar shields = require('../');\n\nvar argv = minimist(process.argv.slice(... | javascript | edit | 0 | 2 | mit | adeda7aacfccccd94e43be6e42cce1db67513080 | KenanY/shields | bin/cmd.js | rejected_duplicate | Near-duplicate of sample 84223 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('babel-polyfill');\n\n// jsdom doesn't have support for localStorage at the moment\nglobal.localStorage = require('localStorage');\n\n// Tests should just mock responses for the json API\n// so let's just default to a noop\nvar ... | javascript | edit | 0 | 6 | apache-2.0 | ade2364d04762c5a1e15db674117905f179a2d52 | dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui | jest/setupEnv.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport moment from 'moment';\nimport stringToHue from 'bus-detective/utils/string-to-hue';\nvar inject = Ember.inject;\n\nexport default Ember.Component.extend({\n tagName: 'li',\n clock: inject.service(),\... | javascript | edit | 0 | 1 | mit | 09a1b1c34a39fcc8ba432614e976aed2c7798123 | bus-detective/web-client,bus-detective/web-client | app/components/bd-arrival.js | rejected_duplicate | Near-duplicate of sample 80858 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\"\nimport Form from \"./components/form.js\"\nimport Input from \"./components/input.js\"\nimport Submit from \"./components/submit.js\"\nimport FormErrorList from \"./components/form_error_list.js\"\nimport Fi... | javascript | edit | 0 | 0 | mit | 4c117ffd1c4ead3e4eccddade8419c8801c01e03 | TouchBistro/frig,frig-js/frig,frig-js/frig,TouchBistro/frig | src/factories.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jshint node:true*/\n/* global require, module */\nvar EmberApp = require('ember-cli/lib/broccoli/ember-app');\n\nmodule.exports = function(defaults) {\n var app = new EmberApp(defaults, {\n // Add options here\n });\n\n // Use `... | javascript | edit | 0 | 1 | mit | 17591c67c2d59f6f19395068d40a144ce041aa96 | jga/capmetrics-web,jga/capmetrics-web | ember-cli-build.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar glob = require('glob');\nvar _ = require('underscore');\n\nvar FeaturePathExpander = {\n expandPaths: function expandPaths(paths) {\n var Cucumber = require('../../../cucumber');\n var PathEx... | javascript | edit | 0 | 1 | mit | a4c9f3032bbaafc2a7b33161f33fa8bcc536c88f | cucumber/cucumber-js,bluenergy/cucumber-js,mhoyer/cucumber-js,vilmysj/cucumber-js,arty-name/cucumber-js,AbraaoAlves/cucumber-js,richardmcsong/cucumber-js,vilmysj/cucumber-js,bluenergy/cucumber-js,eddieloeffen/cucumber-js,tdekoning/cucumber-js,Telogical/CucumberJS,cucumber/cucumber-js,MinMat/cucumber-js,arty-name/cucumb... | lib/cucumber/cli/argument_parser/feature_path_expander.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst chalk = require('chalk');\nconst fs = require('fs');\nconst path = require('path');\nconst tilde = require('tilde-expansion');\nconst shell = require('shelljs');\nconst appRootDir = require('app-root-dir').get();\nconst setConfigP... | javascript | edit | 0 | 5 | mit | a32ef2c72b98383682a6e8810133612af512cac5 | zweck/todo_cmd | init.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$( document ).ready(function() {\r\n\tvar typer = $('.typeahead');\r\n\r\n\tvar genders = new Bloodhound({\r\n\t\tdatumTokenizer: Bloodhound.tokenizers.whitespace,\r\n\t\tqueryTokenizer: Bloodhound.tokenizers.whitespace,\r\n\t\tprefetch... | javascript | edit | 0 | 5 | mit | d3f36d8906a4adc4454c4f499f4f2d4514eec981 | anne-decusatis/genderamender | examples/simple.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Post from 'src/models/PostModel';\nimport { buildGalleryPost } from 'src/server/modules/build';\n\nexport default (req, res, next) => {\n Post.paginate({}, {\n page: req.query.page,\n limit: req.query.limit,\n sort: '-p... | javascript | edit | 0 | 3 | mit | 81713ce1ad6ed20505d7bd6c57d404f68c971f43 | tuelsch/bolg,tuelsch/bolg | src/server/api/gallery-api.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe('Login', function () {\n\tbeforeEach(function () {\n\t\tbrowser.get('/login');\n\t});\n\n\tit('should have <my-login>', function () {\n\t\tvar login = element(by.css('my-app my-login'));\n\t\texpect(login.isPresent()).toEqual(t... | javascript | edit | 0 | 1 | mit | ec15a4d069fcf835970171ca9e5b79b064c1fdd8 | JunkyDeLuxe/angular4-starter,JunkyDeLuxe/angular4-starter,JunkyDeLuxe/angular4-starter | src/app/login/login.component.e2e-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {render} from 'react-dom';\nimport InfiniteCalendar, {\n Calendar,\n defaultMultipleDateInterpolation,\n withMultipleDates,\n} from 'react-infinite-calendar';\nimport 'react-infinite-calendar/styles... | javascript | edit | 0 | 0 | mit | 9b20a73621e58aa8907c382891996be188c17b85 | clauderic/react-infinite-calendar | examples/with-multiple-dates.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst messageHelpers = require('../lib/message_helpers');\n\nconst handler = async function(message) {\n const args = message.content.split(' ').slice(1);\n\n // the first argument is non-optional, fail if not provided\n if (args.len... | javascript | edit | 0 | 4 | bsd-3-clause | b7d1fe2fb94dd62fc41b594ac6bdae01d2831da2 | ciarancrocker/sgs_bot,ciarancrocker/sgs_bot | command_handlers/purge.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright 2013 IBM Corp.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://w... | javascript | edit | 0 | 0 | apache-2.0 | 02df584af6d6070cef63d42d2c8f39d696d4cfac | HiroyasuNishiyama/node-red,PaGury/node-red,mw75/node-red,whummer/node-red,codeaudit/node-red,dojot/mashup,PaGury/node-red,mikestebbins/node-red,whoGloo/node-red,btsimonh/node-red,michaelsteenkamp/node-red,anusornc/node-red,rntdrts/node-red,lucciano/node-red,gbraad/node-red,cgvarela/node-red,lostinthestory/node-red,anus... | red/storage/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\nvar windows = process.platform.indexOf(\"win\") === 0;\n\n\n\nfunction clear()\n{\n\tvar i,lines;\n\tvar stdout = \"\";\n\t\n\tif (windows === false)\n\t{\n\t\tstdout += \"\\033[2J\";\n\t}\n\telse\n\t{\n\t\tlines = proc... | javascript | edit | 0 | 3 | mit | e6458ee26f18fa1f87601297d595ea7e2aa6e81d | stevenvachon/cli-clear | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * @fileoverview Login check middleware\n */\nconst config = require('config');\n\n/*\n * Check authenticated status. Redirect to login page\n *\n * @param {object} req Express HTTP request\n * @param {object} res ... | javascript | edit | 0 | 9 | apache-2.0 | ab25026fe59624f1da1716e52ffd399f4707c846 | Snugug/punchcard,punchcard-cms/punchcard,scottnath/punchcard,scottnath/punchcard,Snugug/punchcard,poofichu/punchcard,punchcard-cms/punchcard,poofichu/punchcard | lib/init/authenticated.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* @flow */\n\ntype GiftCategory =\n 'Electronics' |\n 'Games' |\n 'Home Decoration';\n\ntype GiftWish = string | Array<GiftCategory>;\n\ntype User = {\n firstName: string,\n lastName?: string,\n giftWish?: GiftWish,\n};\n\nexport... | javascript | edit | null | null | mit | fb32c704b149f0bd134144bc58f8ed9a07d79758 | WhosMySanta/app,WhosMySanta/app,WhosMySanta/whosmysanta | index.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar condenseKeys = require('condense-keys');\nvar got = require('got');\n\nmodule.exports = function (buf, cb) {\n\tgot.post('https://api.imgur.com/3/image', {\n\t\theaders: {authorization: 'Client-ID 34b90e75ab1c04b'},\n... | javascript | edit | 0 | 2 | mit | 1b8041a62976420705a942c91d47195472d89798 | kevva/imgur-uploader | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Database = require('./lib/database')\nvar mongodb = require('mongodb')\n\nmodule.exports = function (connString, cols, options) {\n var db = new Database(connString, cols, options)\n if (typeof Proxy !== 'undefined') {\n var ha... | javascript | edit | 0 | 4 | mit | 9a34051841343f41ce56122ceaf7fd9ce785281c | mafintosh/mongojs,lionvs/mongojs | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar tester = /^[-!#$%&'*+\\/0-9=?A-Z^_a-z`{|}~](\\.?[-!#$%&'*+\\/0-9=?A-Z^_a-z`{|}~])*@[a-zA-Z0-9](-*\\.?[a-zA-Z0-9])*\\.[a-zA-Z](-?[a-zA-Z0-9])+$/;\n// Thanks to:\n// http://fightingforalostcause.net/misc/2006/compar... | javascript | edit | 0 | 6 | unlicense | 172aee6f75877779da2511d236d8d3b708ac2b79 | Sembiance/email-validator | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nvar detect = require('acorn-globals');\n\nvar lastSRC = '(null)';\nvar lastRes = true;\nvar lastConstants = undefined;\n\nmodule.exports = isConstant;\nfunction isConstant(src, constants) {\n src = '(' + src + ')';\n i... | javascript | edit | 0 | 4 | mit | ed3597688b01f666ec716108bf7c348338ef14af | ForbesLindesay/constantinople | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default class {\n constructor (win, keys) {\n this.keys = keys\n this.win = win\n this.id = 'keypad'\n\n this.buttons = []\n for (var key in this.keys) {\n this.buttons[this.keys[key]] = {pressed: false}\n ... | javascript | edit | 0 | 4 | mit | b7ab57293fe36f13d1a09aa1eabab16ace9ac204 | matthewbauer/keypad,matthewbauer/keypad | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar digio_api = require('../digio-api')\n, config = require('./config')\n\n\nvar api = new digio_api(config.token)\n\n// api.droplets.list_droplets(function (err, data) {\n// console.log(data);\n// });\n//\n// api.domains.list_all_dom... | javascript | edit | 0 | 0 | mit | 2cb1550e0783bbf4a4cbc63a40fc07dd7cc73bb9 | tmn/digio-api-test | index.js | rejected_duplicate | Near-duplicate of sample 88298 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-moment-range',\n\n included: function () {\n this._super.included.apply(this, arguments);\n\n this.import('bower_components/moment-range/dist/moment... | javascript | edit | 0 | 2 | mit | 340fc24f9a88ef82c22d7670805900cbd6e12592 | hankfanchiu/ember-cli-moment-range,hankfanchiu/ember-cli-moment-range | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = isbnValidator;\n\nfunction isbnValidator(isbnCode){\n\n var self = this;\n\n if (typeof(isbnCode) !== \"string\") return false;\n\n self.replaceDashes = function format(sequence){\n return sequence.replace(/\\-/... | javascript | edit | 0 | 4 | mit | b3eae797efde9cb483ce45b340795799ed1faaf9 | thewazir/isbn-validator | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * global-prefix <https://github.com/jonschlinkert/global-prefix>\n *\n * Copyright (c) 2015 Jon Schlinkert.\n * Licensed under the MIT license.\n */\n\n'use strict';\n\n/**\n * This is the code used internally by npm to\n * resolv... | javascript | edit | 0 | 0 | mit | b1915009d392fd29419462b26afa5d45eb5563cc | kuksikus/global-prefix,jonschlinkert/global-prefix | index.js | rejected_duplicate | Near-duplicate of sample 100062 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-l10n',\n\n included: function(app) {\n // @see: https://github.com/ember-cli/ember-cli/issues/3718\n this._super.included.apply(this, arguments);\n i... | javascript | edit | 0 | 3 | mit | 399deb8c1741ca993179387c6944e502cac9d4f7 | Cropster/ember-l10n,Cropster/ember-l10n,Cropster/ember-l10n | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* Copyright 2013 Twitter, Inc. Licensed under The MIT License. http://opensource.org/licenses/MIT */\n\ndefine(\n\n [\n './lib/advice',\n './lib/component',\n './lib/compose',\n './lib/logger',\n './lib/registry',\n ... | javascript | edit | 0 | 1 | mit | e66b0ec7d644a566b9aca31ec10469d64a596eda | giuseppeg/flight,david84/flight,joelbyler/flight,Shinchy/flight,icecreamliker/flight,joelbyler/flight,icecreamliker/flight,robertknight/flight,KyawNaingTun/flight,margaritis/flight,robertknight/flight,flightjs/flight,Shinchy/flight,KyawNaingTun/flight,flightjs/flight,david84/flight | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * index.js\n * Client entry point.\n *\n * @author Francis Brito <<EMAIL>>\n * @license MIT\n */\n'use strict';\n\n/**\n * Client\n * Provides methods to access PrintHouse's API.\n *\n * @param {String} apiKey API key identifyin... | javascript | edit | 0 | 4 | mit | 6065a6c41dc182f6b915a61eeb8a6a271cfe0d17 | francisbrito/ph-node | index.js | rejected_duplicate | Near-duplicate of sample 84560 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar elixir = require('laravel-elixir');\nvar gulp = require('gulp');\nvar imagemin = require('gulp-imagemin');\nvar pngquant = require('imagemin-pngquant');\nvar notify = require('gulp-notify');\nvar _ = require('underscore');\nvar util... | javascript | edit | 0 | 2 | mit | c56834a5822af1821299d868173b748ea3989544 | nathanmac/laravel-elixir-imagemin,waldemarfm/laravel-elixir-imagemin | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Generates a new {@link Point} feature, given coordinates\n * and, optionally, properties.\n *\n * @module turf/point\n * @param {number} longitude - position west to east in decimal degrees\n * @param {number} latitude - positio... | javascript | edit | 0 | 5 | mit | 85c06f64cdb2a7934177a812bd514e3bcc267c49 | Turfjs/turf-point | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nmodule.exports = function (repl, file) {\n\n try {\n var stat = fs.statSync(file);\n repl.rli.history = fs.readFileSync(file, 'utf-8').split('\\n').reverse();\n repl.rli.history.shift();\n repl.rli.... | javascript | edit | 0 | 3 | mit | 0f4102735bd5ca3cc09815e6b3c543a1b76829da | tmpvar/repl.history,eush77/repl.history | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar serveStatic = require('serve-static');\nvar bodyParser = require('body-parser');\nvar session = require('express-session');\nvar RedisStore = require('connect-redis')(session);\n\nfunction appCtor(... | javascript | edit | 0 | 2 | mit | 6a391ec9dc6a9fe2a34a67fc65f1e07c88790de6 | dingroll/dingroll.com,dingroll/dingroll.com | app/http.js | rejected_duplicate | Near-duplicate of sample 83376 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction parseQString(qString) {\n var d = /^\\s*q=([01](?:\\.\\d+))\\s*$/.exec(qString);\n if (!!d) {\n return 1;\n }\n return Number(d[1]);\n}\n\nfunction sortQArrayString(content) {\n var entries = content.split... | javascript | edit | null | null | mit | d43a75538b768a317e25542cb186c5df51add217 | foxxtrot/connect-conneg | lib/negotiate.js | rejected_syntax | Syntax error detected by tree-sitter | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.