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\n/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be fo...
javascript
edit
0
2
bsd-3-clause
869da6419922b8b827cafbafebaf45b35af785e4
Polymer/web-component-tester,sankethkatta/web-component-tester,hvdb/web-component-tester,GabrielDuque/web-component-tester,hypnoce/web-component-tester,sankethkatta/web-component-tester,robdodson/web-component-tester,marcinkubicki/web-component-tester,hvdb/web-component-tester,Polymer/tools,rasata/web-component-tester,...
runner/test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs')\nconst path = require('path')\nconst chalk = require('chalk')\nconst program = require('commander')\nconst getConfig = require('lingui-conf').default\nconst plurals = require('make-plural')\n\nconst config = get...
javascript
edit
0
2
mit
7dd2cfca7e87cd1d2d84c9685e1dbf4ad4c5a8a5
lingui/js-lingui,lingui/js-lingui
packages/lingui-cli/src/lingui-add-locale.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport {\n Router,\n Route,\n hashHistory,\n IndexRoute\n} from 'react-router';\nimport App from './App';\nimport RecentTracks from './components/RecentTracks';\nimport TopArtists from './components/TopAr...
javascript
edit
0
1
bsd-3-clause
7c326ab8b6cadbc12e01c98c5e0789cb12dc5969
jeromelachaud/Last.fm-Activities-React,jeromelachaud/Last.fm-Activities-React
src/AppRouter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar DEFAULT_MIN = 1;\nvar DEFAULT_MAX = 3;\n\nApp.QuantityWidgetComponent = Ember.Component.extend({\n\n tagName: 'div',\n classNameBindings: [ ':quantity-widget', 'isMin', 'isMax' ],\n attributeBindings: [ 'name:data-icon' ],\n\n ...
javascript
edit
0
2
mit
fa588af379d1f779ed501048e132b33241428bc6
dollarshaveclub/ember-uni-form,dollarshaveclub/ember-uni-form
app/components/quantity-widget-component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n AUTH_USER,\n UNAUTH_USER,\n AUTH_ERROR,\n SET_USER_DATA,\n SET_CREDIT_CARDS,\n SET_DEFAULT_CARD\n} from '../constants/';\n\nconst initialState = {\n authenticated: false,\n errors: null,\n user: null,\n creditCardDe...
javascript
edit
0
8
mit
ffc9c2475174ea4d87c7f389f77631f2c7cd9a35
GiancarlosIO/ecommerce-book-app,GiancarlosIO/ecommerce-book-app,GiancarlosIO/ecommerce-book-app
app/javascript/app/reducers/auth-reducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n addParameters,\n addDecorator,\n setCustomElements,\n withA11y\n} from '@open-wc/demoing-storybook';\n\nasync function run() {\n const customElements = await (\n await fetch(new URL('../custom-elements.json', import.m...
javascript
edit
0
1
mit
84997448d9c3b932c5d7349eea6d6de3877b9bfa
rpatterson/nOrg,rpatterson/nOrg
.storybook/preview.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (typeof buster == \"undefined\") {\n var buster = {};\n}\n\nbuster.util = (function () {\n var toString = Object.prototype.toString;\n var div = typeof document != \"undefined\" && document.createElement(\"div\");\n\n ret...
javascript
edit
0
6
bsd-3-clause
dd9345272923cc723eede78af5fb61797237df13
geddski/buster-core,busterjs/buster-core,busterjs/buster-core
lib/buster-util.js
rejected_duplicate
Near-duplicate of sample 105141
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction TestResults(dataTable) {\n var Cucumber = require('cucumber');\n var TestResult = require('./testResult');\n var maximums = [0, 0, 0, 0];\n\n var testCollection = Cucumber.Type.Collection();\n\n ...
javascript
edit
0
2
mit
72d231edb93d2a9bf6ead440c9b46d6b35d70717
seeq12/seequcumber,seeq12/seequcumber,seeq12/seequcumber
seequmber/testResults/testResults.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport dissolve from 'dissolve'\n\nfunction createDataStream() {\n return dissolve()\n .loop(function() {\n this\n .uint32(\"length\")\n .int8(\"type\")\n .tap(function() {\n if (this.vars.length) ...
javascript
edit
0
2
apache-2.0
b6bb30f5d90885b60c1406ccf211511dbb347a80
RobCoIndustries/pipboylib
src/decoding/createDataStream.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport '@webcomponents/webcomponentsjs';\n\nclass View extends HTMLElement {\n static wrapped() {\n const Cls = document.registerElement(this.name, this);\n return (params) => Object.assign(new Cls(), params);\n }\n\...
javascript
edit
0
2
mit
d2cab051760db8de79c6b59b3e67f28b11fe6c35
HiFiSamurai/ui-toolkit,HiFiSamurai/ui-toolkit
src/js/View.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport _ from 'lodash'\nimport fp from 'lodash/fp'\n\nexport default props => {\n const { children: text } = props\n\n const linkPattern = /([a-z]+:\\/\\/[^,\\s]+)/g\n\n const parts = fp.filter(s => s !== '...
javascript
edit
0
2
mit
14eaff77c0293e55005a30ae64b4bffeb16c9ce3
daGrevis/msks,daGrevis/msks,daGrevis/msks
src/client/components/Text.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar ContextReplacementPlugin = require(\"webpack/lib/ContextReplacementPlugin\");\n\nmodule.exports = {\n entry: './build/index.js',\n output: {\n path: './build',\n filename: 'bundle.js'\n },\n node: {\n fs: \"empty\"\n ...
javascript
edit
0
0
bsd-3-clause
1174726f0e8d814afcd751b162e9d8b5cb1c8235
eskirk/jupyterlab,TypeFox/jupyterlab,TypeFox/jupyterlab,eskirk/jupyterlab,jupyter/jupyterlab,charnpreetsingh185/jupyterlab,TypeFox/jupyterlab,charnpreetsingh185/jupyterlab,charnpreetsingh185/jupyterlab,charnpreetsingh185/jupyterlab,eskirk/jupyterlab,eskirk/jupyterlab,jupyter/jupyter-js-ui,jupyter/jupyter-js-ui,TypeFox/...
examples/filebrowser/webpack.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport renderHTML from 'react-render-html';\nimport SocketClient from './socket-client';\nimport PropTypes from 'prop-types';\n\nclass HTMLRenderer extends React.Component {\n constructor(props) {\n super...
javascript
edit
0
2
mit
c0a49738fbd196f8f79fda0d265268b3fc8b095d
noraesae/pen
src/frontend/html-renderer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport BaseComponent from './flexberry-base';\n\nexport default BaseComponent.extend({\n tagName: 'td',\n classNames: [],\n column: null,\n record: null\n});\n\n```\n\nApply this change: Add support of two way binding\n\nin object-l...
javascript
edit
0
1
mit
7893445133fc85c7305ffba75a34936624bf3ca5
Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry,Flexberry/ember-flexberry
addon/components/object-list-view-input-cell.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n authToken: process.env.AUTH_TOKEN || 'secret',\n env: process.env.NODE_ENV,\n host: process.env.HOST || 'localhost',\n github: {\n apiUrl: 'https://api.github.com',\n username: process.env.GITHUB_USERNAME ||...
javascript
edit
0
0
mit
a4311dc96f20b7f13275df7828c7c5a4b7b8dc52
franvarney/franvarney-api
config.js
rejected_duplicate
Near-duplicate of sample 93080
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { task } from 'ember-concurrency';\n\nexport default Ember.Component.extend({\n store: Ember.inject.service(),\n flashMessages: Ember.inject.service(),\n isDisabled: false,\n isSelected: Ember.comp...
javascript
edit
0
5
bsd-2-clause
8dc281e7ddd4ec10f499cf19bb5743ebfa951179
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
app/components/participant-checkbox.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport { RGB_NEAREST, RGB_APPROX, LAB_NEAREST } from \"constants/color\";\n\nexport const BOOL = \"BOOL\";\nexport const ENUM = \"ENUM\";\nexport const RANGE = \"RANGE\";\nexport const STRING = \"STRING\";\nexport const PALE...
javascript
edit
0
0
mit
37fb836e41d16631cef9a10321de1a578a92904d
gyng/ditherer,gyng/ditherer,gyng/ditherer
src/constants/controlTypes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass BpmCounter {\n constructor() {\n this.numTaps = 0;\n this.bpm = 0;\n this.startTapTime = new Date();\n }\n\n restart() {\n this.numTaps = 0;\n this.bpm = 0;\n }\n\n tick() {\n if (this.numTaps === 0) {\n ...
javascript
edit
0
3
mit
58ac6e0986e0123732a7eb85c12c151fac028f4a
khwang/plum,khwang/plum
src/js/bpm-counter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ActionTypes from '../constants/ActionTypes';\nvar AppDispatcher = require('./AppDispatcher');\nvar Config = require('../config/Config');\nvar RequestUtil = require('../utils/RequestUtil');\n\nmodule.exports = {\n\n fetchApps: Re...
javascript
edit
0
1
apache-2.0
c3943b7962770cf4e3379fa29eb6dcf9958d0297
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
src/js/events/MarathonActions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\n\nimport APINotLoaded from 'es6!display/not_loaded';\nimport ChangesUI from 'es6!display/changes/ui';\n\nimport * as api from 'es6!server/api';\n\nimport custom_content_hook from 'es6!utils/cus...
javascript
edit
0
2
apache-2.0
53f0ff80ae2adea22fa7821bd78b57a4920e272c
dropbox/changes,dropbox/changes,dropbox/changes,dropbox/changes
webapp/display/changes/jobstep_details.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst util = require('util');\nconst Koa = require('koa');\nconst bodyParser = require('koa-bodyparser');\nconst request = require('./request');\n\nclass Server {\n\n constructor(verbose) {\n this.app = new Koa();\n\n this.app.us...
javascript
edit
0
5
mit
4233edea9f06647e77033222f113392b44049f53
quentinadam/node-request-server
Server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Backbone = require('backbone');\n\nmodule.exports = Backbone.View.extend({\n events() {\n return (\n this.model.get('events') || {\n mousedown: 'handleClick'\n }\n );\n },\n\n attributes() {\n return thi...
javascript
edit
0
3
bsd-3-clause
d64d4fd171002890c5bc3a5e2ea697e03b37c59d
QuorumDMS/grapesjs,artf/grapesjs,artf/grapesjs,QuorumDMS/grapesjs,artf/grapesjs
src/dom_components/view/ToolbarButtonView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ssh2 = require('ssh2');\nvar SocketIOFileUpload = require('socketio-file-upload');\n\nvar completeFileUpload = function(client, sshCredentials) {\n return function(event) {\n var credentials = sshCredentials(client.instance);\n ...
javascript
edit
0
2
mit
566df4420093daf02422cbf344d49d0da089e583
antonleykin/InteractiveShell,antonleykin/InteractiveShell,antonleykin/InteractiveShell,fhinkel/InteractiveShell,fhinkel/InteractiveShell,fhinkel/InteractiveShell,fhinkel/InteractiveShell
src/lib/fileUpload.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Controller.extend({\n sortProperties: [\n 'statusSort:asc',\n 'organizationKindSort:asc',\n 'nomen:asc',\n ],\n sortedSessions: Ember.computed.sort(\n 'model',\n 'sort...
javascript
edit
0
1
bsd-2-clause
ab838c82bd48a01a99c152b2392518382d9181e3
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
app/controllers/dashboard/session-manager/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar execall = require('regexp.execall');\n\n\nmodule.exports = function (text) {\n return execall(/ \\w{1,2} [^ ]/g, text).map(function (match) {\n return match.index + match[0].length - 2;\n });\n};\n\n```\n\nAppl...
javascript
edit
0
2
mit
4c5483125fcd12e111cffe1a1cadf67b8777ff7e
eush77/nbsp-advisor
src/nbsp-positions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n/*\n* Copyright 2013 Eduardo Lundgren, All Rights Reserved.\n*\n* Code licensed under the BSD License:\n* https://github.com/eduardolundgren/blob/master/LICENSE.md\n*\n* @author Eduardo Lundgren <<EMAIL>>\n*/\n\nv...
javascript
edit
0
1
bsd-3-clause
3de08c1740dac5c258d7291aba11f996c6e27c47
tomzx/gh,TomzxForks/gh,oouyang/gh,TomzxForks/gh,oouyang/gh,dustinryerson/gh,dustinryerson/gh,modulexcite/gh,modulexcite/gh,tomzx/gh,henvic/gh,henvic/gh
bin/gh.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst AssignedSchedule = require('../../structs/db/AssignedSchedule.js')\nconst pruneGuilds = require('./pruneGuilds.js')\nconst pruneFeeds = require('./pruneFeeds.js')\nconst pruneFormats = require('./pruneFormats.js')\nconst pruneFail...
javascript
edit
0
2
mit
5fee62511ed5e733d501e86ac8fe8e0516ba8a54
synzen/Discord.RSS,synzen/Discord.RSS
src/util/maintenance/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(\".container\").addClass(\"tk-proxima-nova\");\n$(\".page-header\").addClass(\"tk-league-gothic\");\n$(\"td:nth-child(2)\").each(function() {\n $(this).text(moment($.trim($(this).text()), \"DD-MMM-YYYY HH:mm\").fromNow());\n});\n\n``...
javascript
edit
0
1
mit
5205890e7806ea1997d02e8bb2b1554e34418d04
damiendart/robotinaponcho,damiendart/robotinaponcho,damiendart/robotinaponcho
site/assets/_folder-of-crap.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add chapter 9, exercise 3" }, { "role": "assistant", "content": "let number = /^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)([Ee][+-]?\\d+)?$/;\n" } ]
javascript
new_file
0
0
mit
1b5cde782e42cf48c29a09921b1aec62c5be876a
bewuethr/ctci
eloquent_js/chapter09/ch09_ex03.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar express = require('express');\nvar controller = require('./conversion.controller');\n\nvar router = express.Router();\n\nrouter.post('/import', controller.import);\nrouter.post('/export/:format(cml,pdb,mol,mol2,smil...
javascript
edit
0
0
apache-2.0
abdee493c6b6a9811eae773bf07512834e228afa
mohebifar/chemozart,mohebifar/chemozart,U4ICKleviathan/chemozart,U4ICKleviathan/chemozart
server/api/conversion/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nasync function locateScalpel(nest) {\n let curNest = nest.name;\n for (;;) {\n let scalpelLoc = await anyStorage(nest, curNest, \"scalpel\");\n if (scalpelLoc == curNest) return curNest;\n curNest = scalpelLoc...
javascript
edit
0
3
mit
d648388d8c9297efb610e86904853b937c051582
bewuethr/ctci
eloquent_js/chapter11/ch11_ex01.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport layout from '../templates/components/simple-table-cell';\n\nexport default Ember.Component.extend({\n layout,\n tagName: 'th',\n\n classNameBindings: ['columnsClass'],\n attributeBindings: ['rowspa...
javascript
edit
0
0
mit
d959e87e16280eb4cbcb7ca80b64c89cacde2662
Baltazore/ember-simple-table,Baltazore/ember-simple-table
addon/components/simple-table-cell.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nimport { t } from '../utils/i18n';\n\nexport const fileTypesMatrix = {\n 'admin-bounds': {\n display: t('Administrative Boundaries'),\n description: t('A GeoJSON containing polygons with the administrative boundari...
javascript
edit
0
0
mit
3515ea1cf459874f3a487e7c30fc585eb21f1f7f
WorldBank-Transport/rra-frontend,WorldBank-Transport/rra-frontend,WorldBank-Transport/rra-frontend
app/assets/scripts/utils/constants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport assert from 'assert';\n\nimport series from './series';\nimport * as TYPES from '../../actions/types';\n\n\ndescribe('A series reducer for redux state', () => {\n\n\t//Test states\n\tconst seriesDefaultState = {};\n\tconst series...
javascript
edit
0
1
mit
28590b794f879b426d9aaf1247ddbed2ae30170e
fongelias/cofin,fongelias/cofin
client/app/redux/reducers/series/series.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env jest */\n\nconst { exec } = require('child_process')\nconst request = require('supertest')\nlet app\n\n// start a mongo instance loaded with test data using docker\nbeforeAll(async () => {\n await exec('docker run --name ...
javascript
edit
0
1
apache-2.0
f447483548193175cbb68780ba5a4b146183c964
classmere/api
__tests__/app.test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fetch = require('node-fetch');\nvar URL = require('url').URL;\n\nfunction wrapFetchForNode(fetch) {\n // Support schemaless URIs on the server for parity with the browser.\n // https://github.com/matthew-andrews/i...
javascript
edit
0
3
mit
2c1b1b6d2b35ce363ca950e57d11e0e33b95dac2
qubyte/fetch-ponyfill,qubyte/fetch-ponyfill
fetch-node.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fromArray = array => createObservable((push, end) => {\n array.forEach(value => { push(value); });\n end();\n});\n\n```\n\nApply this change: Allow observable creation with no argument" }, { "role": "assistant", "con...
javascript
edit
0
2
mit
f22f904a07059b3060d6818b926ec6aaf9571f71
hhelwich/observable,hhelwich/observable
src/operator/create/fromArray.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar interfaceConfig = {\n CANVAS_EXTRA: 104,\n CANVAS_RADIUS: 7,\n SHADOW_COLOR: '#00ccff',\n INITIAL_TOOLBAR_TIMEOUT: 20000,\n TOOLBAR_TIMEOUT: 4000,\n DEFAULT_REMOTE_DISPLAY_NAME: \"Fellow Jitster\",\n DEFAULT_DOM...
javascript
edit
0
0
apache-2.0
ffb8c1d6a86d60ebc6306db8e46762c480512f7f
dwanghf/jitsi-meet,jitsi/jitsi-meet,bgrozev/jitsi-meet,nwittstruck/jitsi-meet,bgrozev/jitsi-meet,learnium/jitsi-meet,gerges/jitsi-meet,gerges/jitsi-meet,gpolitis/jitsi-meet,Aharobot/jitsi-meet,bickelj/jitsi-meet,JiYou/jitsi-meet,IpexCloud/jitsi-meet,dyweb/jitsi-meet,luciash/jitsi-meet-bootstrap,gpolitis/jitsi-meet,gpol...
interface_config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar generate = require('../generate');\n\nexports.endgames = [\n 'nefarious purposes',\n 'a Washington takeover',\n 'a terrorist plot',\n 'world domination',\n 'a plot against the queen'\n];\n\nexports.ge...
javascript
edit
0
0
mit
1624dadd1dd621ae631e73db85385dce79138d71
rowanmanning/conspire
lib/material/endgame.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\nimport fs from 'fs-plus'\nimport path from 'path'\n\nexport default class BuilderRegistry {\n getBuilder (filePath) {\n const builders = this.getAllBuilders()\n const candidates = builders.filter((builder) => build...
javascript
edit
0
7
mit
bc861e0d9ac49bbba0fdd4288f67463a9aca36af
thomasjo/atom-latex,thomasjo/atom-latex,thomasjo/atom-latex
lib/builder-registry.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * DomainScope module\n * @lastmodifiedBy ChengFuLin(<EMAIL>)\n * @lastmodifiedDate 2015-07-28\n */\nvar Scope = require('./scope');\n\n/**\n * DomainScope\n * @param {Object} cfg Graph of the domain scope\n * @constructor\n */\nfun...
javascript
edit
0
1
mit
43d297eadf58327bfefe81ced42bdb23099548fe
chengfulin/dujs,chengfulin/dujs
lib/dujs/domainscope.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by Alex on 29/01/2017.\n */\n import Hapi from 'hapi';\n\n export class Knekt {\n \tconstructor() {\n \t\tthis._server = new Hapi.Server();\n \t\tthis.plugins = [];\n \t}\n\n \tsetConnection(host, port) {\n \t\tthis._ser...
javascript
edit
0
2
mit
8e44baa3db6723dd83cf8bd5d9686c3d2eb33be1
goKnekt/Knekt-Server
src/lib/Knekt.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst fs = require('fs');\nconst GetEmail = require('../../lib/install/get-email');\n\ndescribe('GetEmail', () => {\n let step;\n\n beforeEach(() => {\n step = new GetEmail();\n });\n\n describe('.start()', () =>...
javascript
edit
0
1
bsd-3-clause
3797f5b68e1426135dbc60729610087a3502d2ed
kiteco/kite-installer
spec/install/get-email-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport { useTranslator } from '@u-wave/react-translate';\nimport CircularProgress from '@material-ui/core/CircularProgress';\nimport Tooltip from '@material-ui/core/Toolti...
javascript
edit
0
2
mit
0575210aeacc6a984df7a9b9224154a5900d3ad8
u-wave/web,u-wave/web
src/components/PlaylistManager/Panel/ShufflePlaylistButton.js
rejected_duplicate
Near-duplicate of sample 90721
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport Relay from 'react-relay';\nimport TeamRoute from './TeamRoute';\nimport Can from '../components/Can';\nimport CheckContext from '../CheckContext';\nimport { teamSubdomain } fr...
javascript
edit
0
2
mit
202038131d2843815c5062950e4dd14dfb8cac6c
meedan/check-web,meedan/check-web,meedan/check-web
src/app/relay/TeamMenuRelay.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n$(document).on(\"turbolinks:load\", function() { //equivalent of $(document).ready()\n console.log(\"JS loaded.\")\n addSpace();\n var $grid = initMasonry();\n\n // layout Masonry after each image loads\n $grid.i...
javascript
edit
0
3
mit
28320eeeb420ce13c5e00d670a82aab889ecc5c6
MitulMistry/rails-storyplan,MitulMistry/rails-storyplan,MitulMistry/rails-storyplan
app/assets/javascripts/main.js
rejected_duplicate
Near-duplicate of sample 81919
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['Modernizr', 'createElement', 'docElement'], function( Modernizr, createElement, docElement ) {\n // http://www.w3.org/TR/css3-exclusions\n // http://www.w3.org/TR/css3-exclusions/#shapes\n // Examples: http://html.adob...
javascript
edit
0
2
mit
f066554b77700604f9f5e8de76e2c976d91ab7b0
Modernizr/Modernizr,Modernizr/Modernizr
feature-detects/css/shapes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport postcss from 'postcss';\nimport margin from './lib/decl/margin';\nimport padding from './lib/decl/padding';\nimport borders from './lib/decl/borders';\nimport columns from './lib/decl/columns';\n\nconst processors = [\n margin...
javascript
edit
0
2
mit
26c03b575dad5dbe4720b147279bdadde24f0748
ben-eb/cssnano
packages/postcss-merge-longhand/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nApp.populator('feed', function (page, data) {\n $(page).find('.app-title').text(data.title);\n $.getJSON('/data/feed/' + data.id + '/articles', function (articles) {\n articles.forEach(function (article) {\n var li = $('<li cl...
javascript
edit
0
1
mit
b98a7e399a90115907fd13e5edbeb28475c4ed3e
cliffano/feedpaper,cliffano/feedpaper,cliffano/feedpaper
public/scripts/global.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jslint browser: true, undef: true, white: false, laxbreak: true *//*global Ext,Slate*/\nExt.define('SlateAdmin.model.person.progress.NoteRecipient', {\n extend: 'Ext.data.Model',\n\n idProperty: 'ID',\n groupField: 'Relations...
javascript
edit
0
0
mit
8d3779a37df7d199753e350b83bbe884fdae8fa8
SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate,SlateFoundation/slate-admin,SlateFoundation/slate-admin,SlateFoundation/slate-admin
sencha-workspace/SlateAdmin/app/model/person/progress/NoteRecipient.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport requiredArgs from '../_lib/requiredArgs/index.js'\n\n/**\n * @name formatISODuration\n * @category Common Helpers\n * @summary Format a Duration Object according to ISO 8601 Duration standards (https://www.digi.com/resources/docu...
javascript
edit
0
2
mit
c0227b60be16470032ab03ff29ae88047fca7479
date-fns/date-fns,date-fns/date-fns,date-fns/date-fns
src/formatISODuration/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst config = require('../../../knexfile').web\nconst knex = require('knex')(config)\nconst orgUnitFinder = require('../helpers/org-unit-finder')\n\nmodule.exports = function (id, type) {\n var orgUnit = orgUnitFinder('name', type)\n ...
javascript
edit
0
1
mit
951638fe79b179096c11912d3a15283bc0b13dd8
ministryofjustice/wmt-web,ministryofjustice/wmt-web
app/services/data/get-caseload-progress.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar router = require(\"express\").Router();\nvar db = require(\"./db\");\n\nrouter.get(\"/\", function (req, res) {\n var o = {\n map: function () {\n if (this.parents.length === 1) {\n for (var i = 0; i < this.files.len...
javascript
edit
0
3
mit
7782fc4d22078f0b741d20678143bd8d80876609
bjornarg/dev-dashboard,bjornarg/dev-dashboard
git/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * SurveyQuestionSingleSelectChoice component.\n *\n * Site Kit by Google, Copyright 2021 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 ...
javascript
edit
0
1
apache-2.0
739f618adf2fa1a971092ce6bedd913c95cc2600
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
assets/js/components/surveys/SurveyQuestionSingleSelectChoice.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nAccountsAnonymous.login = function (callback) {\n callback = callback || function () {};\n if (Meteor.userId()) {\n callback(new Meteor.Error('accounts-anonymous-already-logged-in',\n \"You can't login anonymously while you ar...
javascript
edit
0
4
mit
824a95776d93c5fe6314d11d17e7f810d2994414
brettle/meteor-accounts-anonymous
accounts-anonymous-client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Em from 'ember';\nimport ArraySlice from 'array-slice';\nvar get = Em.get;\nvar set = Em.set;\n\nvar ArrayPager = ArraySlice.extend({\n\t// 1-based\n\tpage: function (key, page) {\n\t\tvar limit = get(this, 'limit');\n\t\tvar off...
javascript
edit
0
4
mit
fe17a2b4115bdedd639b4c26a9a54ee33dbb5bf7
j-/ember-cli-array-pager,j-/ember-cli-array-pager
addon/array-pager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or a...
javascript
edit
0
0
mit
a433c763359129ba034309097681368e7f2b38e8
godspeedyoo/rails-angular-skeleton,godspeedyoo/rails-angular-skeleton,godspeedyoo/sc2tracker,godspeedyoo/sc2tracker,godspeedyoo/rails-angular-skeleton,godspeedyoo/sc2tracker
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\n/**\n * Binary to run the main server.\n * (C) 2015 Alex Fernández.\n */\n\n// requires\nvar stdio = require('stdio');\nvar reviewServer = require('../lib/reviewServer');\n\n// init\nvar options = s...
javascript
edit
0
0
mit
3c3c4381d1d0dff38184d2543cff92f5c6be45be
alexfernandez/trello-reviewer
bin/reviewServer.js
rejected_duplicate
Near-duplicate of sample 69637
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\n/**\n * Binary to run the main server.\n * (C) 2015 Alex Fernández.\n */\n\n// requires\nvar stdio = require('stdio');\nvar Log = require('log');\nvar reviewServer = require('../lib/reviewServer');\...
javascript
edit
0
0
mit
36ac9e32d2b4fa5f8df837b956f8e73287395c86
alexfernandez/trello-reviewer
bin/reviewServer.js
rejected_duplicate
Near-duplicate of sample 69637
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @constructor\n */\nfunction Analytics() {\n this.service_ = null;\n}\n\nAnalytics.prototype.start = function(settings) {\n if (this.service_) {\n throw 'Analytics should be started only once per session.';\n }\n\n this.se...
javascript
edit
0
3
bsd-3-clause
204820f700ed8f8c89e50b310b7f1433bec4402e
codex8/text-app,modulexcite/text-app,l3dlp/text-app,zkendall/WordBinder,l3dlp/text-app,zkendall/WordBinder,codex8/text-app,modulexcite/text-app,modulexcite/text-app,l3dlp/text-app,codex8/text-app,zkendall/WordBinder
js/analytics.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */\n\ndescribe('ng-grid', function() {\n beforeEach(function() {\n browser().navigateTo('../../workbench/index.html');\n });\n\n describe('templates', funct...
javascript
edit
0
1
mit
8e0822de5b362f9cd5d421269084dd8c23829f98
ciccio86/ui-grid,PaulL1/ng-grid,zen4s/ng-grid,b2io/ng-grid,louwie17/ui-grid,pkdevbox/ui-grid,dietergoetelen/ui-grid,zen4s/ng-grid,ingshtrom/ui-grid,edivancamargo/ui-grid,edmondpr/ng-grid,Stiv/ui-grid,angular-ui/ng-grid,JLLeitschuh/ui-grid,louwie17/ui-grid,SomeKittens/ui-grid,yccteam/ui-grid,Phalynx/ng-grid,ntgn81/ui-gr...
test/e2e/scenarios.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { useState } from 'react';\nimport { c } from 'ttag';\nimport PropTypes from 'prop-types';\nimport { FormModal, PrimaryButton, Label, Alert, TextArea } from 'react-components';\n\nconst CustomThemeModal = ({ onSave, theme:...
javascript
edit
0
1
mit
8fdb62c51eab8f19cb5e6e7b3dac6bf28f017411
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
packages/components/containers/themes/CustomThemeModal.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconsole.log('Started', self);\nself.addEventListener('install', function(event) {\n self.skipWaiting();\n console.log('Installed', event);\n});\nself.addEventListener('activate', function(event) {\n console.log('Activated', eve...
javascript
edit
0
2
mit
9f7b8362fbc99bc3c2832413de7963e19a21637f
coreyja/glassy-collections,coreyja/glassy-collections,coreyja/glassy-collections
app/assets/javascripts/sw.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path')\n\nmodule.exports = function engine (config) {\n require('./driver')(config)\n config.engine.on('init', function (processType) {\n // processType will be 'runner','processor', or 'main'\n // Useful f...
javascript
edit
0
3
mit
df8b1d826bbbe45a9b21738ea0c4d6c4fe4b7c49
ScreepsMods/screepsmod-mongo
lib/engine/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar createError = require('createerror');\nvar httpErrors = require('httperrors');\nvar socketCodesMap = require('./socketCodesMap');\nvar _ = require('lodash');\n\nvar SocketError = createError({ name: 'SocketError' });\n\nfunction cre...
javascript
edit
0
2
bsd-3-clause
7e15fe42282c594260e7185760246a50f9ee7e50
alexjeffburke/node-socketerrors
lib/socketErrors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\n\nimport type { FetchJSON } from '../utils/fetch-json';\nimport type { UploadMultimediaResult } from '../types/media-types';\n\nasync function uploadMultimedia(\n fetchJSON: FetchJSON,\n multimedia: Object,\n onProgress: (p...
javascript
edit
null
null
bsd-3-clause
0d4f743d87898f101d47a733572f55eae1128be9
Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal
lib/actions/upload-actions.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\n\nimport {\n OPEN_ALERT_MESSAGE,\n CLOSE_ALERT_MESSAGE,\n} from '../actions/actionTypes';\n\nconst initialState = {\n show: false,\n messages: {\n th: '',\n en: '',\n },\n technical: {\n message: ...
javascript
edit
0
3
mit
c6594d95ad6a2f694837561df71ec0997ae50fa9
hlex/vms,hlex/vms
app/reducers/alertMessage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\nvar marked = require('marked');\nvar textRenderer = require('marked-text-renderer');\n\nfunction extractFirstNode(nodes, nType) {\n return _.chain(nodes)\n .filter(function(node) {\n return node....
javascript
edit
0
3
apache-2.0
21fd5924b841f9926b8ba6ca57b387539222fe54
CN-Sean/gitbook,OriPekelman/gitbook,hujianfei1989/gitbook,iamchenxin/gitbook,JohnTroony/gitbook,xxxhycl2010/gitbook,qingying5810/gitbook,bjlxj2008/gitbook,JozoVilcek/gitbook,kamyu104/gitbook,strawluffy/gitbook,ferrior30/gitbook,yaonphy/SwiftBlog,shibe97/gitbook,gencer/gitbook,palerdot/gitbook,mautic/documentation,haamo...
lib/parse/readme.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport SUPPORTED_FORMULAS from '../../src/supported-formulas';\n\ndescribe('.SUPPORTED_FORMULAS', () => {\n it('should be defined', () => {\n expect(SUPPORTED_FORMULAS.length).to.eq(391);\n });\n});\n\n```\n\nApply this change: Upd...
javascript
edit
0
1
mit
b6296f0ff62ec2a9e8e123c57d2e696b2bbc62c8
kevb/formula-parser,kevb/formula-parser
test/unit/supported-formulas.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Places.js\n *\n * @description :: TODO: You might write a short summary of how this model works and what it represents here.\n * @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models\n */\n\nmodule.expo...
javascript
edit
0
0
mit
b9cc15c3e8329b61c0984e9ca70069f9f3e764a7
FernandoPucci/GerPro,FernandoPucci/GerPro
api/models/Places.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs'),\n\tfileModule = require('file'),\n\ttestDir = '/tests',\n\ttestFileName = 'integration_test.js';\n\t\nprocess.env.INTEGRATION = true;\n\ndescribe('endpoint', function() {\n\tit('should load the server and set eve...
javascript
edit
0
4
mit
a7e8bb0e37d1981bb287345c5ab575cedd1b4708
apis-is/apis
test/integration/endpoints.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// include flightplan.js\nvar plan = require('flightplan');\n\n// Plan to git deploy via ssh remote\nplan.remote('gitDeploy', function(remote) {\n var webRoot = plan.runtime.options.webRoot;\n\n // git pull\n remote.with('cd ' + webR...
javascript
edit
0
1
mit
ad926871ed5df6e2d7e22e99236cd615ce713e2d
grahamgilchrist/flightplan-git-deploy
git-deploy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Mongo } from 'meteor/mongo';\nimport moment from 'moment';\n\nconst Payments = new Mongo.Collection('payments');\n\nPayments.refund = (orderId) => {\n if (orderId) {\n const payment = Payments.findOne({ order_id: orderId })...
javascript
edit
0
4
mit
57c466b4ee66259f80be6cd5d1d858051f462118
hwillson/shopify-hosted-payments,hwillson/shopify-hosted-payments
imports/api/payments/collection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global describe, beforeEach, it*/\n'use strict';\n\nvar path = require('path');\nvar helpers = require('yeoman-generator').test;\n\n\ndescribe('plugin generator', function () {\n beforeEach(function (done) {\n helpers.tes...
javascript
edit
0
2
mit
72048194677c0ac8c0276c1066e816d31ed43cb5
assemble/generator-plugin
test/test-creation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack')\nmodule.exports = {\n context: __dirname,\n entry: [\n \"./index\",\n \"webpack-dev-server/client?http://localhost:8080\",\n \"webpack/hot/only-dev-server\",\n ],\n outpu...
javascript
edit
0
0
apache-2.0
6e81e98a48eeb01bf69e89c3192c48424f364f51
tailhook/khufu
examples/playground/webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst execSync = require('child_process').execSync;\n\n/**\n A semantic release \"publish\" plugin to create git tags and publish using elm-package\n */\nasync function tagElmRelease(config, context) {\n const newVersion = context.next...
javascript
edit
0
1
bsd-3-clause
6b50ec716db9b529220500a1ae3d5db2e80f1d83
cultureamp/elm-css-modules-loader,cultureamp/elm-css-modules-loader
ci/tagElmRelease.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst router = require('express').Router();\nconst temperatureapi = require('../api/temperature');\nconst requiresApiAuthorization = require('../auth/requiresApiAuthorization');\n\nrouter.get('/api/temperature/currentTe...
javascript
edit
0
0
apache-2.0
e212a38b3032b1ad19debbb5d7b3b183cc6b9670
rossharper/raspberrysauce,rossharper/raspberrysauce
webapp/routes/temperature_api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*:tabSize=2:indentSize=2:noTabs=true:mode=javascript:*/\n\nvar commander = require('commander'),\n path = require('path');\n\nvar version = JSON.parse(require('fs')\n .readFileSync(path.join(__dirname, '..', '..', 'package.json')...
javascript
edit
0
2
mit
1588f4b832ba791ce295c2367c92b7607817fa48
tjdett/atom-dataset-provider
lib/atom-dataset-provider/options.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n \"url\": process.env.CRN_SERVER_URL,\n \"port\": 8111,\n \"location\": process.env.CRN_SERVER_LOCATION,\n \"headers\": {\n \"Access-Control-Allow-Origin\": \"*\",\n \"Access-Control-Allow-Met...
javascript
edit
0
0
mit
5d4ee69a7d577d2906b08d228bd883afbb22caae
poldracklab/crn_server,poldracklab/crn_server
config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (err, data) {\n\n if (err) {\n return 'Debug output: %j' + JSON.stringify(data) + '\\n' + JSON.stringify(err);\n }\n\n if (!data.length) {\n return;\n }\n\n var returnString = '';\n ...
javascript
edit
0
4
apache-2.0
c1893a257a0685934607946f4c24758796eb74bf
requiresafe/cli,chetanddesai/nsp,nodesecurity/nsp,ABaldwinHunter/nsp-classic,ABaldwinHunter/nsp
lib/formatters/codeclimate.js
rejected_duplicate
Near-duplicate of sample 104243
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $('.star').click(function() {\n // Toggle a display of star\n $(this).toggleClass('favorited');\n var isFavorited = $(this).hasClass('favorited');\n\n // Get a page info\n var id = $(this...
javascript
edit
0
1
mit
70405b476543b96bbeeb3299ac83c3ffd9aa86be
ongaeshi/honyomi,ongaeshi/honyomi,ongaeshi/honyomi
lib/honyomi/web/public/js/honyomi.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n model: function(params) {\n return this.store.find('question', params.id);\n }\n});\n\n```\n\nApply this change: Reset controller state on didTransition" }, { ...
javascript
edit
0
1
mit
8a81c825a2687f988cd231f458fbc16d39e7c3fa
LaunchAcademy/rescue_mission,LaunchAcademy/rescue_mission,LaunchAcademy/rescue_mission
frontend/app/routes/questions/show.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ipc = require('electron').ipcMain;\nvar dialog = require('electron').dialog;\n\nmodule.exports.setup = function () {\n ipc.on('open-file-dialog', function (event) {\n var files = dialog.showOpenDialog({properties: ['openFile', '...
javascript
edit
0
2
mit
72f827e84ba5e696d0bacdb8b900018c7a51dc55
PanCheng111/XDF_Personal_Analysis,PanCheng111/XDF_Personal_Analysis,blep/electron-api-demos,electron/electron-api-demos,blep/electron-api-demos,electron/electron-api-demos,blep/electron-api-demos,blep/electron-api-demos,electron/electron-api-demos,PanCheng111/XDF_Personal_Analysis
main-process/native-ui/dialogs/open-file.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component} from 'react';\nimport { View, Text, ScrollView, Button } from 'react-native';\nimport axios from 'axios';\n\nimport colors from '../config/colors';\nimport { UserItem } from '../components/UserItem';\n\n\nclass...
javascript
edit
0
2
mit
a50bbdcd25e3618112f6515ca64fc2c6fa67f1c3
DaniGlass/OneStopShop,DaniGlass/OneStopShop,DaniGlass/OneStopShop,DaniGlass/OneStopShop,DaniGlass/OneStopShop
front_end/app/screens/ShoppingList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport { render } from \"react-dom\";\n\nimport { applyRouterMiddleware, Router, Route, browserHistory, IndexRoute } from \"react-router\";\nimport { useScroll } from 'react-router-scroll';\n\nimport App fr...
javascript
edit
0
1
mit
00b8cf436ea49f4939d1c0790ac19789f713153f
mxstbr/postcss.parts,mxstbr/postcss.parts
js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\n\nfunction omitUndefined(obj) {\n const result = {};\n _.forOwn(obj, function(value, key) {\n if (_.isPlainObject(value)) {\n result[key] = omitUndefined(value);\n }\n else if (!_.isUndefined(val...
javascript
edit
0
3
mit
7d49a20492e4a92afb07c194195856292b72a589
jagi/meteor-astronomy
lib/modules/storage/utils/omit_undefined.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Policy Mappings\n * (sails.config.policies)\n *\n * Policies are simple functions which run **before** your controllers.\n * You can apply one or more policies to a given controller, or protect\n * its actions individually.\n *\...
javascript
edit
0
0
mit
6c2e22850f428e208acda085417e54bc911b3ddb
ungdev/flux2-server,ungdev/flux2-server,ungdev/flux2-server
config/policies.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst rollupBabel = require('rollup-plugin-babel');\nconst rollupCommonjs = require('rollup-plugin-commonjs');\nconst rollupNodeResolve = require('rollup-plugin-node-resolve');\nconst rollupUglify = require('rollup-plugin-uglify');\ncon...
javascript
edit
0
0
mit
0f21e7aed83f547ced598a9d6c869b7814686eb5
skatejs/build,skatejs/build
init/rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Policies are simply Express middleware functions which run before your controllers.\n * You can apply one or more policies for a given controller or action.\n *\n * Any policy file (e.g. `authenticated.js`) can be dropped into t...
javascript
edit
0
0
mit
e3d2f266ed07b9a98f3a076d0684877e1d141970
maxfierke/WaterCooler
config/policies.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Add your blacklisted sites to this array. Subdomain and TLD are optional and flexible.\n// Should probably be kept in sync with https://github.com/premgane/agolo-twitterbot/blob/master/server.py\nvar BLACKLIST = [\n 'github',\n 'ag...
javascript
edit
0
1
mit
bee126e3d4db9860e095f35a3c60b7b94f05b024
premgane/agolo-slackbot
blacklisted-sites.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env serviceworker */\n\n// This makes a module available named \"reconstructive\"\nimportScripts('reconstructive.js')\n\n// Customize configs (defaults should work for IPWB out of the box)\n// reconstructive.init({\n// versi...
javascript
edit
0
1
mit
884455a7aa3cc8f8a6f1d6f9ca28faa597b4993f
oduwsdl/ipwb,oduwsdl/ipwb,oduwsdl/ipwb,oduwsdl/ipwb
ipwb/serviceWorker.js
rejected_duplicate
Near-duplicate of sample 87880
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Engine = require('./engine');\nvar herit = require('herit');\nvar path = require('path');\n\nmodule.exports = herit(Engine, {\n defaults: function () {\n return {\n paths: [],\n indentedSyntax: false\n...
javascript
edit
0
2
mit
2b5bd27f0323428e6814b202fefbfb774be97256
caseywebdev/cogs,caseywebdev/cogs
lib/engines/scss.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\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a functi...
javascript
edit
0
2
mit
3f55e7c83a838f2658191d475a00a453fe17157e
supreetpal/infinite-divs,supreetpal/infinite-divs
lib/infinitedivs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst chalk = require('chalk');\nconst helpers = require('../helpers');\n\nexports.about = function () {\n helpers.printMessage(chalk.green('Welcome to Space CLI'), '- a CLI for space information' + '\\n\\n' + 'Credits:' + '\\n' + 'htt...
javascript
edit
0
1
mit
368aef6a552b9b626b6e8e551f72d39f9a5ba144
Belar/space-cli
lib/modules/info.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar AWS = require('../core');\n\n/**\n * @constant\n * @readonly\n * Backwards compatibility for access to the {AWS.SWF} service class.\n */\nAWS.SimpleWorkflow = AWS.SWF;\n\n```\n\nApply this change: Hide SimpleWorkflow service class f...
javascript
edit
0
0
apache-2.0
2c082c238124844a8bae0c83eb890455452b7067
grimurjonsson/aws-sdk-js,jeskew/aws-sdk-js,mohamed-kamal/aws-sdk-js,mapbox/aws-sdk-js,Blufe/aws-sdk-js,jeskew/aws-sdk-js,chrisradek/aws-sdk-js,chrisradek/aws-sdk-js,beni55/aws-sdk-js,GlideMe/aws-sdk-js,ugie/aws-sdk-js,chrisradek/aws-sdk-js,guymguym/aws-sdk-js,chrisradek/aws-sdk-js,aws/aws-sdk-js,MitocGroup/aws-sdk-js,M...
lib/services/swf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { FormattedMessage, FormattedNumber } from 'react-intl';\nimport { Button, Popover, Position, Spinner } from '@blueprintjs/core';\n\nconst SearchFilterCountries = ({ loaded, countries, currentValue, on...
javascript
edit
0
3
mit
48d6b2ef33a9e8a27180d126db6cf37e6a685841
pudo/aleph,pudo/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph,alephdata/aleph,pudo/aleph
src/components/SearchFilterCountries.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n// Render the environment & partner menus\nrenderEnvironmentMenuItems();\nrenderPartnerMenuItems();\nrenderGaugeRowItems();\n\n// Events binding\nwindow.onhashchange = _handlerRefreshMenuAndPage;\n\n// Update the menu and render the c...
javascript
edit
0
2
mit
59fd6e6d26ddb98957dcdcdb415efddad1080be3
vejuhust/yet-another-monitoring-dashboard,vejuhust/yet-another-monitoring-dashboard
content/bootloader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nexports.up = (knex, Promise) => Promise.all([\n knex.schema.createTableIfNotExists('user', (table) => {\n table.integer('telegram_id')\n .primary();\n table.string('piikki_username')\n .unique();\n table.string('de...
javascript
edit
0
1
mit
3053a37c25fa000223642db9c0eb0dc8b0c265ae
majori/piikki-client-tg
migrations/20170401114125_initial.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst createTransform = require('./transform')\n\nlet entityId = 0\n\nfunction Entity (components, parent, tags) {\n this.id = entityId++\n this.tags = tags || []\n\n this.components = components ? components.slice(0) : []\n\n this....
javascript
edit
0
6
mit
fb4ae324c3bd986677aa8dfed4b64bf5bae5beb6
pex-gl/pex-renderer,pex-gl/pex-renderer
entity.js
rejected_duplicate
Near-duplicate of sample 91484
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n/**\n * Webpack frontend test configuration.\n */\nvar path = require(\"path\");\nvar prodCfg = require(\"./webpack.config\");\n\n// Replace with `__dirname` if using in project root.\nvar ROOT = process.cwd();\nvar _ =...
javascript
edit
0
0
mit
c08fa30117cf593cd91a1325b86a4199b0fd08f6
FormidableLabs/builder-radium-component,FormidableLabs/builder-radium-component
config/webpack/webpack.config.test.js
accepted
null
true