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, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport Box from '../box';\nimport cx from 'classnames';\nimport theme from './theme.css';\n\nclass Avatar extends PureComponent {\n static propTypes = ... | javascript | edit | 0 | 2 | mit | f8e313830e6cd09ab8ec39e4b0603f80afa83e2d | teamleadercrm/teamleader-ui | components/avatar/Avatar.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar HyperdeckCore = require(\"./hyperdeck-core.js\");\n\n\nvar Hyperdeck = function(ip) {\n //Start by connecting to Hyperdeck via HypderdeckCore\n var Core = new HyperdeckCore(ip);\n\n\n //Publicise functions from Core\n this.getNo... | javascript | edit | 0 | 3 | mit | a81404f524095b29288303070e73b554af09c2a2 | LA1TV/Hyperdeck-JS-Lib | src/hyperdeck/hyperdeck.js | rejected_duplicate | Near-duplicate of sample 78374 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular\n .module('zibble', ['angular-jwt', 'ngResource', 'ui.router'])\n .constant('API', 'http://localhost:3000')\n .config(function($httpProvider){\n $httpProvider.interceptors.push('AuthInterceptor');\n })\n .config(MainRout... | javascript | edit | 0 | 1 | mit | 7451a9cde1a485fc374082e3a072c2674fb304f5 | ninebelowzero/Zibble_front_end,ninebelowzero/Zibble_front_end,ninebelowzero/Zibble_front_end | js/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = ['$sce', $sce => {\n return {\n restrict: 'E',\n template: require('./template.html'),\n controller: ['$scope', $scope => {\n $scope.video = {src: undefined};\n\n $scope.receivedPaste = $event => {\n... | javascript | edit | 0 | 3 | mit | 44e19e3cb2496fae6a2d037908b8c716549a9b87 | blakelapierre/video-editor,blakelapierre/video-editor | frontend/app/modules/video-editor/editor/directive.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable import/no-extraneous-dependencies */\n\nimport React, { Fragment } from 'react';\nimport { FormGroup } from 'react-bootstrap';\n\nimport Control from '../components/Control.react';\nimport { Typeahead } from '../../src... | javascript | edit | 0 | 1 | mit | 329505a9a0e0de08fa9d0c64d0ef693c417804b0 | ericgio/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead,ericgio/react-bootstrap-typeahead | example/examples/BasicExample.react.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/** @jsx React.DOM */\n\nvar GoogleApiAuthForm = React.createClass({\n getInitialState: function() {\n return {apiKey: null, clientId: null};\n },\n render: function () {\n return (\n <form role=\"form\... | javascript | edit | null | null | apache-2.0 | 125735720e43f9722f491236836d0854d3f6fb72 | pgollakota/evird | evird/static/app/js/app.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar Proteus = require(\"proteus\");\n\nmodule.exports = Proteus.Class.derive(Object.defineProperties({\n \n init: function () {\n Object.defineProperties(this, {\n members: { value: [], enumerable: true }\n ... | javascript | edit | 0 | 3 | mit | 384e8fa158bdf3620dffcdc3b42c4eaf798ea656 | jhamlet/dice-js | node_modules/dice-js/expression.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction SortingController(){\n\n}\nSortingController.prototype = {\n getFormData: function(form){\n var formData = {};\n formData.type = $(form).attr(\"method\");\n formData.url = $(form).attr(\"action\");\n formData.data = $(... | javascript | edit | 0 | 1 | mit | 0a15a0d0746f114fdb64f9bfc239689b345ec242 | JamesAnthonyLow/whopperflow,nyc-fireflies-2015/whopperflow,JamesAnthonyLow/whopperflow,JamesAnthonyLow/whopperflow,nyc-fireflies-2015/whopperflow,nyc-fireflies-2015/whopperflow | app/assets/javascripts/sorting/controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar App = require('../../app');\nvar Marionette = require('backbone.marionette');\nvar template = require('../templates/bookmark_item.hbs');\n\nmodule.exports = Marionette.ItemView.extend({\n tagName: 'li',\n template... | javascript | edit | 0 | 1 | mit | a95ca90883cf420c11641d8376f6ce0a25f4691e | nathanajah/nusmods,Yunheng/nusmods,mauris/nusmods,mauris/nusmods,nathanajah/nusmods,nusmodifications/nusmods,chunqi/nusmods,nusmodifications/nusmods,Yunheng/nusmods,chunqi/nusmods,nathanajah/nusmods,zhouyichen/nusmods,mauris/nusmods,Yunheng/nusmods,Yunheng/nusmods,mauris/nusmods,Yunheng/nusmods,zhouyichen/nusmods,zhouy... | app/scripts/common/views/BookmarkItemView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction setCookie(name, value, options = {}) {\n let cookieString = `${name}=${value}; path=/`;\n\n if (options.days) {\n const date = new Date();\n date.setTime(date.getTime() + (options.days * 24 * 60 * 60 * 1000));\n cook... | javascript | edit | 0 | 4 | mit | 10d2b08ab13452ff3fa6e8426c83bd0104116ace | nhsuk/betahealth,nhsalpha/betahealth,nhsuk/betahealth,nhsalpha/betahealth,nhsalpha/betahealth,nhsuk/betahealth | assets/javascripts/modules/cookie-message.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 | 54ae6dc35acc55a9888c66eebb304019189b19a9 | cibernox/ember-inspector,Patsy-issa/ember-inspector,chrisgame/ember-inspector,jryans/ember-inspector,sivakumar-kailasam/ember-inspector,emberjs/ember-inspector,aceofspades/ember-inspector,knownasilya/ember-inspector,sivakumar-kailasam/ember-inspector,karthiick/ember-inspector,karthiick/ember-inspector,dsturley/ember-in... | dist_chrome/content-script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Meteor } from 'meteor/meteor';\nimport { Template } from 'meteor/templating';\n\n/* eslint-disable object-shorthand */\n\nTemplate.If_Admin_Logged_In.helpers({\n /**\n * @returns {*} True if Meteor is in the process of loggi... | javascript | edit | 0 | 1 | apache-2.0 | 6045e33ea092d97f1ad354fbeb7ab55b8d9dfe09 | adventure-portal/adventure-portal,adventure-portal/adventure-portal | app/imports/ui/layouts/if-admin-logged-in.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ***********************************************\n// This example commands.js shows you how to\n// create various custom commands and overwrite\n// existing commands.\n//\n// For more comprehensive examples of custom\n// commands plea... | javascript | edit | 0 | 5 | mit | 7ec17f7e686423f8253e70f4bb179989c0cdac0b | ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public | cypress/support/commands.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexports.BattleScripts = {\n\tinherit: 'gen5',\n\tgen: 3,\n\tinit: function () {\n\t\tfor (var i in this.data.Pokedex) {\n\t\t\tdelete this.data.Pokedex[i].abilities['H'];\n\t\t}\n\t\tvar specialTypes = {Fire:1, Water:1, Grass:1, Ice:1, ... | javascript | edit | 0 | 6 | mit | c5ff8e77c877ca00463ac7760c2b242ea8055fb4 | Pikachuun/Joimmon-Showdown,Pikachuun/Joimmon-Showdown | mods/gen3/scripts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// Development specific configuration\n// ==================================\nmodule.exports = {\n // MongoDB connection options\n mongo: {\n uri: 'mongodb://127.0.0.1/medcheck-dev'\n },\n\n seedDB: true\n};\n\n`... | javascript | edit | 0 | 0 | apache-2.0 | cd169317083d6f4d9892ec2140ae6a4c18629b9a | inforeliance/MedCheck,inforeliance/MedCheck,inforeliance/MedCheck | Source/server/config/environment/development.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(app, express) {\n\n app.get('/test', function(req, res) {\n res.send('Testing123');\n });\n\n};\n```\n\nApply this change: Add endpoints for Facebook OAuth and User Creation"
},
{
"role": "assistan... | javascript | edit | 0 | 1 | mit | 9a724dfb3ba3349db6ae5c64e5453a630bf13a27 | derektliu/Picky-Notes,derektliu/Picky-Notes,inspiredtolive/Picky-Notes,folksy-squid/Picky-Notes,derektliu/Picky-Notes,folksy-squid/Picky-Notes,folksy-squid/Picky-Notes,inspiredtolive/Picky-Notes,inspiredtolive/Picky-Notes | server/config/routes.js | rejected_duplicate | Near-duplicate of sample 77690 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction dechex(number) {\n // http://kevin.vanzonneveld.net\n // + original by: Philippe Baumann\n // + bugfixed by: Onno Marsman\n // * example 1: dechex(10);\n // * returns 1: 'a'\n // * example 2: d... | javascript | edit | 0 | 2 | mit | fb09ede424c11ca519a2e5b822c02d105386e9e6 | VicAMMON/phpjs,cigraphics/phpjs,hirak/phpjs,kvz/phpjs,kvz/phpjs,ajenkul/phpjs,MartinReidy/phpjs,janschoenherr/phpjs,hirak/phpjs,revanthpobala/phpjs,VicAMMON/phpjs,revanthpobala/phpjs,ajenkul/phpjs,FlorinDragotaExpertvision/phpjs,janschoenherr/phpjs,chand3040/phpjs,hirak/phpjs,Mazbaul/phpjs,hirak/phpjs,J2TeaM/phpjs,VicA... | functions/math/dechex.js | rejected_duplicate | Near-duplicate of sample 93745 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n // Android emits composition events when moving the cursor through existing text\n // Introduced in Chrome 65: https://bugs.chromium.org/p/chromium/issues/detail?id=764439#c9\n composesExistingText: /Android.*Chrom... | javascript | edit | 0 | 4 | mit | 66050161e0ef3abd6d00a079c484d806b32c8219 | basecamp/trix,basecamp/trix,basecamp/trix,basecamp/trix | src/trix/config/browser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * BBB `module` generator for Yeoman\n * Initialize a single module file and related test.\n */\n\n\"use strict\";\nvar util = require(\"util\");\nvar path = require(\"path\");\nvar _ = require(\"lodash\");\nvar BBBGenerator = requ... | javascript | edit | 0 | 3 | mit | 9e6a07436e5680c76f71d9f4a974d4aeb119d512 | backbone-boilerplate/generator-bbb | module/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction addimageerrors() {\n $(\".instagram-img, .battle-img, .fancybox-img, .fancybox-video\").off(\"error\").on(\"error\", function () {\n $(this).parents(\"div.image-tile, li.image-animate-tile\").remove();\n });\n}\n\n... | javascript | edit | 0 | 1 | mit | 20cdc5c2f3f2f481b0042229ab5339e17b6acde9 | NCSU-Libraries/lentil,NCSU-Libraries/lentil,NCSU-Libraries/lentil | app/assets/javascripts/lentil/imageerrors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Meteor } from 'meteor/meteor';\nimport { Accounts } from 'meteor/accounts-base';\nimport { ServiceConfiguration } from 'meteor/service-configuration';\nimport { _ } from 'lodash';\n\nconst services = Meteor.settings.private.oAu... | javascript | edit | 0 | 2 | mit | e20256ec981ad6a4dad22255bf534691de9c8975 | fmilani/contatempo,fmilani/contatempo | imports/startup/server/accounts-configuration.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*! [replace-name] v[replace-version] */\n/***************************************************************************************************************************************************************\n *\n * mainNav function\n *\n * ... | javascript | edit | 0 | 1 | mit | f949f9b4e12bfcf3093d9ddd00281f92488ab9cd | govau/uikit,govau/uikit | packages/main-nav/src/js/jquery.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* global define, module */\n\nimport Ember from 'ember';\nimport {\n Inflector,\n defaultRules,\n pluralize,\n singularize\n} from \"./lib/system\";\n\nInflector.defaultRules = defaultRules;\nEmber.Inflector = Inflector;\n\n... | javascript | edit | 0 | 0 | mit | 760b01908aaca73e02005789baa21fb8e7fc6efe | stefanpenner/ember-inflector,stefanpenner/ember-inflector | addon/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// create a function that stores added title and body, function that makes dynamic element ('li' li's need to have a h1, p , [delete, uipvote, downvote] buttons, quality)\nvar titleInput = $('.title-input-js');\nvar descriptionInput = $... | javascript | edit | 0 | 1 | mit | 95d9c46c43baa810d679425953a3eac6a0253e08 | ab255/idea-fiesta,ab255/idea-fiesta | script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n classNames: ['multiselect-checkbox-option'],\n\n tagName: 'li',\n\n value: null,\n\n selection: [],\n\n labelProperty: null,\n\n isSelected: function () {\n ... | javascript | edit | 0 | 3 | mit | 993c6fbe144db88455d69ac219d7926a2c694a3e | miguelcobain/ember-multiselect-checkboxes,RSSchermer/ember-multiselect-checkboxes,miguelcobain/ember-multiselect-checkboxes,RSSchermer/ember-multiselect-checkboxes | addon/components/multiselect-checkbox-option.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar compression = require('compression');\nvar app = express();\napp.use(compression());\napp.use(express.static(__dirname + '/public'));\n\nfunction wwwRedirect(req, res, next) {\n if (req.headers.... | javascript | edit | 0 | 2 | mit | f9e292e77a09e78d48750a286c023ceabd6f1ff4 | doppio/EtherWheel,doppio/EtherWheel | server.js | rejected_duplicate | Near-duplicate of sample 91586 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar artsyEigenWebAssociation = require('artsy-eigen-web-association');\nvar express = require('express');\nvar https = require('https');\nvar http = require('http');\nvar morgan = require('morgan');\nvar path = require('path');\nvar fs ... | javascript | edit | 0 | 1 | mit | 165bfbd637e02cd4f3e5224b9a180426eb4a3085 | artsy/artsy-wwwify | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n test_page: 'tests/index.html?hidepassed',\n disable_watching: true,\n launch_in_ci: [\n 'Chrome'\n ],\n launch_in_dev: [\n 'Chrome'\n ],\n browser_args: {\n Chrome: {\n ci: [\n // --no-sa... | javascript | edit | 0 | 0 | mit | a1a662201b9f7aa1908965767f10314bb6155cc0 | LucasHill/ember-print-this,LucasHill/ember-print-this,LucasHill/ember-print-this | testem.js | rejected_duplicate | Near-duplicate of sample 79152 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// common chinese symbols: \\u4e00-\\u9eff - http://stackoverflow.com/a/1366113/837709\n// hiragana (japanese): \\u3040-\\u309F - https://gist.github.com/ryanmcgrath/982242#file-japaneseregex-js\n// katakana (japanese): \\u30A0-\\u30FF ... | javascript | edit | 0 | 0 | mit | 98f67e0a11eae2485a9b8c36532d64f21c884e5f | draft-js-plugins/draft-js-plugins,draft-js-plugins/draft-js-plugins,nikgraf/draft-js-plugin-editor,nikgraf/draft-js-plugin-editor,dagopert/draft-js-plugins,nikgraf/draft-js-plugin-editor,dagopert/draft-js-plugins,draft-js-plugins/draft-js-plugins,draft-js-plugins/draft-js-plugins,dagopert/draft-js-plugins | draft-js-mention-plugin/src/defaultRegExp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport hummus from 'hummus'\n\nexport default function (path, res) {\n // create a PDF parser\n const parser = hummus.createReader(path)\n\n // create array to hold dimensions\n const boxes = []\n // save dimensions for each page\n... | javascript | edit | 0 | 4 | mit | c8f53ccdbb220fff9881a5470e84fa67da03edac | nickbreaton/spare-page,nickbreaton/spare-page | functions/src/insert-pages.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport express from 'express';\nimport graphQLHTTP from 'express-graphql';\nimport path from 'path';\nimport webpack from 'webpack';\nimport WebpackDevServer from 'webpack-dev-server';\nimport {Schema} from './data/schema';\n\nconst APP... | javascript | edit | 0 | 1 | bsd-3-clause | 72d23a982845cf2c2924fd3f2e2ee65efc852a72 | clairefritz/todo,iamchenxin/relay-starter-kit,stefanRitter/relay-tutorial,ranjithnori/lemons-list,chenwei0104/starwars,iamchenxin/relay-starter-kit,blendersfun/seattle-theatre-site2,chenwei0104/starwars,roshane/relay-starter-kit-03012016,Aweary/relay-starter-kit,roshane/relay-starter-kit-03012016,relayjs/relay-starter-... | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar config = require('./config'),\n\nexpress = require('express'),\nthunkify = require('co-express'),\nengine = require('express-hbs'),\n\napp = thunkify(express()),\n\nmongo = require('co-easymongo')({\n dbname: con... | javascript | edit | 0 | 1 | mit | b535b85b859920bbe6edbe726579083d88ba9c98 | yamb/yamb-express | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\nimport React, { Component } from 'react';\nimport { StyleSheet, TouchableOpacity } from 'react-native';\nimport type { NavigationScreenProp } from 'react-navigation';\nimport appStyle from '../../../appStyle';\nimport { Icon }... | javascript | edit | null | null | mit | 8a541e6cd484a632069acfe9c3b7ced6818f1344 | Minishlink/DailyScrum,Minishlink/DailyScrum,Minishlink/DailyScrum,Minishlink/DailyScrum,Minishlink/DailyScrum | src/pages/Settings/components/InfoButton.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 pages = require('./routes/pages.js'),\n signup = require('./routes/signup.js'),\n flash = require('connect-flash'),\n auth = require('./modules/auth.js');\n\nvar app = express();\n\n// Configurati... | javascript | edit | 0 | 0 | apache-2.0 | 0358d01f230707e64f9c7298d8a8d34593fb8943 | with-regard/regard-website | server.js | rejected_duplicate | Near-duplicate of sample 93883 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst express = require('express')\nconst next = require('next')\nconst { join } = require('path')\n\nconst dev = process.env.NODE_ENV !== 'production'\nconst app = next({ dev })\nconst handle = app.getRequestHandler()\n\nconst redirect... | javascript | edit | 0 | 2 | mit | dd5fe031c4e114373617fae0e8d19ef0ae6b4718 | hackclub/website,hackclub/website,hackclub/website | server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst cp = require('child_process');\nconst rimraf = require('rimraf');\nconst process = require('process');\n\n// Rebuild native modules for ia32 and run webpack again for the ia32 part of windows packages\nexports.defa... | javascript | edit | 0 | 3 | apache-2.0 | 3730efd350d0875b7bbfcd58b614ca2ab025de4f | resin-io/herostratus,resin-io/etcher,resin-io/herostratus,resin-io/etcher,resin-io/etcher,resin-io/resin-etcher,resin-io/etcher,resin-io/resin-etcher,resin-io/etcher | beforeBuild.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar escape = require('escape-latex');\nvar quotes = require('../replace-quotes');\n\nvar preprocess = function(input) {\n return escape(quotes(input));\n};\n\nvar blankLine = (\n '{\\\\leavevmode \\\\kern.06em \\\\vbox{\\\\hrule width... | javascript | edit | 0 | 8 | apache-2.0 | 7dc5b1361c16b18aee20171fc6dab1fd7d2d18fc | commonform/commonform-tex | source/templates/run.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// @flow\n\nimport React from \"react\";\nimport { List } from \"immutable\";\nimport { ChoiceType } from \"../../../types\";\n\ntype Props = {\n choices: List<ChoiceType>\n};\n\nexport default function Checkboxes(props: Props) {\n co... | javascript | edit | null | null | mit | 99ce5054b3e4441c8ddca0670a7aaabbfc14815d | dailydrip/formulae_react,dailydrip/formulae_react,dailydrip/formulae_react | src/output_lib/components/RespondToForm/widgets/Checkboxes.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash');\nvar base = require('./base');\n\nconst development = _.merge({}, base, {\n env: 'development',\n auth0: {\n callbackURL: process.env.AUTH0_CALLBACK_URL || 'http://localhost:9000/auth/cal... | javascript | edit | 0 | 0 | mit | 5e766f596a8f5173d77e86079555f82bd90a1c38 | CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder | shared/config/env/development.js | rejected_duplicate | Near-duplicate of sample 103553 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar SingleTreatment = module.exports.SingleTreatment = function(treatment) {\n var treatmentText = '';\n\n if (treatment.concentration) {\n treatmentText += treatment.concentration + (treatment.concentratio... | javascript | edit | 0 | 6 | mit | 6fa20a63cc5f6af994595ebfc683981cc4198834 | T2DREAM/t2dream-portal,ENCODE-DCC/encoded,ENCODE-DCC/encoded,ENCODE-DCC/encoded,T2DREAM/t2dream-portal,T2DREAM/t2dream-portal,T2DREAM/t2dream-portal,ENCODE-DCC/encoded | src/encoded/static/components/objectutils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as React from 'react'\nimport { RedocStandalone } from 'redoc'\n\nimport Layout from '../../components/Layout'\n\nconst IndexPage = () => (\n <Layout activeRootSection=\"api/v2\">\n <RedocStandalone\n specUrl=\"https:/... | javascript | edit | 0 | 1 | bsd-3-clause | 709c7efecfbef79479b306a3dddec388149d4f2c | ayb/spree,ayb/spree,imella/spree,ayb/spree,imella/spree,ayb/spree,imella/spree | guides/src/pages/api/v2.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction calcWidth(name) {\n return 250 + name.length * 6.305555555555555;\n}\n\nWebApp.connectHandlers.use(\"/package\", function(request, response) {\n var url = `https://atmospherejs.com/a/packages/findByNames\\\n?names=${request.u... | javascript | edit | 0 | 4 | mit | 1254f076de5091128fc1861be41e30ab0e0dbdc5 | sungwoncho/meteor-icon,sungwoncho/meteor-icon | server/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ==UserScript==\n// @name Github: Back button's back, all right!\n// @namespace http://github.com/carols10cents/github-back-button\n// @description Restores the functionality of the back button on github pull requests when na... | javascript | edit | 0 | 1 | mit | e3625f647467133d6017fa31ded281d43f667911 | carols10cents/github-back-button | github-back-button.user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet map;\nlet service;\n\nconst MTV = new google.maps.LatLng(37.3861,122.0839);\n\n/**\n * Inits map and calls a nearby search of prominent restaurants in 5000m \n * radius of MTV\n */\nfunction findNearbyPlaces() {\n map = new google.... | javascript | edit | 0 | 3 | apache-2.0 | 834a8b2506c239b60bff2b77780582de24d979ab | googleinterns/step27-2020,googleinterns/step27-2020,googleinterns/step27-2020 | src/main/webapp/scripts/place-suggestions.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar bot = require( 'nodemw' ),\n\treadline = require( 'readline' ),\n\tfs = require( 'fs' ),\n\trl = readline.createInterface( {\n\t\tinput: process.stdin,\n\t\toutput: process.stdout\n\t} ),\n\tclient = new Bot( {\n\t\tprotocol: 'https... | javascript | edit | 0 | 3 | bsd-2-clause | cb24bc33408c07199e3907dba3d260777ebe52d7 | macbre/nodemw | examples/scribuntoRemoteDebug.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Effect = require('./Effect');\n\n/**\n * Affect the volume of an effect chain.\n */\nclass VolumeEffect extends Effect {\n /**\n * Default value to set the Effect to when constructed and when clear'ed.\n * @const {numbe... | javascript | edit | 0 | 2 | bsd-3-clause | 3dff6237355a744593f7f6b73a8d847fe215285f | LLK/scratch-audio | src/effects/VolumeEffect.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * grunt-browser-extension\n * https://github.com/addmitriev/grunt-browser-extension\n *\n * Copyright (c) 2015 Aleksey Dmitriev\n * Licensed under the MIT license.\n */\n'use strict';\n\nvar util = require('util');\nvar path = requ... | javascript | edit | 0 | 5 | mit | c918f8c8de92f663b3407aa7f70a902cc15419c6 | Tuguusl/grunt-browser-extension,Tuguusl/grunt-browser-extension | tasks/browser_extension.js | rejected_duplicate | Near-duplicate of sample 105159 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar request = require('request')\n\nvar TestEndpointsHelper = function() {\n var TestServerBaseURL = 'http://localhost:8081'\n\n function resetTestDB(done) {\n request.post(TestServerBaseURL + '/test/resetTestDB', function(... | javascript | edit | 0 | 1 | mit | f5b6c9013f776a8306d36710269736906d09ff25 | Jgreub/treeline,Jgreub/treeline,Jgreub/treeline,Jgreub/treeline | src/test/e2e/support/TestEndpointsHelpers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar jshint = require('gulp-jshint');\nvar csslint = require('gulp-csslint');\n\ngulp.task('lint', ['jshint', 'csslint']);\n\ngulp.task('jshint', function() {\n return gulp.src('./js/*.js')\... | javascript | edit | 0 | 1 | apache-2.0 | afa60ffa30d497be5ece6dce6bee957e4f18e1f2 | sidharta/sales-gallery,sidharta/sales-gallery,sidharta/sales-gallery | src/main/webapp/gulpfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { task } from 'ember-concurrency';\n\nconst { computed } = Ember;\n\nexport default Ember.Component.extend({\n teamDomain: computed('team.domain', function() {\n const domain = this.get('team.domai... | javascript | edit | 0 | 3 | apache-2.0 | 5e6c1721525283e892e6495846cc983a6dca0f17 | usecanvas/web-v2,usecanvas/web-v2,usecanvas/web-v2 | app/components/personal-team-form/component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\npageflow.ThemesCollection = Backbone.Collection.extend({\n model: pageflow.Theme,\n\n findByName: function(name) {\n return this.findWhere({name: name});\n }\n});\n\n```\n\nApply this change: Throw error when ThemeCollection does ... | javascript | edit | 0 | 2 | mit | 77e93d163cbd97cb9f3b63154dce3ee3d550458a | codevise/pageflow,Modularfield/pageflow,codevise/pageflow,tf/pageflow,Modularfield/pageflow,Modularfield/pageflow,tf/pageflow-dependabot-test,tf/pageflow,tf/pageflow,tf/pageflow-dependabot-test,Modularfield/pageflow,codevise/pageflow,tf/pageflow,codevise/pageflow,tf/pageflow-dependabot-test,tf/pageflow-dependabot-test | app/assets/javascripts/pageflow/editor/collections/themes_collection.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport BaseModel from '../BaseModel';\nimport app from '../../app';\nimport { getCurrencyByCode } from '../../data/currencies';\nimport is from 'is_js';\n\nexport default class extends BaseModel {\n defaults() {\n return {\n cu... | javascript | edit | 0 | 9 | mit | 8cc1a255ad0809a71953789ca1c0704c252bb42b | OpenBazaar/openbazaar-desktop,OpenBazaar/openbazaar-desktop,OpenBazaar/openbazaar-desktop | js/models/profile/FixedFee.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { get, set } from '@ember/object';\nimport { inject as service } from '@ember/service';\nimport Component from '@ember/component';\nimport layout from './template';\n\nexport default Component.extend({\n globalStore: service(),... | javascript | edit | 0 | 2 | apache-2.0 | 6dfec5dd9b74fbe79a33155f26f8bed205acb96f | rancher/ui,lvuch/ui,rancher/ui,rancher/ui,lvuch/ui,vincent99/ui,rancherio/ui,rancherio/ui,rancherio/ui,westlywright/ui,westlywright/ui,vincent99/ui,lvuch/ui,westlywright/ui,vincent99/ui | app/components/resource-quota-row/component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n/**\n * Parse and insert all log lines in a path.\n */\n\n'use strict';\n\nvar program = require('commander');\n\n// Support all attributes normally defined by config.js.\nprogram\n .option('-p, --parser <name>',... | javascript | edit | 0 | 1 | mit | cb0c64af73d5b4902b84aecb9a27416429ec1d7a | codeactual/mainevent | app/import.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {Map} from 'immutable';\n\nexport default function buildProps(propsDefinition, allProps = false) {\n const props = {}\n\n Map(propsDefinition).map((data, prop) => {\n if (data.defaultValue)\n props[prop] = data.defaultV... | javascript | edit | 0 | 10 | mit | e8e00d643a4c124e87887dfdeb2596ac88285a07 | blueberryapps/react-bluekit,blueberryapps/react-bluekit,blueberryapps/react-bluekit,kjg531/react-bluekit,kjg531/react-bluekit | src/helpers/buildProps.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar passport = require('passport');\n\nmodule.exports = function (router) {\n\n router.get('/', function (req, res) {\n \n res.render('index');\n \n });\n\t\n\t\n\n\trouter.post('/signup', pas... | javascript | edit | 0 | 1 | mit | 2c7c6eb77676ce869d788cba91147ba40af45745 | uahengojr/NCA-Web-App,uahengojr/NCA-Web-App | WebApp/controllers/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Namespace as NS } from 'xmpp-constants';\n\n\nexport default function (JXT) {\n\n let Forwarded = JXT.define({\n name: 'forwarded',\n namespace: NS.FORWARD_0,\n element: 'forwarded'\n });\n\n\n JXT... | javascript | edit | 0 | 1 | mit | 4eff36df241f9de8abca1bf5bc5871625b204d48 | otalk/jxt-xmpp | src/forwarded.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst CLITable = require('cli-table3');\nconst chalk = require('chalk');\nconst { toUpper } = require('lodash/fp');\n\nconst strapi = require('../../index');\n\nmodule.exports = async function() {\n const app = await s... | javascript | edit | 0 | 1 | mit | 67b587bd6fd5d91c6bb3930cdcdb288a2c4fd073 | wistityhq/strapi,wistityhq/strapi | packages/core/strapi/lib/commands/routes/list.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar sideshow = function () {\n function hasClass (elem, cls) {\n var names = elem.className.split(\" \");\n for (var i = 0; i < names; i++) {\n if (cls == names[i])\n return true;\n }\n ... | javascript | edit | 0 | 3 | isc | 2dc52dbbc4f0e01c6f6cd898b2f57f09430675c8 | whilp/sideshow | js/sideshow.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use babel\";\n\nimport gateway from \"../lib/gateway\";\n\ndescribe(\"Gateway\", () => {\n describe(\"packagePath\", () => {\n it(\"returns path of package installation\", () => {\n expect(gateway.packagePath()).toContain(\"e... | javascript | edit | 0 | 1 | mit | 959840f4da79f68cc67b4a994c1b0fed5e5fc217 | rgreenjr/exfmt-atom | spec/gateway-spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\n\nconst passport = require('passport')\nconst FacebookStrategy = require('passport-facebook').Strategy\n\npassport.use(new FacebookStrategy({\n clientID: 'fsddf',\n ... | javascript | edit | 0 | 2 | mit | ed4aee982efbe639586bb894a7a2a0b06f221c20 | michael-lowe-nz/ageGuessAPI,michael-lowe-nz/ageGuessAPI | routes/login.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar navOffset = function () {\n $('#content.container').css('margin-top', $('#nav').height() * 0.25);\n};\n\nvar collapsedMenus = function() {\n\t$('#nav button.navbar-toggle').on('click', function() {\n\t\tif ($(this).hasClass('collap... | javascript | edit | 0 | 3 | mit | 32dd109b7df05ee3b687baed65381fe1c64da1c2 | HackNC/fall2015,newmane/PearlHacks17,HackNC/fall2015,newmane/PearlHacks17,madipfaff/PearlHacks16,madipfaff/PearlHacks16 | js/home-nav.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jslint node: true, nomen: true, white: true, unparam: true, todo: true*/\n/*!\n * Sitegear3\n * Copyright(c) 2014 Ben New, Sitegear.org\n * MIT Licensed\n */\n\n(function (_, path, fs) {\n\t\"use strict\";\n\n\tmodule.exports = functi... | javascript | edit | 0 | 2 | mit | cb27231417aac868e459ed8bc4792ac69f51220f | sitegear/sitegear3 | lib/helpers/prepareView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Cloudy = {\n isPlayerPage: function() {\n return $(\"#audioplayer\").length == 1;\n },\n\n sendEpisodeToCloudy: function() {\n var episodeTitle = $(\".titlestack .title\").text();\n var showTitle = $(\"... | javascript | edit | 0 | 2 | mit | 057829f108dc1fe04369feeb95deb794adbf154a | calebd/cloudy,calebd/cloudy | Cloudy/cloudy.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * tar-stream.js: Checkout adapter for a tar stream.\n *\n * (C) 2012 Bradley Meck.\n * MIT LICENSE\n *\n */\n\nvar tar = require('tar');\n\n//\n// ### function download (source, callback)\n// #### @source {Object} Source checkout o... | javascript | edit | 0 | 2 | mit | e009e13d0175d933542f2230c220067e2f29f093 | indexzero/node-checkout | lib/handlers/tar-stream.js | rejected_duplicate | Near-duplicate of sample 96642 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* globals jQuery,QUnit */\n\nQUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container'});\nQUnit.config.urlConfig.push({ id: 'nojshint', label: 'Disable JSHint'});\nQUnit.config.urlConfig.push({ id: 'doccontainer', label... | javascript | edit | 0 | 3 | mit | 6289c7bf271efb6f418904de6fbd46a646e7d86e | blimmer/ember-cli-qunit,nathanhammond/ember-cli-qunit,ember-cli/ember-cli-qunit,ember-cli/ember-cli-qunit,nathanhammond/ember-cli-qunit,zenefits/ember-cli-qunit,blimmer/ember-cli-qunit,zenefits/ember-cli-qunit | vendor/ember-cli-qunit/qunit-configuration.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar log4js = require('log4js');\nvar PlurkClient = require('plurk').PlurkClient;\nvar nconf = require('nconf');\n\nnconf.file('config', __dirname + '/config/config.json')\n\t.file('keywords', __dirname + '/config/keywords.json');\n\nvar... | javascript | edit | 0 | 2 | apache-2.0 | fbbf41efcba79d61feadb9307f1a4a35c65c405b | dollars0427/ecplurkbot | ecplurkbot.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport notp from 'notp'\nimport b32 from 'thirty-two'\n\nexport function cleanKey (key) {\n return key.replace(/[^a-z2-7]+/g, '').slice(0, 32)\n}\n\nexport function isValidKey (key) {\n return /^[a-z2-7]{32}$/.test(cleanKey(key))\n}\n... | javascript | edit | 0 | 1 | mit | 021d3d985bb6a9965bd69a81897b0bc712578f36 | nodys/basicotp,nodys/basicotp,nodys/basicotp | src/app/api/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"parseResults\": function(result) {\n var xmlItems = result.items && result.items.item;\n var items = [];\n\n if (xmlItems) {\n for (var i = 0; i < xmlItems.length; i++) {\n var game = xmlItem... | javascript | edit | 0 | 7 | apache-2.0 | e4912f3076fda14ebfe50250e2061447db1b6281 | thealah/bgg,thealah/bgg | lib/bggCollectionParser.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-env mocha */\nconst DoublyLinkedList = require('../../src').DataStructures.DoublyLinkedList;\nconst assert = require('assert');\n\ndescribe('DoublyLinkedList', () => {\n it('should be empty when initialized', () => {\n con... | javascript | edit | 0 | 1 | mit | 895a59456addea4b43cf283ab9668747a615e392 | ManrajGrover/algorithms-js | test/data-structures/testDoublyLinkedList.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport async function up(knex) {\n await knex.schema\n .raw('alter table feeds add column title text')\n .raw('alter table feeds add column ord integer')\n .raw(`alter table feeds drop constraint feeds_unique_feed_names`)\n ... | javascript | edit | 0 | 1 | mit | ae4e515cffdb87ca856a50f15c7a01b5605b93e4 | FreeFeed/freefeed-server,FreeFeed/freefeed-server | migrations/20200422122956_multi_homefeeds.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Site Kit by Google, Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the Licens... | javascript | edit | 0 | 1 | apache-2.0 | 7a13ef409b8251619771bd1f61a941da522d8830 | google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp | assets/js/components/SpinnerButton.stories.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport babel from 'rollup-plugin-babel';\nimport mergeBaseConfig from './rollup.merge-base-config.js';\n\nconst cjsConfig = {\n format: 'umd',\n moduleName: 'knockoutStore',\n plugins: [\n babel({\n exclude: '... | javascript | edit | 0 | 0 | mit | f55caf4ed86b4c23e4cb4b5c1f789ac6db28ab64 | Spreetail/knockout-store | rollup/rollup.umd.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n/*\n * Use for Async operations before displaying page\n *\nmodule.exports.prepare = function() {\n this.done({});\n};\n */\n\n/*\n * Compute Vue parameters\n *\nmodule.exports.vue = function() {\n return {};\n};\n */\... | javascript | edit | 0 | 0 | mit | 7aa46cae7e352fb1bfb6b2453a66e2f58c4f93aa | quasarframework/quasar-cli,rstoenescu/quasar-cli | assets/page/___page___/js/script.___page___.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {Segment, Segments} from 'stardust';\n\ndescribe('Segments', () => {\n it('should render children', () => {\n const [segmentOne, segmentTwo] = render(\n <Segments>\n <Segment>Top</Segme... | javascript | edit | 0 | 1 | mit | 86ce4f25d552c9b3538339c53b61abaf1faf860f | Semantic-Org/Semantic-UI-React,jamiehill/stardust,vageeshb/Semantic-UI-React,Semantic-Org/Semantic-UI-React,jcarbo/stardust,ben174/Semantic-UI-React,mohammed88/Semantic-UI-React,clemensw/stardust,koenvg/Semantic-UI-React,aabustamante/Semantic-UI-React,ben174/Semantic-UI-React,Rohanhacker/Semantic-UI-React,koenvg/Semant... | test/specs/elements/Segment/Segments-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nangular.module('arethusa.contextMenu').directive('pluginContextMenu', function () {\n return {\n restrict: 'E',\n scope: true,\n replace: true,\n link: function (scope, element, attrs) {\n scope.plugin =... | javascript | edit | 0 | 1 | mit | da023a20791530444e6475e905349881c2267972 | PonteIneptique/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,Masoumeh/arethusa,fbaumgardt/arethusa,Masoumeh/arethusa | app/js/arethusa.context_menu/directives/plugin_context_menu.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n 'use strict';\n\n chrome.app.runtime.onLaunched.addListener(function() {\n chrome.app.window.create('index.html', {\n innerBounds: {\n width: 960,\n height: 600\n },\n state: 'maximized'... | javascript | edit | 0 | 1 | mit | 3fcff5769179d8b784f10206d8de1c7184843a11 | nathan/pixie,nathan/pixie,videophonegeek/pixie,videophonegeek/pixie | background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(window){\n\twindow.ITCheck = window.ITCheck || {};\n\n\t// Get things rolling\n\tchrome.alarms.onAlarm.addListener(ITCheck.getUnreadThreadCount);\n\tchrome.runtime.onStartup.addListener(function () {\n\t\tchrome.alarms.create(... | javascript | edit | 0 | 2 | mit | 113b5c54802d572ed6d72d7380f5c28dc58760b3 | CodyJung/itcheck,CodyJung/itcheck | background.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Abuse reports\n//\n'use strict';\n\n\nconst Mongoose = require('mongoose');\nconst Schema = Mongoose.Schema;\n\n\nmodule.exports = function (N, collectionName) {\n\n let AbuseReport = new Schema({\n\n // _id of reported conte... | javascript | edit | 0 | 1 | mit | 36313a2f3350a8af341ca8b427b851b7697d1657 | nodeca/nodeca.core,nodeca/nodeca.core | models/core/AbuseReport.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// cavy-cli reporter class.\nexport default class CavyReporter {\n // Internal: Creates a websocket connection to the cavy-cli server.\n onStart() {\n const url = 'ws://127.0.0.1:8082/';\n this.ws = new WebSocket(url);\n }\n\n ... | javascript | edit | 0 | 3 | mit | b634cda9d411859bcce4d15b9c9a55143ecc7265 | pixielabs/cavy | src/Reporter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default {\n TOGGLE_OVER_18: 'toggleOver18',\n SIDE_NAV_TOGGLE: 'sideNavToggle',\n TOP_NAV_HAMBURGER_CLICK: 'topNavHamburgerClick',\n VOTE: 'vote',\n DROPDOWN_OPEN: 'dropdownOpen',\n COMPACT_TOGGLE: 'compactToggle',\n TOP_N... | javascript | edit | 0 | 0 | mit | 98070f6292954c7190f7aaa52c3f5c86a88fe039 | uzi/reddit-mobile,madbook/reddit-mobile,uzi/reddit-mobile,DogPawHat/reddit-mobile,DogPawHat/reddit-mobile,curioussavage/reddit-mobile,curioussavage/reddit-mobile,madbook/reddit-mobile,madbook/reddit-mobile,uzi/reddit-mobile | src/constants.es6.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar R = require('ramda');\nvar isEmptyObj = R.pipe(R.keys, R.isEmpty);\n\nfunction ModelRenderer(model) {\n this.modelName = model.modelName;\n this.attrs = model.attrs;\n}\n\nfunction attrToString(key, value) {\n va... | javascript | edit | 0 | 2 | mit | 4077314ce800a011121a04828df4da2163604a81 | jcollado/modella-render-docs | index.js | rejected_duplicate | Near-duplicate of sample 86393 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { createComponent } from 'react-fela'\r\n\r\nconst View = props => ({\r\n display: props.hidden && 'none',\r\n zIndex: props.zIndex,\r\n position: 'fixed',\r\n top: 0,\r\n left: 0,\r\n bottom: 0,\r\n right: 0\r\n})\r\n\r\n... | javascript | edit | 0 | 2 | mit | b14b5c49a76a81fc92c36ba3e2ca0c7c59274cb3 | rofrischmann/kilvin | modules/components/View.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function stringReplaceAsync(\n string,\n searchValue,\n replaceValue\n) {\n try {\n if (typeof replaceValue === \"function\") {\n // Step 1: Call native `replace` one time to acquire arguments for\n // ... | javascript | edit | 0 | 3 | mit | 55d795f8fbb1d51c9b91c9d56a352fd56becf529 | dsblv/string-replace-async | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport styles from './text_component.module.scss';\n\nfunction setWeight( { semibold, light } ) {\n if ( semibold ) return styles.se... | javascript | edit | 0 | 3 | mit | 27e8daf7bf9ab4363314a5af41d9eb5ea4de9fdb | policygenius/athenaeum,policygenius/athenaeum,policygenius/athenaeum | src/atoms/TextComponent/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('./lib/metro-transit')\n\n// Create the handler that responds to the Alexa Request.\nexports.handler = function (event, context) {\n // Create an instance of the MetroTransit skill.\n var dcMetro = new MetroTransit();\n ... | javascript | edit | 0 | 1 | mit | 71083a50a6cc900edb272dded2c3578ee5065d2d | pmyers88/dc-metro-echo | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nconst semver = require('semver');\nconst fetch = require('node-fetch');\nconst url = require('url');\n\nmodule.exports = pkg => {\n if (typeof pkg === 'string') {\n pkg = {\n name: pkg\n }\n }\n\n if (!pkg... | javascript | edit | 0 | 8 | mit | b91384ff9e6adb7d00afb166bb18e1a55e4d7286 | sillero/registry-resolve | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar app = require('./server/routes');\n\nvar server = app.listen(3000, function() {\n console.log('Listening on port %d', server.address().port);\n});\n\n```\n\nApply this change: Add shutdown notification and process title"
},
{
... | javascript | edit | 0 | 1 | mit | c1a83e68a97eb797d81e900271262840631b5467 | maskedcoder/feedback-app,maskedcoder/feedback-app | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\nvar utils = require('./lib/utils');\nvar middleware = require('./lib/middleware');\nvar fixture = require('./lib/fixture');\nvar service = require('./lib/service');\nvar transform = require('./lib/transfo... | javascript | edit | 0 | 1 | mit | 9fe321c8a3f4da36196ac115987c4e7db6642f75 | michaelleeallen/reducto | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use babel'\n\nimport {React} from 'react-for-atom'\n\nexport default React.createClass({\n\n propTypes: {\n readyCount: React.PropTypes.number,\n totalCount: React.PropTypes.number\n },\n\n render () {\n if (isNaN(this.prop... | javascript | edit | 0 | 3 | mit | f0c62f3c90f96a29736d5715dc4fdb8f15549ed6 | viddo/atom-textual-velocity,viddo/atom-textual-velocity,onezoomin/atom-textual-velocity | lib/react/loading-progress.js | rejected_duplicate | Near-duplicate of sample 98210 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst request = require('request');\nconst fs = require('fs');\nconst thenify = require('thenify').withCallback;\n\nconst download = (url, file, callback) => {\n const stream = fs.createWriteStream(file);\n stream.on('finish', () => {... | javascript | edit | 0 | 1 | mit | 69a4e2ba1022b3215255d13b15d5b35063f46386 | demohi/co-download | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nmodule.exports = {\n rules: {\n \"sort-object-props\": function(context) {\n var ignoreCase = context.options[0].ignoreCase;\n var ignoreMethods = context.options[0].ignoreMethods;\n ... | javascript | edit | 0 | 7 | mit | 45bd22346dbd3cfeaedea1a3061ff5cc50b3e9a0 | shane-tomlinson/eslint-plugin-sorting,jacobrask/eslint-plugin-sorting | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Q = require('q');\nvar request = Q.denodeify(require('request'));\n\nvar chromecastHomeURL = 'https://clients3.google.com/cast/chromecast/home/v/c9541b08';\nvar initJSONStateRegex = /(JSON\\.parse\\(.+'\\))/;\n\nvar... | javascript | edit | 0 | 1 | mit | b99f91a8f9259cf867cd522f4164aed4a83c2e72 | apeddinti/chromecast-backgrounds,dconnolly/chromecast-backgrounds,DKbyo/chromecast-windows-theme,adz/chromecast-backgrounds,Wiseup/chromecast-backgrounds | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\n// modified from https://github.com/es-shims/es6-shim\nvar keys = require('object-keys');\nvar isObject = function (obj) {\n\treturn typeof obj !== 'undefined' && obj !== null;\n};\n\nvar assignShim = function assign(... | javascript | edit | 0 | 5 | mit | 60689993d75db32701e99f7eb9110ce8eff54610 | ljharb/object.assign,es-shims/object.assign,reggi/object.assign | index.js | rejected_duplicate | Near-duplicate of sample 72237 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Enable promise error logging\nrequire('promise/lib/rejection-tracking').enable();\n\nvar express = require('express');\nvar app = express();\nvar certificate = require('./src/certificate')\n\napp.set('port', (process.env.PORT || 5000... | javascript | edit | 0 | 2 | mit | b2414317832618de90a46fa0115e0903a749b4de | JensDebergh/certificate-dashboard,JensDebergh/certificate-dashboard,JensDebergh/certificate-dashboard | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require(\"express\"),\n mongoose = require(\"mongoose\"),\n app = express();\n\nmongoose.connect(\"mongodb://localhost/test\", function (err) {\n if (!err) {\n console.log(\"Connected to MongoDB\");\n } else {\n... | javascript | edit | 0 | 2 | mit | 9260ae76dba730555f71ea839d4c42cfe9d5393e | shippableSamples/sample_node_mongo,pranaypareek/sample_node_mongo,samples-org-read/sample_node_mongo,a-murphy/sample_node_mongo,navneetjo/sample_node_mongo,buildsample/sample_node_mongo,a-murphy/sample_node_mongo,vidyar/sample_node_mongo | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function (protocol) {\n\tprotocol = protocol || 'http';\n\tvar url = 'http://vicopo.selfbuild.fr/search/';\n\tswitch (protocol) {\n\t\tcase 'https':\n\t\t\turl = 'https://www.selfbuild.fr/vicopo/search/';\n\t\t\tbreak;\... | javascript | edit | 0 | 4 | mit | 1e55d5399e6c6a34f49fa992982fb3b79ad3f9e7 | kylekatarnls/vicopo,kylekatarnls/vicopo,kylekatarnls/vicopo,kylekatarnls/vicopo,kylekatarnls/vicopo | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar fs = require('fs');\nvar mime = require('mime');\n\nvar pattern = function (file, included) {\n return {pattern: file, included: included, served: true, watched: false};\n};\n\nvar framework = functio... | javascript | edit | 0 | 2 | mit | ad7a8ebb6994ad425c8429a052ef0abc91365ada | jimsimon/karma-web-components,jimsimon/karma-web-components | index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport BlogPost from '../database/models/blog-post';\nimport log from '../log';\n\nconst PUBLIC_API_ATTRIBUTES = [\n 'id',\n 'title',\n 'link',\n 'description',\n 'date_updated',\n 'date_published'\n];\n\nconst DEFAULT_ORDER = [\n... | javascript | edit | 0 | 2 | mit | 5203a7c14acab3253aff2494f4bbacaa945ff3c3 | csblogs/api-server,csblogs/api-server | src/controllers/post-controller.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe('pingPong', function() {\n it(\"is true for a number that is divisible by 3\", function() {\n expect(pingPong(6)).to.equal(true);\n });\n\n it(\"is true for a number that is divisible by 5\", function() {\n expect(ping... | javascript | edit | 0 | 1 | mit | 244745bf47320a759e403beea0ecb71f178509c6 | kcmdouglas/pingpong,kcmdouglas/pingpong | spec/specs.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.