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": "Write javascript code for the following: Add social login provider settings." }, { "role": "assistant", "content": "module.exports = {\n \"facebook-login\": {\n \"provider\": \"facebook\",\n \"module\": \"passport-facebook\",\n \"clientID\": process.env.FA...
javascript
new_file
0
0
apache-2.0
1b42ae0f4147b517f80ff58e828b28d1538677d4
remp-team/remp-api
server/providers.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add utility for testing glob.js" }, { "role": "assistant", "content": "// Apply glob function to path specified on command line.\n\nvar glob = require('./glob');\n\nif (process.argv.length != 3) {\n console.log(\"Bad usage...
javascript
new_file
0
2
mit
febdc045d1476eabcfeddd4ff4f734f53d99cabc
sstur/nodeftpd,impaler/nodeftpd,phillipgreenii/nodeftpd,oleksiyk/nodeftpd
lib/glob_test.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add scripts to configuration of assign command" }, { "role": "assistant", "content": "// node modules\nimport fs from 'fs';\nimport readline from 'readline';\n// npm modules\nimport inquirer from 'inquirer';\n// our modules\n...
javascript
new_file
0
3
mit
2cab856f9bf53f618a1d5273651c2886eb0226b4
trolster/urcli,gabraganca/ur-cli,trolster/ur-cli
src/commands/assign/selectScripts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar nodePath = require('path');\nvar index = require('./index');\nvar files = require('./files');\nvar objects = require('./objects');\nvar refs = require('./refs');\nvar diff = require('./diff');\nvar util = re...
javascript
edit
0
4
mit
0910dfedce182dab057f095e3980873f382fc226
harrytruong/gitlet,maryrosecook/gitlet,pirafrank/gitlet,maryrosecook/gitlet,harrytruong/gitlet,pysnow530/gitlet,pirafrank/gitlet
src/checkout.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add hello world in some other languages." }, { "role": "assistant", "content": "function hello(language) {\n var hellos = {\n 'Chinese': '你好世界',\n 'Dutch': 'Hello wereld',\n 'English': 'Hello world',\n 'French': ...
javascript
new_file
0
1
mit
5a3202480e1e150c5c2194d57aff74133a5cc096
tjhorner/illacceptanything,illacceptanything/illacceptanything,oneminot/illacceptanything,TheWhiteLlama/illacceptanything,Depado/illacceptanything,Depado/illacceptanything,tjhorner/illacceptanything,1yvT0s/illacceptanything,gaapt/illacceptanything,ultranaut/illacceptanything,oneminot/illacceptanything,1yvT0s/illaccepta...
international.js
rejected_duplicate
Near-duplicate of sample 71618
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {PropTypes} from 'react'\nimport {connect} from 'react-redux'\nimport {bindActionCreators} from 'redux'\n\nimport SideNav from 'src/side_nav'\nimport Notifications from 'shared/components/Notifications'\n\nimport {publishN...
javascript
edit
0
2
mit
032d4efde878f8219df5c4f3b2f16179413e03fb
mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,influxdata/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,nooproblem/influxdb,nooproblem/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdata/influxdb,influxdb/influxdb,li-ang/inf...
ui/src/App.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: USE EXAMPLE TO TEST THE MODULE" }, { "role": "assistant", "content": "/**\n * Created by Ricardo on 3/7/15.\n */\nvar Foscam = require('./index');\n\nvar foscam = new Foscam({\n host: '92.53.192.141',\n port: 80,\n u...
javascript
new_file
0
0
mit
29060f1c2feaceb32894fe110b7406ae771b4858
richnologies/foscam
use.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\n/* eslint-disable no-console */\n\nimport fs from 'fs';\nimport path from 'path';\n\nimport dotenv from 'dotenv';\nimport {getSourcesWithArticles} from './newsapi';\n\ndotenv.config();\n\nconst {MOCK_HEADLINES, NE...
javascript
edit
0
1
mit
1ab8d671b679afcb19a4e7e3576dce2ebc022a70
dguo/dailylore,dguo/dailylore,dguo/dailylore,dguo/dailylore
src/get-headlines.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add tests for language switcher." }, { "role": "assistant", "content": "describe('language switcher', function() {\n\n it('opens a submenu which lets users to choose between german and english', function() {\n\n bro...
javascript
new_file
0
1
apache-2.0
c44bd1619db437d107e3d05f379689706edd4d57
codarchlab/arachnefrontend,dainst/arachnefrontend,dainst/arachnefrontend,codarchlab/arachnefrontend
test/e2e/language-switcher.spec.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Test cases for pattern routing helper." }, { "role": "assistant", "content": "var chai = require('chai')\n , patternHelper = require('../../../lib/helpers/route/pattern');\n \n\ndescribe('helpers/route/pattern', function() ...
javascript
new_file
0
2
mit
74e8279a8d2f0506ed17b0d1a678b63eb02266a3
1024bit/locomotive,mkontula/maglev,noahlange/railsea,drudge/locomotive,easing/locomotive,emvc/emvc,viadeo/maglev,buildcom/locomotive,jaredhanson/locomotive
test/helpers/route/pattern.test.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add simple test for message component" }, { "role": "assistant", "content": "const React = require('react/addons');\nconst TestUtils = React.addons.TestUtils;\n\njest.dontMock('../view.jsx');\n\nconst Message = require('../vi...
javascript
new_file
0
1
mit
7b64d0ab802082c848dcfb998ab9ceae2fe6c4d1
sirodoht/ting,mbalamat/ting,gtklocker/ting,sirodoht/ting,sirodoht/ting,gtklocker/ting,odyvarv/ting-1,VitSalis/ting,odyvarv/ting-1,VitSalis/ting,dionyziz/ting,VitSalis/ting,dionyziz/ting,VitSalis/ting,sirodoht/ting,mbalamat/ting,dionyziz/ting,dionyziz/ting,mbalamat/ting,mbalamat/ting,odyvarv/ting-1,gtklocker/ting,odyvar...
client/message/__tests__/view-test.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add Table of Contents generator" }, { "role": "assistant", "content": "/* global debounce, bodau, gotoTop */\n(function($) {\n 'use strict';\n\n function createDiv(className) {\n return $('<div>', {\n ...
javascript
new_file
0
4
mit
ad065293dc6bb8c6415882890794ca5d030b20bd
baivong/bubcloud
src/assets/scripts/topic/toc.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add style utils for media queries and truncation" }, { "role": "assistant", "content": "import { css } from 'styled-components';\n\nexport const sizes = {\n giant: 1170,\n desktop: 992,\n tablet: 768,\n phone: 448,\n};\n\...
javascript
new_file
0
1
mit
0a47827a4393290996ed56a189ce8b3f499395c7
jordandrako/jordanjanzen.com,jordandrako/jordanjanzen.com,jordandrako/jordanjanzen.com,jordandrako/jordanjanzen.com
src/theme/style-utils.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add exports to entry file" }, { "role": "assistant", "content": "import * as actionCreators from './actionCreators'\nimport * as actionTypes from './actionTypes'\nimport * as utils from './utils'\nimport middleware from './mi...
javascript
new_file
0
0
mit
954df610468b17fcc34ad0601a190d6be7a37c6d
fredrikolovsson/redux-module-local-storage
src/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Use CoreModel instead of cdb.core.Model" }, { "role": "assistant", "content": "var $ = require('jquery');\nvar _ = require('underscore');\nvar Backbone = require('backbone');\n\n/**\n * Base Model for all CartoDB model.\n * D...
javascript
new_file
0
3
bsd-3-clause
1683e56db2062a7cf6f0815048b91653195be5de
CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,splashblot/dronedb,splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb
lib/assets/node_modules/backbone/core-model.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add RelayRootContainer for using non-global Relay environments" }, { "role": "assistant", "content": "import React from 'react';\nimport Relay from 'react-relay';\n\n/**\n * This is a copy of `RelayRootContainer` from the Rel...
javascript
new_file
0
6
mit
2429541f344950bde156c0ef849e35b3bd97092e
atom/github,atom/github,atom/github
lib/containers/relay-root-container.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Create wrapper for The Blue Alliance's API" }, { "role": "assistant", "content": "(function($) {\n\tvar API_V2_URI = \"http://www.thebluealliance.com/api/v2/\",\n\t\ttba = {};\n\n\tvar tbaAjax = function(url, callback) {\n\t\...
javascript
new_file
0
1
mit
dd8feba17c070cd99729d86d00ca1b6a2bd2248a
mc10/first-look
js/the-blue-alliance.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Move the standard launcher icon from `mipmap` to `drawable`\n\nThe most recent android versions store their icon under\n`mipmap...\" (e.g. mipmap-hdpi, mipmap-xhdpi, mipmap-xxxhdpi)\nhttps://android-developers.googleblog.com/2014/10/gett...
javascript
new_file
0
2
bsd-3-clause
eb87b5c6ab51d7fa662136dfd3de9c2fcec2ea46
e-mission/e-mission-phone,shankari/e-mission-phone,shankari/e-mission-phone,shankari/e-mission-phone,e-mission/e-mission-phone,shankari/e-mission-phone,e-mission/e-mission-phone,e-mission/e-mission-phone
hooks/after_prepare/015_copy_icon_to_drawable.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add JS variables and objects" }, { "role": "assistant", "content": " // JavaScript Variables and Objects\n\n// I paired [by myself, with:] on this challenge.\n\n// __________________________________________\n// Write your cod...
javascript
new_file
0
2
mit
a9e3a386c922d55de16f27cd742b5398677d6101
ray-curran/phase-0,ray-curran/phase-0,ray-curran/phase-0
variables-objects.js
rejected_duplicate
Near-duplicate of sample 105770
true
[ { "role": "user", "content": "Write javascript code for the following: Add integration tests for sidebar width" }, { "role": "assistant", "content": "describe('Sidebar', function () {\n\n beforeEach(function () {\n cy.configureCluster({\n mesos: '1-task-healthy',\n componentHealth:...
javascript
new_file
0
1
apache-2.0
cd9a4e7efb55c8742b496bc6beb78765d280c54d
dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui,dcos/dcos-ui
tests/components/Sidebar-cy.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add basic tests for all routes, check status codes" }, { "role": "assistant", "content": "\"use strict\";\n\nvar assert = require('assert');\nvar request = require('request');\n\nvar server = require('./server');\n\ndescribe(...
javascript
new_file
0
1
cc0-1.0
68a7cb66089e7e03a9be163ce588aa75f9a7e191
konklone/oversight.io,konklone/oversight.io,konklone/oversight.io,konklone/oversight.io
test/status_codes.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add inital test for service blueprint" }, { "role": "assistant", "content": "'use strict';\n\nvar blueprintHelpers = require('ember-cli-blueprint-test-helpers/helpers');\nvar setupTestHooks = blueprintHelpers.setupTestHooks;\...
javascript
new_file
0
1
mit
b3aded016e178167628f0827a568a56bff06fb3d
kimroen/ember-cli-coffeescript,kimroen/ember-cli-coffeescript,kimroen/ember-cli-coffeescript
node-tests/blueprints/service-test.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Create common single row list item component" }, { "role": "assistant", "content": "import React, { Component } from 'react';\nimport { Text } from 'react-native';\nimport { CardItem, Left, Right, Icon } from 'native-base';\n...
javascript
new_file
0
2
mit
f3e661870e831cd3016d11749481cf37b77f15bc
justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client
js/components/common/single-row-list-item/singleRowListItem.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add repolinks in as a global component to use on homepage as well as when a route isnt hit" }, { "role": "assistant", "content": "import React from 'react'\nimport { Link } from 'react-router'\nimport { REPOS } from '../confi...
javascript
new_file
0
1
mit
46b5f29d2fcfa706ac288298bf25d1db28785b12
aburd/issues-tracker,aburd/issues-tracker
src/components/RepoLinks.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add tests for GET /lambdas/:organizationName" }, { "role": "assistant", "content": "import {all, map} from \"bluebird\";\nimport {expect} from \"chai\";\nimport express from \"express\";\nimport request from \"supertest-as-pr...
javascript
new_file
0
1
mit
2301aadf02a5573bafb76a7b63ef19a7926f5e9c
lk-architecture/lh-api
test/api/lambdas/:organizationName/get.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add insert or update feature test" }, { "role": "assistant", "content": "import { createStore, createState } from 'test/support/Helpers'\nimport Model from 'app/model/Model'\n\ndescribe('Features – Persist – Insert Or Update'...
javascript
new_file
0
1
mit
607f3dfaf814022d79458d3fcf6cbef45df2cbbc
revolver-app/vuex-orm,revolver-app/vuex-orm
test/feature/persist/InsertOrUpdate.spec.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add collection api class with create method" }, { "role": "assistant", "content": "import http from '../http';\n\nexport default class collections {\n\n static create(body) {\n return http.post(`/zebedee/collection`...
javascript
new_file
0
1
mit
6e1b97da4fa84a0c81c8adceb56cf8bafadf7c10
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
src/app/utilities/api-clients/collections.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Rename query function to specify input fbId not fbProfile" }, { "role": "assistant", "content": "const db = require('../db.js');\n\nmodule.exports = (facebookId) => {\n const query = `SELECT * FROM users WHERE facebook_id = ...
javascript
new_file
0
1
mit
bbd96ab09308b1d05636edd1dcd674abfbf2b4d0
VictoriousResistance/iDioma,VictoriousResistance/iDioma
server/db/controllers/getSelfBasicInfoGivenFBId.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Exports object that contains names of options as a key and their configuration objects as a value\n *\n * @example\n * export default {\n * optionName: {\n * desc: 'Description for the option',\n * alias: 'Short name f...
javascript
edit
0
0
mit
6ff0dfe41e2303a991a93f67fb98fdfc8e476529
ghaiklor/generator-sails-rest-api,italoag/generator-sails-rest-api,IncoCode/generator-sails-rest-api,jaumard/generator-trails,tnunes/generator-trails,italoag/generator-sails-rest-api,konstantinzolotarev/generator-trails,ghaiklor/generator-sails-rest-api
src/blueprints/options/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport deepEqual from 'deep-equal';\nimport ActionLoggerComponent from '../../components/ActionLogger/';\nimport { EVENT_ID } from '../../';\n\nexport default class ActionLogger extends React.Component {\n c...
javascript
edit
0
4
mit
8b9e7302ea5ab24c718d788d5d5ae13c2871c8ff
rhalff/storybook,storybooks/storybook,kadirahq/react-storybook,enjoylife/storybook,rhalff/storybook,nfl/react-storybook,enjoylife/storybook,jribeiro/storybook,storybooks/react-storybook,storybooks/storybook,nfl/react-storybook,rhalff/storybook,kadirahq/react-storybook,jribeiro/storybook,storybooks/storybook,storybooks/...
addons/actions/src/containers/ActionLogger/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Convert stopword filter test to mocha/chai." }, { "role": "assistant", "content": "suite('lunr.stopWordFilter', function () {\n test('filters stop words', function () {\n var stopWords = ['the', 'and', 'but', 'than', 'whe...
javascript
new_file
0
1
mit
fb65038c97a8ded28d34f7ea2bc32387395293d7
olivernn/lunr.js,olivernn/lunr.js,olivernn/lunr.js
test/mocha/stop_word_filter_test.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add script to generate a package order hash" }, { "role": "assistant", "content": "#!/usr/bin/env node\n\n/**\n* @license Apache-2.0\n*\n* Copyright (c) 2021 The Stdlib Authors.\n*\n* Licensed under the Apache License, Versio...
javascript
new_file
0
2
apache-2.0
13023ccb5275e50a6553bf60d8da51f5b745ca4f
stdlib-js/www,stdlib-js/www,stdlib-js/www
tools/scripts/api-docs/pkg_order.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add adapter for Jasmine 2.x" }, { "role": "assistant", "content": "(function() {\n\n if (! jasmine) {\n throw new Exception(\"jasmine library does not exist in global namespace!\");\n }\n\n function elapsed(st...
javascript
new_file
0
2
mit
cb3d5a46e23f1946334007f29bc31a2c65d211ae
ssnau/blanket,reggi/blanket,agray/blanket,listepo/blanket,kidaa/blanket,listepo/blanket,kidaa/blanket,Jeff-Lewis/blanket,jlturner/blanket,ssnau/blanket,ahamid/blanket,Jeff-Lewis/blanket,Jbarget/blanket,Jbarget/blanket,agray/blanket,ahamid/blanket,reggi/blanket,agray/blanket,jlturner/blanket
src/adapters/jasmine-2.x-blanket.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\n/* @flow */\n\nimport {CompositeDisposable} from 'atom'\nimport type {Disposable, TextEditor, TextBuffer, TextEditorGutter} from 'atom'\n\nexport class Editor {\n gutter: ?TextEditorGutter;\n textEditor: TextEditor;\n ...
javascript
edit
null
null
mit
eb9d6eccaac33ec59d0a2fc92e96af5f7eb3956f
AtomLinter/linter-ui-default,steelbrain/linter-ui-default,steelbrain/linter-ui-default
lib/editor.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Write javascript code for the following: [WEB-819] Move common prescription form styles to own file" }, { "role": "assistant", "content": "import { default as baseTheme } from '../../themes/baseTheme';\n\nexport const formWrapperStyles = {\n width: [1, 0.75, 0.5, 0...
javascript
new_file
0
0
bsd-2-clause
644fcd3cf81db274a4464c0e0a9220a553977d1b
tidepool-org/blip,tidepool-org/blip,tidepool-org/blip
app/pages/prescription/prescriptionFormStyles.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: [server] Create script to add LEAVE_THREAD permission\n\nTest Plan:\nTested on a single row to check if results are matching expectacions.\nInspected `membership` table to check if `leave_thread` permission is added. Inspected `roles` ta...
javascript
new_file
0
2
bsd-3-clause
b240a49434236c708eacf9be7a60a99052ed2bb0
Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal
server/src/scripts/add-leave-thread-permissions.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add test confirming all locales have all keys.\n\nSomething that has bit our team a few times: we add a new key to the\ndefault locale file, but forget to add it to the others.\n\nThis adds an test that runs in the consuming app, that co...
javascript
new_file
0
4
mit
9a469783f03ec07166e4dd9715d13a763d9af37e
ember-furnace/ember-cli-furnace-i18n,DavyJonesLocker/ember-cli-i18n,ember-furnace/ember-cli-furnace-i18n,dockyard/ember-cli-i18n,dockyard/ember-cli-i18n,DavyJonesLocker/ember-cli-i18n
test-support/ember-cli-i18n-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar process = require('process');\nvar fs = require('fs');\n\nmodule.exports = {\n context: path.join(process.env.PWD, 'frontend'),\n entry: \"./index.js\",\n target: 'node',\n output: {\n path: path....
javascript
edit
0
0
mit
61f1331004e1604e3856e89504e4e469cbd4904a
mgi166/usi-front,mgi166/usi-front
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: tests: Add unit tests for NotFoundInCacheError" }, { "role": "assistant", "content": "'use strict';\n\n/**\n * @ignore\n * @suppress {dupicate}\n */\nvar NotFoundInCacheError = /** @type {function(new:NotFoundInCacheError, st...
javascript
new_file
0
1
mit
36c06d58bd84e4909fe11f2da7ca20b9968a1aa9
lgeorgieff/nbuild,lgeorgieff/ccbuild
test/unit_test/compiler/notfoundindcacheerror.spec.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Refactor HTTP API into repository structure" }, { "role": "assistant", "content": "require('isomorphic-fetch');\nrequire('es6-promise').polyfill();\n\nvar fetch = window.fetch;\nvar _ = require('underscore');\nvar CONTENT_TYP...
javascript
new_file
0
7
mit
83832098b8db0e17cec5cf5fc555ecfa3f5cbc81
martyjs/marty,martyjs/marty-lib,kwangkim/marty,oliverwoodings/marty,goldensunliu/marty-lib,oliverwoodings/marty,thredup/marty-lib,martyjs/marty,bigardone/marty,Driftt/marty,KeKs0r/marty-lib,kwangkim/marty,CumpsD/marty-lib,thredup/marty,thredup/marty,bigardone/marty,kwangkim/marty,Driftt/marty,bigardone/marty,gmccrackin...
lib/repositories/httpAPI.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: fix: Add unit tests for refraction" }, { "role": "assistant", "content": "var expect = require('./spec-helper').expect;\nvar minim = require('../lib/minim');\nvar refract = require('../lib/refraction').refract;\n\ndescribe('r...
javascript
new_file
0
1
mit
19d06d29b6f909334f0ef8860f3f8e96b37d7917
refractproject/minim
test/refraction-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path')\nconst webpack = require('webpack')\nconst ENV = process.env.NODE_ENV || 'development'\nconst appendIf = (cond, ...items) => cond ? items : []\n\nconst plugins = [\n new webpack.DefinePlugin({\n 'process...
javascript
edit
0
2
mit
1a2b1508b4ab94f5e550550ebe9748288bf43f89
dan-lee/react-minimal-starter-kit,dan-lee/react-minimal-starter-kit
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\nclass SearchBar extends Component {\n\trender() {\n\t\treturn <input onChange={this.onInputChange} />;\n\t}\n\n\tonInputChange(event) {\n\t\tconsole.log(event.target.value);\n\t}\n}\n\nexport...
javascript
edit
0
1
mit
04de99947d1ace467850b9ce26999042e199f8c8
JosephLeon/redux-simple-starter-tutorial,JosephLeon/redux-simple-starter-tutorial
src/components/search_bar.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(config) {\n config.set({\n frameworks: ['jquery-3.2.1', 'jasmine-jquery', 'jasmine'],\n browsers: ['ChromeHeadless'],\n files: [\n 'spec/helpers/tampermonkeyStubs.js',\n 'public/fateOfAllFoo...
javascript
edit
0
1
mit
f57b1660ee8fb3196bcc61ef059c51b56bb73aa0
rslifka/fate_of_all_fools,rslifka/fate_of_all_fools
karma.conf.js
rejected_duplicate
Near-duplicate of sample 71798
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport {\n BrowserRouter as Router,\n Route,\n Switch\n} from 'react-router-dom';\n\nimport ContentContainer from './patterns/containers/Content';\nimport ExperimentsHome from './experiments...
javascript
edit
0
1
mit
f9e17fda75a2c1e2d3f74d9f93b1f40d1fb4c6e6
drainpip/shaneis.me,drainpip/shaneis.me
src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function configureKarma (config) {\n const { projectPath, watch, webpackConfig, karmaConfig: userKarmaConfig } = config\n\n const defaultKarmaConfig = {\n basePath: projectPath,\n\n frameworks: ['jasmine', 'phanto...
javascript
edit
0
1
mit
3610be5301f01c0110d704a6c681c0b6c42d3ce8
saguijs/sagui,saguijs/sagui
src/configure/karma/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport execute from './core';\nimport adminApi from './adminApi';\nimport colors from 'colors';\nimport configLoader from './configLoader';\nimport program from 'commander';\n\nprogram\n .version(require(\"../package.json\").version)...
javascript
edit
0
1
mit
4699d58fb0fa8a93db109a9ba3da550c5daac0e3
JnMik/kongfig,mybuilder/kongfig,JnMik/kongfig
src/cli-apply.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar java = require(\"../testHelpers\").java;\n\nvar nodeunit = require(\"nodeunit\");\nvar util = require(\"util\");\n\nexports['Java8'] = nodeunit.testCase({\n \"call methods of a class that uses lambda expressions\": function(test) {...
javascript
edit
0
3
mit
2d60bf6de2b5f455e5688e0dbfd48239d7342226
lantanagroup/node-java,lantanagroup/node-java,sebgod/node-java,sebgod/node-java,RedSeal-co/node-java,joeferner/node-java,joeferner/node-java,lantanagroup/node-java,RedSeal-co/node-java,RedSeal-co/node-java,RedSeal-co/node-java,sebgod/node-java,joeferner/node-java,sebgod/node-java,RedSeal-co/node-java,sebgod/node-java,l...
test8/testLambda.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Rect = require('./rect');\n\nexports.get = function() {\n var selection = window.getSelection();\n if (!selection.rangeCount) {\n return;\n } else if (selection.isCollapsed) {\n var range = selection.getRangeAt(0);\n var...
javascript
edit
0
6
mit
718b82fb3e43b2dc1f40effa365cad90a40f8476
jacwright/typewriter,jacwright/typewriter
src/editor/selection-rect.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n\n restaurantReviews: {\n filter: '',\n searchType: 'name',\n restaurants: [],\n pagerNum: 1,\n loading: true,\n loadingError: null,\n activeItem: null,\n initialLoad: true,\n ratingFilter: ...
javascript
edit
0
0
mit
1f11d411a5b6c915e7b35dae4d847a3ccb98e830
aragonwa/kc-restaurant-reviews,aragonwa/kc-restaurant-reviews
src/reducers/initialState.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\nCopyright 2016 OpenMarket Ltd\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.o...
javascript
edit
0
3
apache-2.0
33251e65666c4619c8551c515d85ca28d161a112
matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk
src/SdkConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * API endpoints for backend\n */\n\nconst api = require('express').Router();\n\napi.use((req, res, next) => {\n // redirect requests like ?t=foo/bar to foo/bar\n if (req.query.t) {\n return res.redirect(req.query.t);\n }\n\n...
javascript
edit
0
2
mit
280934c9c513cba3be83fb7478a0d2c349281d26
felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget
srv/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['jquery', 'app', 'services/User'], function ($, app) {\n var services = [\n { name: 'Facebook' },\n { name: 'Github' },\n { name: 'Google' }\n ];\n\n return app.controller('SignInController', ['$scope', '$window', 'u...
javascript
edit
0
2
mit
ee776c085d9c4f064f87a1e5a093a7482ded4b57
BrettBukowski/tomatar
public/js/controllers/SignIn.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * PhantomJS-based web performance metrics collector\n *\n * Usage:\n * node phantomas.js\n * --url=<page to check>\n * --debug\n * --verbose\n *\n * @version 0.2\n */\n\n// parse script arguments\nvar params = require('....
javascript
edit
0
0
bsd-2-clause
6f66d99cb9bf120919991600dd96cbe066dcbe5f
ingoclaro/phantomas,william-p/phantomas,william-p/phantomas,gmetais/phantomas,ingoclaro/phantomas,gmetais/phantomas,macbre/phantomas,macbre/phantomas,macbre/phantomas,ingoclaro/phantomas,william-p/phantomas,gmetais/phantomas
phantomas.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport config from 'config/environment';\nimport troopImage from 'images/Troop.png';\nimport styles from './idme.css';\n\nclass Idme extends Component {\n onKeyUp = (event) => {\n if (event...
javascript
edit
0
1
mit
e3e3cb7b768a6d0f2e4e64cd265f088d1713c90b
NestorSegura/operationcode_frontend,sethbergman/operationcode_frontend,hollomancer/operationcode_frontend,NestorSegura/operationcode_frontend,OperationCode/operationcode_frontend,sethbergman/operationcode_frontend,OperationCode/operationcode_frontend,hollomancer/operationcode_frontend,sethbergman/operationcode_frontend...
src/shared/components/idme/idme.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs'),\n sourceMap = require('source-map');\n\nmodule.exports.create = function() {\n var cache = {};\n\n function loadSourceMap(file) {\n try {\n var body = fs.readFileSync(file + '.map');\n return ne...
javascript
edit
0
5
mit
49f7f0e3a2c4f00d38c5ad807c38f94a447e1376
walmartlabs/fruit-loops,walmartlabs/fruit-loops
lib/exec/source-map.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Creates an utility to manage sprites.\n *\n * @param Image The image data of the sprite\n */\nvar Sprite = function(img) {\n this.img = img;\n this.descriptors = [];\n};\n\nSprite.prototype = {\n registerId: function(id...
javascript
edit
0
2
mit
c454f86695e6360e31d7539967979185e4732655
bendem/JsGameLib
src/Sprite.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar createClass = require('../utilities/createClass');\nvar Lang = require('../utilities/lang');\n\nvar ArrayList = createClass({\n instance: {\n constructor: function() {\n debugger;\n },\n _backing: [],\n add: functi...
javascript
edit
0
3
apache-2.0
8eb18fbf907a7612c3928eeb598edf7830b8094b
twosigma/goll-e,RobertWarrenGilmore/goll-e,RobertWarrenGilmore/goll-e,twosigma/goll-e
lib/model/arrayList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nsteal('can/util/mvc.js')\n.then('funcunit/qunit', \n\t 'can/test/fixture.js')\n.then(function() {\n\t// Set the test timeout to five minutes\n\tQUnit.config.testTimeout = 300000;\n})\n.then('./mvc_test.js',\n\t 'can/construct/construc...
javascript
edit
0
5
mit
eee77a358416f7650933495d2a246eaa38091e6d
janza/canjs,schmod/canjs,juristr/canjs,bitovi/canjs,rasjani/canjs,rasjani/canjs,rjgotten/canjs,dispatchrabbi/canjs,beno/canjs,rjgotten/canjs,dimaf/canjs,whitecolor/canjs,whitecolor/canjs,shiftplanning/canjs,rasjani/canjs,Psykoral/canjs,shiftplanning/canjs,cohuman/canjs,SpredfastLegacy/canjs,ackl/canjs,UXsree/canjs,patr...
test/can_test.js
rejected_duplicate
Near-duplicate of sample 82945
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst {Initializer, api} = require('actionhero');\nconst apikeyCache = require('../lib/apikey-cache');\n\nmodule.exports = class APIKeyInitializer extends Initializer {\n constructor() {\n super();\n this.name = 'apikey...
javascript
edit
0
4
mit
19de825c36cb0b53fbfb92500507b9eb13d63f68
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
backend/servers/mcapid/initializers/apikey.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction handleFileSelect(evt) {\n evt.stopPropagation();\n evt.preventDefault();\n $('#drop_zone').remove();\n\n\n var canvas = document.getElementById('canvas');\n var ctx = canvas.getContext('2d');\n var img = new Image;\n img...
javascript
edit
0
3
mit
8fd27f37f55e3c8105fc15698d10575839cbe213
richo/catson.me,richo/catson.me
catson/static/catson.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport fetch from 'isomorphic-fetch';\nimport _ from 'lodash';\nimport { push } from 'react-router-redux';\n\nasync function request(url, userOptions, dispatch) {\n const defaultOptions = {\n credentials: 'same-origin',\n headers...
javascript
edit
0
8
apache-2.0
d9b11cd20e08cd9b71052c9141f3f9f9bcca57fb
ctcusc/django-react-boilerplate,ctcusc/django-react-boilerplate,ctcusc/django-react-boilerplate,ctcusc/django-react-boilerplate
client/utils/fetcher.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport RS from 'ramdasauce'\nconst COMMAND = 'redux.dispatch.prompt'\n\n/**\nPrompts for a path to grab some redux keys from.\n */\nconst process = (context, action) => {\n context.prompt('Action to dispatch', (value) => {\n let act...
javascript
edit
0
3
mit
ac6962630953b3387f95422049b0b1c01b981966
infinitered/reactotron,reactotron/reactotron,rmevans9/reactotron,reactotron/reactotron,rmevans9/reactotron,infinitered/reactotron,reactotron/reactotron,rmevans9/reactotron,rmevans9/reactotron,infinitered/reactotron,reactotron/reactotron,infinitered/reactotron,reactotron/reactotron,rmevans9/reactotron
server/commands/redux/reduxDispatchPrompt.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require('http');\nvar handler = require('./handler.js');\nvar dictionaryFile = require('./readDictionary.js');\n\nvar server = http.createServer(handler);\n\nfunction startServer() {\n dictionaryFile.readDictionary(null,null...
javascript
edit
0
1
mit
83ba65a17c8af9782681cb99a1fa1fdcd99c296c
NodeGroup2/autocomplete-project,NodeGroup2/autocomplete-project
src/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(c) {\n\n /*\n * !!! CHANGE THIS !!!\n */\n c[\"general\"].rootUrl = '//localhost/resto2/';\n \n /*\n * !! DO NOT EDIT UNDER THIS LINE !!\n */\n c[\"general\"].serverRootUrl = null;\n c[\"gener...
javascript
edit
0
1
apache-2.0
47da0f80a936649d64c53c522e30ea2386276455
atospeps/resto,Baresse/resto2,RailwayMan/resto,RailwayMan/resto,Baresse/resto2,atospeps/resto,jjrom/resto,jjrom/resto
themes/default/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path'),\n config;\n\nconfig = {\n production: {\n url: process.env.BASE_URL || 'http://blog.ertrzyiks.pl/',\n\n mail: {},\n\n database: {\n client: 'postgres',\n conne...
javascript
edit
0
0
mit
ed307dc8e1e7c83433d1589fc977e724efbcda77
ertrzyiks/blog.ertrzyiks.pl,ertrzyiks/blog.ertrzyiks.pl,ertrzyiks/blog.ertrzyiks.pl
config.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 v...
javascript
edit
0
0
mit
ae0cdf06604abb68774e8e36f873df3b65de0cf3
user890104/fauna,user890104/fauna,user890104/fauna,initLab/fauna,initLab/fauna,initLab/fauna
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 70934
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst assert = require('assert');\nconst url = require('url');\n\n\n/**\n * @param engine {string}\n * @param id {string}\n * @returns {string}\n */\nfunction getPlatformStatusId(engine, id) {\n return engine + '-' + e...
javascript
edit
0
1
mit
8ba6b443ea4d5a3ad49ae6121130dc987d9a375e
takenspc/ps-viewer,takenspc/ps-viewer
utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nchrome.webNavigation.onHistoryStateUpdated.addListener(function({url}) {\n // Code should only be injected if on a restaurant's page\n if (url.includes('restaurant')) {\n const scriptsToInject = [\n 'lib/tf.min.j...
javascript
edit
0
2
apache-2.0
b607a3c6157948aab36b056c02d0d126450f56a8
googleinterns/amaranth,googleinterns/amaranth
amaranth-chrome-ext/src/background.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 v...
javascript
edit
0
1
mit
fc6040a58f26f1a0b54700fc90ddd633f1326ff5
fma2/nyc-high-school-programs,fma2/nyc-high-school-programs
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 67416
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as Sequelize from 'sequelize';\nimport { v4 as uuidv4 } from 'uuid';\n\nconst borrowRequestSchema = (sequelize) => {\n const BorrowRequests = sequelize.define('BorrowRequests', {\n id: {\n type: Sequelize.UUID,\n ...
javascript
edit
0
1
mit
1dab7f5cd24b0995a28ab4bab3884e313dbda0cb
amarachukwu-agbo/hello-books,amarachukwu-agbo/hello-books
server/models/borrowrequests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst cli = require('commander');\nconst path = require('path');\nconst glob = require('glob');\n\nconst options = {\n realpath: true,\n cwd: path.resolve(__dirname, './lib'),\n};\n\nglob\n .sync('*/index.js', ...
javascript
edit
0
1
mit
7b090d0d9144546c583702d04b41b74f6f408861
ArturAralin/express-object-router
cli/index.js
rejected_duplicate
Near-duplicate of sample 83641
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\naddStealExtension(function (loader) {\n loader._contextualModules = {};\n\n loader.setContextual = function(moduleName, definer){\n this._contextualModules[moduleName] = definer;\n };\n\n var normalize = loader.normalize;\n load...
javascript
edit
0
6
mit
d613bc2e1c500df22978b9ca8f70058f00ac3d4b
stealjs/steal,stealjs/steal
src/system-extension-contextual.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// 404 page using mapbox to show cities around the world.\n\n// Helper to generate the kind of coordinate pairs I'm using to store cities\nfunction bounds() {\n var center = map.getCenter();\n return {lat: center.lat, lng: center.lng,...
javascript
edit
0
2
mit
c4e09637aa700ad08cea7948b6156acaaaf17157
controversial/controversial.io,controversial/controversial.io,controversial/controversial.io
404/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {GuideTitleStyle} from './constants';\nimport guideMark from './guide-mark';\nimport {lookup} from './guide-util';\nimport {TextMark} from '../marks/marktypes';\nimport {LegendTitleRole} from '../marks/roles';\nimport {addEncode,...
javascript
edit
0
1
bsd-3-clause
47d86fff8bc283772af80dc241169ee32972085b
vega/vega-parser
src/parsers/guides/legend-title.js
rejected_duplicate
Near-duplicate of sample 70273
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport 'es5-shim';\n\nbeforeEach(() => {\n sinon.stub(console, 'error');\n});\n\nafterEach(() => {\n if (typeof console.error.restore === 'function') {\n assert(!console.error.called, () => {\n return `${console.error.getCall(...
javascript
edit
0
2
mit
b2c5d65ef0ad3d86f76616805eff5f548a1168a4
react-bootstrap/react-bootstrap,apkiernan/react-bootstrap,dozoisch/react-bootstrap,react-bootstrap/react-bootstrap,egauci/react-bootstrap,jesenko/react-bootstrap,mmarcant/react-bootstrap,Lucifier129/react-bootstrap,Sipree/react-bootstrap,Lucifier129/react-bootstrap,glenjamin/react-bootstrap,HPate-Riptide/react-bootstra...
test/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar quickconnect = require('../');\nvar opts = {\n ns: 'dctest',\n iceServers: [\n { url: 'stun:stun.l.google.com:19302' }\n ]\n};\n\nquickconnect('http://rtc.io/switchboard/', opts)\n // tell quickconnect we want a datachannel c...
javascript
edit
0
1
apache-2.0
2c604630deb0c5f5a4befd08735c7795ad2480b3
rtc-io/rtc-quickconnect,rtc-io/rtc-quickconnect
examples/ice-configuration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n(function(){\n 'use strict';\n\n angular\n .module('everycent.common')\n .directive('ecAsDate', ecAsDate);\n\n ecAsDate.$inject = [];\n function ecAsDate(){\n var directive = {\n restrict:'A',\n require:'ngModel...
javascript
edit
0
1
mit
d1078188378529d084c059b06fe2e1157adc034c
snorkpete/everycent,snorkpete/everycent,snorkpete/everycent,snorkpete/everycent,snorkpete/everycent
webclient/app/common/ec-as-date.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar example = require(\"washington\")\nvar assert = require(\"assert\")\nvar color = require(\"cli-color\")\n\nexample.use({\n success: function (success, report) {\n process.stdout.write(color.green(\".\"))\n },\n\n pending: f...
javascript
edit
0
1
bsd-2-clause
fe48398d485afe58415688a50479c6fe0ace33c0
xaviervia/washington,xaviervia/washington
examples/minimal-formatter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2017-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @flow\n * @format\n */\n\ndeclare module 'met...
javascript
edit
null
null
bsd-3-clause
1853e1519030caaeeb7f31017d98823aa5696daf
hammerandchisel/react-native,hoangpham95/react-native,javache/react-native,exponent/react-native,facebook/react-native,hammerandchisel/react-native,javache/react-native,arthuralee/react-native,hammerandchisel/react-native,javache/react-native,exponentjs/react-native,exponent/react-native,pandiaraj44/react-native,pandia...
flow-github/metro.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst _ = require('lodash');\nconst { Logger, transports: { Console } } = require('winston');\n\nmodule.exports = function wrappedDebug(module) {\n const logger = new Logger({\n level: 'info',\n transports: [\n new (Console)...
javascript
edit
0
1
mit
c933f9b91599f56d8ad5a946083b4a402c2133cc
cbaclig/amion-scraper
src/logger.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njest.unmock('../Header');\n\nimport React from 'react';\nimport TestUtils from 'react-addons-test-utils';\nimport { Header } from '../Header';\n\nxdescribe('Header', () => {\n\n it('should have title', () => {\n const containe...
javascript
edit
0
1
mit
ce63223ec6191228eecc05108b4af4569becf059
raccoon-app/ui-kit,raccoon-app/ui-kit
src/front/js/components/__tests__/Header.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport app from 'app'\n\nvar visibleCount = 0\n\nexport default function () {\n if (++visibleCount === 1) {\n app.dock.show()\n }\n let alreadyHidden = false\n return () => {\n if (alreadyHidden) {\n throw new Error('Trie...
javascript
edit
0
3
bsd-3-clause
10c444078b93f8ac179235584fb43a02b314f3f0
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
desktop/app/dockIcon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport sinon from 'sinon';\nimport chai from 'chai';\nconst expect = chai.expect;\nimport * as fetch from '../../../../src/functions/fetch.js';\nimport checkMinifiedJs from '../../../../src/html/js/minify';\n\ndescribe('html', function(...
javascript
edit
0
3
mit
0c89717bfca88ae7a345450da3d922bddb59507e
juffalow/pentest-tool-lite,juffalow/pentest-tool-lite
test/html/js/minify/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require(\"assert\");\nvar helpers = require(\"./helpers\");\n\ndescribe('Document updates,', function(){\n var db;\n\n before(function(done){\n helpers.resetDb(function(err, res){\n db = res;\n done();\n }...
javascript
edit
0
1
bsd-3-clause
cf5178d1f603a4c029f5cb70250f002543195eea
ludvigsen/massive-js,robconery/massive-js
test/document_update_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport 'index.scss';\nimport 'script-loader!TimelineJS3/compiled/js/timeline.js';\nimport generateTimeline from './timeline';\n\ngenerateTimeline().then(timeline => {\n window.timeline = timeline; // eslint-disable-line no-undef\n});\n...
javascript
edit
0
1
mit
6ff0d1e0517379a432f84bade6817285058ffaf1
L4GG/timeline,L4GG/timeline,L4GG/timeline
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst React = require('react');\nconst icon = require('./GitHub-Mark-64px.png');\nconst Preview = require('./preview');\n\nconst githubPlugin = ({term, display, actions}) => {\n display({\n id: 'github',\n icon,\n ...
javascript
edit
0
1
mit
5c149bc0399bd39675ee02dd3c2f03fed9b7d850
tenorz007/cerebro-github,tenorz007/cerebro-github
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n\n 'Backbone',\n\n //Templates\n 'text!templates/project-page/closeGameTemplate.html'\n], function(\n\n Backbone,\n\n //Template\n closeGameTemplate\n){\n var GameController = Backbone.View.extend({\n\n template: _.t...
javascript
edit
0
4
mit
d130e6373de4b79cd414d6b02e37eecce1aee97d
tangosource/pokerestimate,tangosource/pokerestimate
public/javascripts/app/views/gameController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Alexa = require('alexa-sdk');\n\nvar APP_ID = 'amzn1.ask.skill.85ae7ea2-b727-4d2a-9765-5c563a5ec379';\n\nvar SKILL_NAME = 'Snack Overflow';\nvar POSSIBLE_RECIPIES = [ 'Chicken Parmesan', 'Spaghetti', 'Turkey Sandwich' ];\n\nexports....
javascript
edit
0
3
mit
bd9bd8137c46112a83209a6890c37bd0bdf45fd8
cwboden/amazon-hackathon-alexa
src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport AddBlock from './addBlock';\n\nexport default function(config) {\n return function(e){\n const {props, selection, files, editorState, onChange} = e;\n // Get upload function from config or editor props\n c...
javascript
edit
0
4
mit
2daacc00b849da8a3e86c089fe1768938486bd2b
dagopert/draft-js-plugins,nikgraf/draft-js-plugin-editor,nikgraf/draft-js-plugin-editor,draft-js-plugins/draft-js-plugins-v1,draft-js-plugins/draft-js-plugins,draft-js-plugins/draft-js-plugins,koaninc/draft-js-plugins,dagopert/draft-js-plugins,dagopert/draft-js-plugins,koaninc/draft-js-plugins,draft-js-plugins/draft-js...
draft-js-dnd-plugin/src/modifiers/onDropFile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require('http');\nvar util = require('./util');\nvar counter = 0;\nvar port = 1337;\n\nhttp.createServer(function (req, res) {\n var answer = util.helloWorld();\n res.writeHead(200, {'Content-Type': 'text/plain'});\n ...
javascript
edit
0
1
mit
db68227c3a02dcc059839592de9076abe52d3bfe
fhinkel/SimpleChatServer,fhinkel/SimpleChatServer
js/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// source: \nvar FN_ARGS = /^function\\s*[^\\(]*\\(\\s*([^\\)]*)\\)/m;\nvar FN_ARG_SPLIT = /,/;\nvar FN_ARG = /^\\s*(_?)(\\S+?)\\1\\s*$/;\nvar STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar SIGNATURE = '__signature_' ...
javascript
edit
0
3
mit
2ca2a8144d19b46da40a24932471f8ea5f6c9c72
grncdr/js-pockets
signature.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Sequelize = require('sequelize');\nconst env = process.env.NODE_ENV || 'development';\nconst config = require('../config/config.json')[env];\n\nconst sequelize = new Sequelize(config.database, config.username, config.password, con...
javascript
edit
0
2
mit
196e3fded155835c52ac56a1847a1dfb21fbdd1c
tsg-ut/mnemo,tsg-ut/mnemo
api/models/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar webpackDevMiddleware = require('webpack-dev-middleware');\nvar webpackHotMiddleware = require('webpack-hot-middleware');\nvar app = require('express')();\nvar server = require('http').Server(app);\...
javascript
edit
0
2
mit
3a765c088255b7c2b5485d6566efc736519b2372
Irraquated/gryph,Irraquated/gryph,FakeSloth/gryph,FakeSloth/gryph
devServer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst chalk = require('chalk');\nconst jhipsterUtils = require('../utils');\n\nmodule.exports = class {\n addBlockContentToFile(fullPath, content, needleTag) {\n try {\n jhipsterUtils.rewriteFile(\n {...
javascript
edit
0
2
apache-2.0
71f21303b3aff0e7cf4e3f52fb5c1e95984b9970
dynamicguy/generator-jhipster,ruddell/generator-jhipster,jhipster/generator-jhipster,sendilkumarn/generator-jhipster,mosoft521/generator-jhipster,cbornet/generator-jhipster,mosoft521/generator-jhipster,pascalgrimaud/generator-jhipster,PierreBesson/generator-jhipster,vivekmore/generator-jhipster,wmarques/generator-jhips...
generators/needle/needle-base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular\n .module('app')\n .factory('actionService', [\n '$http',\n '$resource',\n function($http, $resource) {\n \n var Action = $resource('/api/actions/:id',\n { id: '@id' }\n );\n \n Action.ha...
javascript
edit
0
3
mit
5f848210657e1a10260e277c49d584ea5a10fc2d
brettshollenberger/rootstrikers,brettshollenberger/rootstrikers
client/app/scripts/services/action.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport MCStoreBus from './mcstorebus';\n\nexport const EVTYPE = {\n EVUPDATE: 'EVUPDATE',\n EVREMOVE: 'EVREMOVE',\n EVADD: 'EVADD'\n};\n\nconst _KNOWN_EVENTS = _.values(EVTYPE);\n\nfunction isKnownEvent(event) {\n return _.f...
javascript
edit
0
2
mit
4b0dfc61b9d837724df287b7a9d86eedb35f4060
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/src/app/global.services/store/mcstore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([], function() {\n var CommandParser = (function() {\n var parse = function(str, lookForQuotes) {\n var args = [];\n var readingPart = false;\n var part = '';\n\t for(var i=0; i < str.length; i++) {\...
javascript
edit
0
6
mit
22524569d06a330922e74b2552b471a42da1d3ab
git-school/visualizing-git,git-school/visualizing-git
js/command-parser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Complete rewrite of adampietrasiak/jquery.initialize\n// @link https://github.com/adampietrasiak/jquery.initialize\n// @link https://github.com/dbezborodovrp/jquery.initialize\n;(function($) {\n\tvar MutationSelectorObserver = functi...
javascript
edit
0
4
mit
197e6eeeed36e81b5b87375ea7e2446455ca112c
AdamPietrasiak/jquery.initialize,timpler/jquery.initialize,AdamPietrasiak/jquery.initialize,timpler/jquery.initialize
jquery.initialize.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(grunt) {\n\n grunt.loadNpmTasks('grunt-contrib-copy');\n\n return {\n target: {\n files: [\n {\n expand: true,\n cwd...
javascript
edit
0
1
mit
61c34e2ca7eeea7bf7393ea1a227a16e4355a921
sinahab/BitcoinUnlimitedWeb,gandrewstone/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb,thofmann/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb,sinahab/BitcoinUnlimitedWeb,gandrewstone/BitcoinUnlimitedWeb,BitcoinUnlimited/BitcoinUnlimitedWeb,thofmann/BitcoinUnlimitedWeb
tasks/copy.js
accepted
null
true