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\nvar assert = require('assert');\n\nvar filename = require('../').filename;\n\n\ndescribe('Filename normalization', function() {\n it('should normalize spaces', function() {\n assert.equal(filename('1 2 3'), '1_2_3');\n });\...
javascript
edit
0
1
apache-2.0
43ec19a548ecbe333640086263a4f15c401592c9
GitbookIO/normall
test/filename.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst LEVELS = {\n NOTHING: 0,\n ERROR: 1,\n WARN: 2,\n INFO: 4,\n DEBUG: 5,\n}\n\nconst createLevel = (label, level, currentLevel, loggerFunction) => (message, extra = {}) => {\n if (level > currentLevel) return\n const logData ...
javascript
edit
0
2
mit
aac2f9885f1302f83914e9de17c444d4c7f3cdf9
tulios/kafkajs,tulios/kafkajs,tulios/kafkajs,tulios/kafkajs
src/loggers/console.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction sockets(){\n var socket = new WebSocket(\"ws://localhost:8765\");\n window.frequency = 1;\n window.height = 0;\n window.width = 0;\n var hero = {};\n window.heroId = '';\n var units = [];\n\n socket.onop...
javascript
edit
0
3
mit
6c92bc2b5c487a6ebbaba54fe2c0dd1fb8af1a50
pzdeb/SimpleCommander,pzdeb/SimpleCommander,pzdeb/SimpleCommander,pzdeb/SimpleCommander
static/js/web_socket.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// Configuration for the New Relic Node.js agent\n\nexports.config = {\n app_name: process.env.NEW_RELIC_APP_NAME || 'app',\n logging: {\n filepath: process.env.NEW_RELIC_LOG || 'stdout'\n }\n};\n\n```\n...
javascript
edit
0
0
mit
e75e4cd6e3f596cee337e7e6da2fb25d8edc3f0c
dragonservice/sso-angularjs-skeleton,dragonservice/sso-angularjs-skeleton
newrelic.js
rejected_duplicate
Near-duplicate of sample 78073
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar expect = require('expect.js');\nvar seeds = require('../seeds');\nvar Feature = require('../feature');\n\ndescribe('Feature', function () {\n before(function (done) {\n seeds(done);\n });\n\n describe('schema', function () {\n...
javascript
edit
0
1
mit
f16dcb4412b33a4b60a55fdd3bb849e35f8a526b
nicolasmccurdy/rose,nickmccurdy/rose,nicolasmccurdy/rose,nickmccurdy/rose
test/feature.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert');\nvar seeds = require('../seeds');\nvar Feature = require('../feature');\n\ndescribe('Feature', function () {\n before(function (done) {\n seeds(done);\n });\n\n describe('schema', function () {\n ...
javascript
edit
0
1
mit
538cf296f69f97488928e8b2cca26c3669336ad7
nicolasmccurdy/rose,nickmccurdy/rose,nickmccurdy/rose,nicolasmccurdy/rose
test/feature.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport $ from 'jquery';\nimport getScrubbedData from './dataUtils';\nimport testData from '../../test/data/test-data';\nimport apiKey from '../../test/apiKey';\n\nconst getWeatherData = location => {\n if (parseInt(location, 10)) {\n ...
javascript
edit
0
4
mit
96d939ad003d2253ceb4a65e6c50f2371a2daa09
the-oem/weathrly,the-oem/weathrly
lib/utils/apiUtils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/* Prettyify */\n$( document ).ready(function() {\n prettyPrint();\n});\n\n\n/* Scrollspy */\nvar navHeight = $('.navbar').outerHeight(true) + 10\n\n$('body').scrollspy({\n target: '.bs-sidebar',\n offset: navHeight\n})\n\n\n...
javascript
edit
0
3
mit
d846f1a13d4a8de78431096458c9cfe481ff3f3a
factor-io/docs,factor-io/docs,factor-io/docs
theme/js/base.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar FileRenderer = require('../filerenderer.js');\nvar FileRevisions = require('../fileRevisions.js');\n\nif (window.contextVars.renderURL !== undefined) {\n FileRenderer.start(window.contextVars.renderURL, '#fileRendered');\n}\n\nne...
javascript
edit
0
0
apache-2.0
2d2b39c36b1fc41fce3aaaffee52993c56829eda
abought/osf.io,mluo613/osf.io,cosenal/osf.io,Nesiehr/osf.io,pattisdr/osf.io,lamdnhan/osf.io,brianjgeiger/osf.io,binoculars/osf.io,icereval/osf.io,icereval/osf.io,jnayak1/osf.io,jeffreyliu3230/osf.io,emetsger/osf.io,billyhunt/osf.io,cslzchen/osf.io,reinaH/osf.io,MerlinZhang/osf.io,chennan47/osf.io,barbour-em/osf.io,mluk...
website/static/js/pages/view-file-page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar sFormat = require( 'stringformat' );\nvar transformTools = require( 'browserify-transform-tools' );\nvar path = require( 'path' );\n\nvar options = {\n excludeExtensions: [ '.json' ],\n evaluateArguments: true\n};\n\nmodule.export...
javascript
edit
0
4
mit
7a22f5ea14c5902770c1b8771b879d479350c6ce
royriojas/build-workflow
utils/shimify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (t, a) {\n\ta(t(), false, \"Undefined\");\n\ta(t(1), false, \"Primitive\");\n\ta(t({}), false, \"Objectt\");\n\ta(t({ toString: function () { return '[object Error]'; } }), false,\n\t\t\"Fake e...
javascript
edit
0
1
isc
12a8cd2d3711c2a0eb48534cbe9d813f108b4706
medikoo/es5-ext
test/error/is-error.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Movable Type DataAPI SDK for JavaScript v1\n * Copyright (c) 2013 Six Apart, Ltd.\n * This program is distributed under the terms of the MIT license.\n *\n * Includes jQuery JavaScript Library to serialize a HTMLFormElement\n * h...
javascript
edit
null
null
mit
b2e2a17bbb4c45d23fa6e02a7f9f7e83e4b6974f
movabletype/mt-data-api-sdk-js,movabletype/mt-data-api-sdk-js
src/data-api/v1/intro.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require('express');\nconst router \t= express.Router();\nconst multer = require('multer');\nconst upload = multer({dest: 'uploads/'});\nconst path = require('path');\nconst compile = require('../latex/latex');\n\n//...
javascript
edit
0
5
mit
5bd150460eb5643373726ab18832d5e8fbcb2307
Albyxyz/latex-it-server,illbexyz/latex-it-server
src/routes/latex.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport r from 'ramda';\nimport products from '../mock-data/products.json';\n\nconst getBrands = r.compose(r.uniq, r.map(r.prop('brand')));\nconst brands = getBrands(products);\n\nconsole.log(brands);\n```\n\nApply this change: Add funct...
javascript
edit
0
0
mit
17b669bda17c3ec192fd7f0d6d6fe4bdfe369af6
tiberiualex/fuzzy-octo-lol,tiberiualex/fuzzy-octo-lol
src/scripts/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst fs = require('fs')\nconst program = require('commander')\nconst meta = require(`${process.cwd()}/package.json`)\n\ntry {\n let ver = meta.version\n\n program\n .version(meta.version)\n .arguments('<v...
javascript
edit
0
4
isc
865e706ff93a7f9bee9cc6aeabeabacd388c4bdc
pinkhominid/npm-bower-sync-ver
npm-bower-sync-ver.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport {\n formatDate,\n formatDateAndTime,\n parsePositiveInteger,\n truncateString,\n parsePositiveFloat,\n formatExpiryDate,\n parseExpiryDate,\n formatPlural,\n} from 'sussol-utilities';\nexport { formatStatus } from './form...
javascript
edit
0
0
mit
36f245c85d6b9403e247c9c1bdea4984875b985c
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/utilities/index.js
rejected_duplicate
Near-duplicate of sample 92169
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * External dependencies\n */\nimport { render } from '@testing-library/react';\nimport PropTypes from 'prop-types';\n\n/**\n * WordPress dependencies\n */\nimport { Fragment } from '@wordpress/element';\n\nconst TestProviders = ( ...
javascript
edit
0
1
apache-2.0
8767f2b88c2de56a3d20a82cdad7bd96fcbfe72d
google/site-kit-wp,google/site-kit-wp,google/site-kit-wp,google/site-kit-wp
tests/js/test-utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Command } from 'substance'\n\n/*\n This command intended to switch view and scroll to the selected node.\n Command state becoming active only for certain type of custom selection,\n e.g. if you want to use it, provide config...
javascript
edit
0
3
mit
b396130854fba1608ba797d9a1c3c7698b05608f
substance/texture,substance/texture
src/article/shared/EditEntityCommand.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash'),\n async = require('async'),\n checkForFiling = require('./check'),\n request = require('request'),\n models = require('../../models'),\n parser = require('rss-parser');\n\nvar interval = 60000;\...
javascript
edit
0
5
mit
dd1202f05f3720da370a5c5af003165d3363baea
chriszs/fec-loader
src/util/fec/rss.js
rejected_duplicate
Near-duplicate of sample 90643
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction(newDoc, oldDoc, userCtx) {\n if (oldDoc){\n if (userCtx.roles.indexOf(\"_admin\") == -1) {\n throw({forbidden: \"Only database admins are allowed to update pastes/comments\"});\n }\n } else {\n // verify well-fo...
javascript
edit
0
7
unlicense
33124ea2d2ffad5101b62157de44d438108b20f4
rakoo/MultiBin
validate_doc_update.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['backbone', 'common/utils/padTwo'], function(Backbone, padTwo) {\n 'use strict';\n\n // Convert exam in Unix time to 12-hour date/time format. We add 8 hours to\n // the UTC time, then use the getUTC* methods so that they wil...
javascript
edit
0
4
mit
df3f918a0a6430a2e0cddc63029b3c4ff7a08fc8
Yunheng/nusmods,nathanajah/nusmods,nathanajah/nusmods,zhouyichen/nusmods,zhouyichen/nusmods,chunqi/nusmods,nusmodifications/nusmods,Yunheng/nusmods,nathanajah/nusmods,nathanajah/nusmods,chunqi/nusmods,nusmodifications/nusmods,Yunheng/nusmods,nusmodifications/nusmods,mauris/nusmods,zhouyichen/nusmods,nusmodifications/nu...
app/scripts/common/models/ModuleModel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('app.services')\n.provider('formElementProvider', function() {\n\t'use strict';\n\n\tvar templates = {\n\t\t'String': function(field) {\n\t\t\tif(field && field.validation.allowedHtml) {\n\t\t\t\treturn 'partials/inputs/t...
javascript
edit
0
5
mit
bc3a647b2128d534a1ac8f37c2eaf39fa807f2b3
TechAtNYU/intranet,TechAtNYU/intranet
app/js/services/form-element-provider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Analytics from '../api/Analytics';\nimport LocalStorage from '../storage/LocalStorage';\nimport ApolloClient from '../api/ApolloClient';\nimport Auth0Api from '../api/Auth0Api';\n\nexport default {\n setSession(session) {\n r...
javascript
edit
0
4
bsd-3-clause
7dff9b697eb48e576b0f2087b539e16982e4324a
exponent/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponen...
js/redux/SessionActions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Don't do \"x <= y\", just do \"x < (y + 1)\".\n * @param {number} x\n * @param {number} y\n * @see {@link http://redd.it/3rc2rm}\n */\nvar isXSmallerThanOrEqualsToY = function(x, y) {\n if (x < (y + 1) ? true : false) {\n ...
javascript
edit
0
3
mit
61d294526061c7d432c78a217156f529be60e98f
vekat/anything.js,awadYehya/anything.js,awadYehya/anything.js,Sha-Grisha/anything.js,awadYehya/anything.js,vekat/anything.js,Rabrennie/anything.js,awadYehya/anything.js,Sha-Grisha/anything.js,dstrekelj/anything.js,Rabrennie/anything.js,vekat/anything.js,Sha-Grisha/anything.js,Rabrennie/anything.js,dstrekelj/anything.js...
src/isXBiggerOrSmallerThanOrEqualsToY.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst axios = require(`axios`);\n\nexport default itemIdentifier => axios.get(`items`, {\n baseURL: `https://track.bpost.be/btr/api/`,\n responseType: `json`,\n params: { itemIdentifier },\n}).then(res => res.data.items[0])\n.catch(e...
javascript
edit
0
2
mit
0f04f3b3cf7281eb96fa35fc6f933998bd9ec40c
thibmaek/bpost
src/lib/composedFetch.js
rejected_duplicate
Near-duplicate of sample 73718
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\n\nconst distPath = path.join(__dirname, 'dist');\nconst srcPath = path.join(__dirname, 'src');\nconst env = process.env.NODE_ENV || 'development';\nconst minified = env...
javascript
edit
0
0
mit
b0547114b695e3e1325cd74cea8d8f63a65db9fd
CyberInt/redux-reuse
webpack.config.babel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Webpack configuration to use with the build task.\n\nvar webpack = require('webpack');\n\nmodule.exports = {\n\n // Create also a \"lib\" chunk with common libraries, e.g. react.\n entry: {\n lib: ['react'],\n main: './app/cl...
javascript
edit
0
0
mit
50697986a05c31db1f41d7d5064284b9b1e33efe
fustic/isomorphic500,geekyme/isomorphic-react-template,pheadra/isomorphic500,w01fgang/isomorphic500,davedx/isomorphic-react-template,jonathanconway/MovieBrowser,beeva-davidgarcia/isomorphic500,jxnblk/isomorphic500,jmfurlott/isomorphic500,gpbl/isomorphic500,veeracs/isomorphic500,dmitrif/isomorphic500,saitodisse/isomorph...
webpack.config.build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (env) {\n \"use strict\";\n env.ddg_spice_<: $lia_name :> = function(api_result){\n\n // Validate the response (customize for your Spice)\n if (api_result.error) {\n return Spice.failed('<: $lia_...
javascript
edit
null
null
apache-2.0
17be6cd1899b21f0b0d418eb7a6d4b1da06cbbac
deserted/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,loganom/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,lernae/zeroclickinfo-spice,andrey-p/zeroclick...
template/share/spice/example/example.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(Modules) {\n \"use strict\";\n\n var queues = {};\n var dd = new diffDOM();\n var timer;\n\n var getRenderer = $component => response => function() {\n var component = $component.get(0);\n var updated = $(response[$...
javascript
edit
0
2
mit
b9a69def006df0fa4ba80438e3122adbcf267338
alphagov/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,gov-cjwaszczuk/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin
app/assets/javascripts/updateContent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable */\nimport React from 'react';\nimport { configure, addDecorator, addParameters } from '@storybook/react';\nimport { withNotes } from '@storybook/addon-notes';\nimport { withKnobs } from '@storybook/addon-knobs';\nimpo...
javascript
edit
0
1
bsd-2-clause
e9cb3412d9b0652c1c83ec5b1b3ba5f6564d2c4d
tidepool-org/viz,tidepool-org/viz,tidepool-org/viz
storybook/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\n\nmodule.exports = {\n description: 'Initialize files needed for typescript compilation',\n\n files: function() {\n return [\n path.join(this.path, 'files', 'tsconfig.json'),\n path.join(this....
javascript
edit
0
3
mit
1ad5d0989402fbe143a60a83a093749f1188c963
emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript,QuantumInformation/ember-cli-typescript,QuantumInformation/ember-cli-typescript,QuantumInformation/ember-cli-typescript,emberwatch/ember-cli-typescript,emberwatch/ember-cli-typescript,QuantumInformation/ember-cli-typescript
blueprints/ember-cli-typescript/index.js
rejected_duplicate
Near-duplicate of sample 75660
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* globals module */\nmodule.exports = {\n afterInstall: function() {\n var _self = this;\n return this.addBowerPackagesToProject([\n { name: 'localforage', target: '1.3.3' }\n ]).then(function() {\n return _self.add...
javascript
edit
0
1
mit
96c919da1c5053717da5661dea8ac858237a8ec3
Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data,Flexberry/ember-flexberry-projections,Flexberry/ember-flexberry-data
blueprints/ember-flexberry-data/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Page modules\nvar FastClick = require('fastclick')\nvar nav = require('./nav.js')\nvar socialShare = require('./social-share')\nvar analytics = require('./analytics')\n\nnav.init()\nanalytics.init()\nFastClick.attach(document.body)\n...
javascript
edit
0
1
mit
bba07ab9c1cc289231dac45a7eb66743e79b69b2
StreetSupport/streetsupport-web,StreetSupport/streetsupport-web,StreetSupport/streetsupport-web
src/js/page-give-help.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport initialState from './initialState';\nimport { \n BOARD_LIST_LOADED, \n BOARD_LIST_REQUESTED,\n} from '../constants'\n\n// ADD_FAVOURITE_BOARD\n// TODO: Add boardList invalidation + favourites\n\nexport default function (sta...
javascript
edit
0
7
mit
d29e4a0385f07ec73361e9a75c7e40e48a5dcd37
AdamSalma/Lurka,AdamSalma/Lurka
src/client/reducers/BoardlistReducer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\nvar Authority = require('../authority');\n\nvar defaultOptions = {\n\tassignField: 'auth'\n};\n\nfunction identify(auth, opts) {\n\topts = _.defaults(opts || {}, defaultOptions);\n\t\n\tif (!(auth instanceof ...
javascript
edit
0
3
apache-2.0
77669ad99ef0802900b4b67df88de0c40a38eb71
alex94puchades/auth-rbac
lib/middleware/identify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport ModelObserver from '../models/model-observer';\n\nexport default class ObserveModel extends React.Component {\n static propTypes = {\n model: PropTypes.shape(...
javascript
edit
0
2
mit
9cde0bb6f4f883d1e80b12863399d82aa3c989a2
atom/github,atom/github,atom/github
lib/views/observe-model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar chai = require('chai')\nvar mathModule = require('./math-module')\n\nvar expect = chai.expect\n\ndescribe('math module', function () {\n describe('add', function () {\n it('should correctly add positive numbers', function () {\n...
javascript
edit
0
1
mit
5f8b5d243e7fb6036ad5bfa34cedc5869a2e9871
josh-egan/sandbox_mocha-chai
src/math-module.specs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DS from 'ember-data';\n\nexport default DS.RESTAdapter.extend({\n defaultSerializer: 'endpoints',\n buildURL: function(type, id, record) {\n var url = this._super(type, id, record);\n var includes = [];\n var model = t...
javascript
edit
0
2
mit
10df704b92c8762bfa2e86869ef4f95463e7dd40
endpoints/ember-data-endpoints,endpoints/ember-data-endpoints
addon/adapter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Q = require(\"q\");\nvar fs = require(\"fs\");\nvar fsExtra = require(\"fs-extra\");\nvar Ignore = require(\"fstream-ignore\");\n\nvar getFiles = function(path) {\n var d = Q.defer();\n\n // Our list of files\n var files = ...
javascript
edit
0
2
apache-2.0
b330277ed7d31ff1d680f6c4b77e18bdf2fb1832
sudobashme/gitbook,grokcoder/gitbook,kamyu104/gitbook,codepiano/gitbook,svenkatreddy/gitbook,switchspan/gitbook,FKV587/gitbook,mautic/documentation,thelastmile/gitbook,gencer/gitbook,boyXiong/gitbook,gaearon/gitbook,mautic/documentation,boyXiong/gitbook,ZachLamb/gitbook,youprofit/gitbook,webwlsong/gitbook,thelastmile/g...
lib/generate/fs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { TabNavigator, addNavigationHelpers } from 'react-navigation'\nimport { connect } from 'react-redux'\nimport Challenges from './components/Challenges'\nimport Friends from './components/Friends'\nimpor...
javascript
edit
0
2
mit
302bc4a11f61749abcd9e22de0d541d8f8ac3e73
TomGijselinck/aja,TomGijselinck/aja,TomGijselinck/aja,TomGijselinck/aja,TomGijselinck/aja
Frontend/navigator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet React = require(\"react\")\nlet {errorList, sizeClassNames, formGroupCx, label} = require(\"../util.js\")\nlet {div, textarea} = React.DOM\nlet cx = require(\"classnames\")\n\nexport default class extends React.Component {\n\n stat...
javascript
edit
0
2
mit
b71c71e2e2c4c36e001a94a947b3350c0abe070a
frig-js/frig,TouchBistro/frig,TouchBistro/frig,frig-js/frig
src/javascripts/frigging_bootstrap/components/text.js
rejected_duplicate
Near-duplicate of sample 87058
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar tape = require('tape'),\n comboBreaker = require('..'),\n redundant,\n broken\n;\n\nredundant = 'I really really really really love pizza.';\n\ntape('combo breaking', function (t) {\n broken = comboBreaker(redundant, 're...
javascript
edit
0
1
isc
559ebd8e365d272acf29c4107cf95e1fe20b3cfa
khalifenizar/combo-breaker
tests/combo-breaker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require('http'),\n assert = require('assert'),\n cb = require('assert-called'),\n jsonquest = require('../');\n\nvar server = http.createServer(cb(function (req, res) {\n var data = '';\n\n assert.equal(req.method,...
javascript
edit
0
1
mit
03415c18ca574371591beb2eff165e37e3b14b91
mmalecki/jsonquest
test/jsonquest-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Component from '@ember/component';\nimport { sort, filterBy } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { task, timeout } from 'ember-concurrency';\n\nexport default Component.ext...
javascript
edit
0
2
bsd-2-clause
135fb61ddf5264877f6b10175f684627a14dfcf7
barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web
app/components/round-outcome.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nSpreeStore.module('Products.Show',function(Show, SpreeStore, Backbone,Marionette,$,_){\n Show.Product = Backbone.Marionette.ItemView.extend({\n tagName: 'div',\n className: 'product',\n template: \"#product-template\",\n\n ...
javascript
edit
0
2
bsd-3-clause
6456a5e7a9da397f3a5f8095bf72e34a70f64b2c
njaw/spree,njaw/spree,njaw/spree
app/assets/javascripts/spree/apps/products/show/show_view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { alerts } from '../stores/alerts'\n\n// Handle axios errors from backend API so that they can be shown\nexport function errorHandler (error) {\n if (error.response) {\n const response = error.response\n\n // The...
javascript
edit
0
3
mit
7f6ddefd367581cdac76b05d6f1f7db444f45650
peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag,peterhil/ninhursag
app/static/js/lib/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* This was necessary to priorize Star Wars: The Clone Wars (2008) over Star Wars: Clone Wars (2003).\n I left this object because it could be useful for other movies/shows */\nvar fullTitles = {\n 'Star Wars: The Clo...
javascript
edit
0
3
mit
dbf35e2f20a7b543d021449611d1e630dca01c67
tegon/traktflix,MrMamen/traktflix,tegon/traktflix,MrMamen/traktflix
app/scripts/src/content/item.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n\n $('.side-nav-container').hover(function () {\n $(this).addClass('is-showed');\n $('.kudo').addClass('hide');\n }, function() {\n $(this).removeClass('is-showed');\n $...
javascript
edit
0
7
cc0-1.0
73b370ad02b0a5d11f0c37003a3caaab0c5352f2
cybertk/cybertk.github.io,orlando/svbtle-jekyll,margaritis/svbtle-jekyll,margaritis/margaritis.github.io,orlando/svbtle-jekyll,margaritis/margaritis.github.io,cybertk/cybertk.github.io,margaritis/margaritis.github.io,margaritis/svbtle-jekyll
assets/javascripts/js.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst getDictionaries = require('./hunspell-dictionaries').getDictionaries;\nconst getSpellChecker = require('./hunspell-checker');\nconst webframe = require('web-frame');\n\nfunction createAndRegisterSpellchecker(langu...
javascript
edit
0
2
mit
763cbd9d87a25cc8af823d94d37dd95d344f3ff1
pekim/slack-wrapped,pekim/slack-wrapped
src/script/spellcheck/spellcheck.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst nest = require('depnest')\nconst { h, Value, when } = require('mutant')\n\nexports.gives = nest('app.html.menu')\n\nexports.needs = nest({\n 'app.html.menuItem': 'map',\n 'app.sync.goTo': 'first',\n 'sbot.obs.connection': 'fir...
javascript
edit
0
2
mit
1afa8fabeef1485138c09d5b8098e158cc8467d6
dominictarr/patchbay,dominictarr/patchboard
app/html/menu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar util = require('util');\n\nvar jshint = require('jshint').JSHINT;\n\nvar DefaultValidator = require('./DefaultValidator');\n\nvar Validator = function() {\n};\n\nutil.inherits(Validator, DefaultValidator);\n\nValidator.prototype.val...
javascript
edit
0
2
mit
6f6532fe1a1a3bafecc6955f68b17910fc859035
vmeurisse/wlint
src/validators/Jshint.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar express = require('express');\nvar request = require('supertest');\nvar logger = require('log4js').getLogger('Unit-Test');\n\nexports['Test send message success'] = function(test){\n\n\tvar sendObject = {\n\t\tmessa...
javascript
edit
null
null
apache-2.0
b96aa975a465285fd075f3d7075de723b4f72f1b
dollars0427/ATMessager,dollars0427/ATMessager
test/view.sendmessage.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n var app = angular.module('itineraryApp', ['ngAutocomplete']); // initialize app\n\n app.controller('autocompCtrl', function ($scope) {\n // see http://plnkr.co/edit/il2J8qOI2Dr7Ik1KHRm8?p=preview\n //...
javascript
edit
0
1
mit
c78e2f7ef13cbb94d8655d453a8fc652e1cf30d9
dcalacci/open-itinerary,dcalacci/open-itinerary
static/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n // Libs\n \"jquery\",\n \"use!underscore\",\n \"use!backbone\"\n],\n\nfunction($, _, Backbone) {\n // Put application wide code here\n\n return {\n // This is useful when developing if you don't want to use a\n //...
javascript
edit
0
3
mit
ad8777203b53830fea000b6d3428e2979c8f9102
spoonben/backbone-boilerplate,JrPribs/backbone-boilerplate,tbranyen/backbone-boilerplate,vivascau/backbonepoc,codeimpossible/backbone-boilerplate,MandeepRangi/doStuffMediaTest,adrianha/backbone-boilerplate,element4git/wipro,adrianha/backbone-boilerplate,Hless/backbone-phonegap-boilerplate,jSanchoDev/backbone-boilerplat...
app/namespace.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { StyleSheet, Dimensions } from 'react-native';\n\nexport default StyleSheet.create({\n mainContainer: {\n // flex: 3,\n width: Dimensions.get('window').width * .97,\n height: Dimensions.get('window').height * .95,\n ...
javascript
edit
0
0
mit
9be529fbf460fe781c71a58ee36662cfd9d16e08
fridl8/cold-bacon-client,fridl8/cold-bacon-client,fridl8/cold-bacon-client
containers/styles/GameplayScreenStyle.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\n\nimport { connect } from 'react-redux'\n\nclass Message extends React.Component {\n render() {\n return (\n <div>\n {this.props.author}: {this.props.message}\n </div>\n )\n }\n}\n\ncl...
javascript
edit
0
2
mit
12b380d1c5cf7b8f772c96e028dab190c30084c1
misterwilliam/gae-channels-sample,misterwilliam/gae-channels-sample,misterwilliam/gae-channels-sample
uiComponents/components.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet path = require('path');\nlet cors = require('cors');\n\nmodule.exports = function(app) {\n app.use(cors());\n // app.use('/', function (req, res) { res.json({message:'ok'})});\n app.use('/api/v1/auth', require('./auth'));\n...
javascript
edit
0
1
apache-2.0
a92aa9d45e6446970629f623df222289a0dc27d2
rrgarciach/gc-orders-server
server/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst way = require('senseway');\nconst mcbsp = require('mcbsp');\nconst renderWay = require('./renderWay');\n\nmodule.exports = (model, dispatch) => {\n const container = document.createElement('div');\n const channelMeans = way.mean...
javascript
edit
0
1
mit
98a4074ce27115cd13047efb6b098c1e950db818
axelpale/lately,axelpale/lately
example/drummer/src/createAPrioriElem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nfunction RunSelectorStats() {\n\n var result = {};\n var unused_selectors = [];\n result.unused_selectors = unused_selectors;\n var selector_times = [];\n result.selector_times = selector_times;\n var ...
javascript
edit
0
5
cc0-1.0
d62998cc92983bed48e4567f19a8ad95525b7d52
deathy/minimal-css-selector-stats
selectorStats.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (Rooms.find().count() === 0) {\n Meteor.call('createRoom');\n}\n\nMeteor.publish('rooms', function() {\n return Rooms.find();\n});\n\nRooms.allow({\n insert: ()=> false,\n update: ()=> false,\n remove: ()=> false\n});\n\nMet...
javascript
edit
0
3
mit
360db25558e264a6b167c7d62ac7915bd5551f59
iwazaru/polytunes,iwazaru/polytunes
server/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Index from 'appkit/routes/index';\n\nvar route;\nmodule(\"Unit - IndexRoute\", {\n setup: function(){\n var container = isolatedContainer([\n 'route:index'\n ]);\n\n route = container.lookup('route:index');\n }\n}...
javascript
edit
0
1
mit
49117ef1c49f5efcec03355f9125002880c561a5
tobobo/thyme-frontend,grese/miner-app-OLD,sajt/ember-weather,tomclose/minimal_eak_test_stub_problem,trombom/ember-weather-traininig,lucaspottersky/ember-lab-eak,ebryn/ember-github-issues,digitalplaywright/eak-simple-auth,eriktrom/ember-weather-traininig,daevid/broccoli-todo,stefanpenner/ember-app-kit,mtian/ember-app-ki...
tests/unit/routes/index_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {Meteor} from 'meteor/meteor';\nimport {check} from 'meteor/check';\n\nexport default function (methodName, ClassName) {\n Meteor.methods({\n [`${methodName}.create`](toInsert) {\n check(toInsert, Object);\n\n const...
javascript
edit
0
1
mit
39ec1fd7c66e039632b913d454e6a1afe9e6063d
thancock20/voting-app,thancock20/voting-app
lib/default_methods.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// (c) 2011 Richard Carter\n// This code is licensed under the MIT license; see LICENSE.txt for details.\n\n// This script handles the following functions:\n// When someone says something that starts with \"say\", repeats what was t...
javascript
edit
0
1
mit
9d697d92e5cb1e452d2741643fd56a2005dd9478
Ricket/nodebot,ludiko/nodebot,nooitaf/nodebot,ludiko/nodebot,nooitaf/nodebot,Ricket/nodebot
scripts/sayitagain.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\ngoog.provide('goog.promise.Resolver');\n\ngoog.requireType('goog.Promise');\n\n\n\n/**\n * Resolver interface for promises. The ...
javascript
edit
0
1
apache-2.0
1720ce081c47897b8429a5098ffb6f9cc71fafcd
google/closure-library,google/closure-library,google/closure-library,google/closure-library,google/closure-library
closure/goog/promise/resolver.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport Box from '../box';\nimport theme from './theme.css';\nimport Island from './Island';\nimport { elementIsDark } from...
javascript
edit
0
1
mit
58f469a86d5e86751dc98b3a00fbd218a3673340
teamleadercrm/teamleader-ui
components/island/IslandGroup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport supertest from 'supertest';\nimport app from '../index';\n\nconst request = supertest(app);\n\ndescribe('PostIt Tests', () => {\n describe('Authentication routes test', () => {\n it('ensures proper response for successful use...
javascript
edit
0
1
mit
d0d289a644e827fc0cf900d9646461e80ccff1ea
victor4l/PostIt,victor4l/PostIt
server/tests/tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport React from 'react'\nimport {MentionHud} from '.'\nimport {createSelector} from 'reselect'\nimport {connect, type MapStateToProps} from 'react-redux'\nimport {getSelectedInbox} from '../../constants/chat'\n\ntype Connect...
javascript
edit
null
null
bsd-3-clause
4aa73739ba0dd4c3064312fbca68400827c7bde5
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
shared/chat/hud/mention-hud-container.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* global Connector */\n\nConnector.playerSelector = '.lecteur';\n\nConnector.artistSelector = '.artiste .inside_call';\n\nConnector.getTrack = function () {\n\tvar text = $('.info-text .name').text().trim();\n\treturn ...
javascript
edit
0
2
mit
1ed0d87084a9019af45168ddb6f4e5df384af350
alexesprit/web-scrobbler,carpet-berlin/web-scrobbler,david-sabata/web-scrobbler,Paszt/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,usdivad/web-scrobbler,david-sabata/web-scrobbler,ex47/web-scrobbler,fakelbst/Chrome-Last.fm-Scrobbler,inverse/web-scrobbler,usdivad/web-scrobbler,galeksandrp/web-scrobbler,galeksandrp/we...
connectors/v2/letournedisque.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * This takes all bundles defined in our production webpack configuration and adds inline source maps to all of them\n * for easier debugging.\n * Any dev specific modifications to the build should be specified in here, where each b...
javascript
edit
0
0
mit
9f2bf0977da6d7e9e6a562c93999341c8e649cde
benjaoming/kolibri,jonboiser/kolibri,learningequality/kolibri,benjaoming/kolibri,lyw07/kolibri,DXCanas/kolibri,jonboiser/kolibri,lyw07/kolibri,indirectlylit/kolibri,MingDai/kolibri,jonboiser/kolibri,jayoshih/kolibri,christianmemije/kolibri,jonboiser/kolibri,rtibbles/kolibri,indirectlylit/kolibri,aronasorman/kolibri,chr...
frontend_build/src/webpack.config.dev.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = (slackapp) =>\n function(err, req, res) {\n if (err) {\n res.status(500).send(`ERROR: ${err}`);\n } else {\n slackapp.log(`Use /incoming-webhooks/${req.identity.team_id} to receive new reviews.`);\n ...
javascript
edit
0
2
mit
b268fda7f1c9747624abaea844f0db0609d483c8
trustpilot/slack-trustpilot
app/webserver-extensions/oauth-callback.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(\n [\n \"angular\",\n \"./dataset-list-controllers\",\n \"./dataset-list-services\"\n ],\n function (angular, controllers) {\n \"use strict\";\n\n var datasetListRoutes = angular.module...
javascript
edit
0
1
apache-2.0
0eee78337e155c41cec703e3120dca248817c8b6
delving/narthex,delving/narthex,delving/narthex
app/assets/javascripts/datasetList/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Obtain an imageId for Cornerstone from an image instance\n *\n * @param instance\n * @returns {string} The imageId to be used by Cornerstone\n */\ngetImageId = function(instance, frame) {\n if (!instance) {\n return;\n...
javascript
edit
0
5
mit
cbaf770fba59f8543b72755634610c7a8f0e1ee0
HorizonPlatform/Viewers,HorizonPlatform/Viewers,OHIF/Viewers,OHIF/Viewers,HorizonPlatform/Viewers,HorizonPlatform/Viewers,OHIF/Viewers
Packages/viewerbase/lib/getImageId.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//= require jquery-ui.custom.min\n//= require_directory .\n//= require jquery_nested_form\n\n// System wide behaviours\n$(function () {\n $('.flash-notice').delay(3000).slideUp(300).one('click', function () { $(this).slideUp(300); });\...
javascript
edit
0
1
mit
c6a045e023123ba0db7d0f685b2b67f73a411b0e
leftees/publisher,telekomatrix/publisher,alphagov/publisher,alphagov/publisher,alphagov/publisher,leftees/publisher,telekomatrix/publisher,leftees/publisher,telekomatrix/publisher,leftees/publisher,telekomatrix/publisher
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\nconst COLOR_EXTRACTION_REGEXP = /rgb\\(\\d+, ?\\d+, ?\\d+\\)|rgba\\(\\d+, ?\\d+, ?\\d+, ?\\d?\\.?\\d+\\)|#[0-9a-f]{3,6}/g\n\nexport function isColor(textEditor, bufferPosition) {\n const lineText = textEditor.getTextInRa...
javascript
edit
0
10
mit
edb110662579a5398e014069a141bc0233316b82
steelbrain/intentions-colorpicker
lib/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction render() {\n return (<div class=\"test\" id={id} {...props} key=\"test\" data-expanded={expanded} {...props.attrs}>\n <div {...props} />\n </div>);\n}\n\n```\n\nApply this change: Test that spread attributes are closed ove...
javascript
edit
null
null
mit
062235893998ec17d49007985f68557f13b18493
babel-plugins/babel-plugin-incremental-dom,jridgewell/babel-plugin-transform-incremental-dom,jridgewell/babel-plugin-incremental-dom
test/fixtures/spread-attributes/actual.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif(\"access_token\" in window && isOGObject()){\n yam.connect.embedFeed({\n container: '#yammer-feed',\n feedType: 'open-graph',\n network: $('meta[name=network_id]').attr('content'),\n objectProperties: {\n url: $(\"[...
javascript
edit
0
1
mit
61567413fe0a72667452608f52542fc64cc0ef3c
mauricionr/sched.do,YOTOV-LIMITED/sched.do,mauricionr/sched.do,YOTOV-LIMITED/sched.do,yammer/sched.do,mauricionr/sched.do,YOTOV-LIMITED/sched.do,YOTOV-LIMITED/sched.do,mauricionr/sched.do,yammer/sched.do,yammer/sched.do,yammer/sched.do
app/assets/javascripts/yammer_feed.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport { Link } from 'react-router';\n\nimport {\n getAvailableTime,\n getCaption,\n getMainImage,\n getName,\n getOpeningHours,\n} from 'utils/DataUtils';\n\nclass SearchResult...
javascript
edit
0
3
mit
9c1b91cfff028db19d5d8e2d88b9c7cf4e6ee305
fastmonkeys/respa-ui
app/components/search/SearchResult.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n \"env\": {\n \"browser\": true,\n \"es6\": true,\n \"node\": true\n },\n \"extends\": [\"eslint:recommended\", \"plugin:react/recommended\"],\n \"parserOptions\": {\n \"ecmaFeatures\": {\n \"exp...
javascript
edit
0
0
mit
d85d6f524ab84799898ffba28907b6c495eb946b
tnewell5/remote_retro,stride-nyc/remote_retro,tnewell5/remote_retro,stride-nyc/remote_retro,samdec11/remote_retro,stride-nyc/remote_retro
.eslintrc.js
rejected_duplicate
Near-duplicate of sample 82712
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction sampleAction() {\n console.log(arguments);\n // {'0':\n // { projects: { ios: null, android: null },\n // actions: { update: [Object], sample: [Object] } },\n // '1': { folderName: 'd', rnVersion: undefined },\n //...
javascript
edit
0
1
mit
2bab8049b30d3f8850b58aeeabcbaab8f55f0740
rnpm/rnpm
src/actions/sample.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = SensorModel = Backbone.Model.extend({\n urlRoot: 'http://localhost:4000/sensor/',\n idAttribute: 'sensor_id',\n defaults : {\n name: 'MySensor',\n sensor_id: \"\",\n room: \"\",\n },\n ...
javascript
edit
0
1
apache-2.0
8cb0c8e3cf6a0bd515781f8e3ec2f64824174194
HomeAgain/HomeAgainApi,HomeAgain/HomeAgainApi
app/models/sensors-model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Vue from \"vue\";\n\nimport NewLink from \"./components/saw-new-link.vue\";\nimport ListItem from \"./components/saw-link-element.vue\";\n\n// Importing the main css files\nimport \"./stylesheets/main.scss\";\nimport \"file-loade...
javascript
edit
0
1
mit
c65d709145dcd4a432639eb9364b672174fb06a3
mspl13/save-web,mspl13/save-web
src/app/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react/addons';\nimport { expect} from 'chai';\nimport { InfoBar } from 'components';\nimport { Provider } from 'react-redux';\nimport createStore from 'redux/create';\nimport ApiClient from 'ApiClient';\nconst { TestU...
javascript
edit
0
1
mit
aed9419aa6edec89748f47ef884b94fb917c90c7
Boelensman1/championpick2
src/components/__tests__/InfoBar-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport Realm from 'realm';\n\nexport class PeriodSchedule extends Realm.Object {\n getUseablePeriodsForProgram(program, maxOrdersPerPeriod) {\n const periods = ...
javascript
edit
0
2
mit
5a0d08fe17e50ee372aefdf6186cb0a708dc9cc0
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/database/DataTypes/PeriodSchedule.js
rejected_duplicate
Near-duplicate of sample 81022
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module(\"angular-mobile-docs\")\n .factory(\"FetchService\", function ($http, $q, LocalStorageCache, baseUrl) {\n\n var getVersionList = function () {\n /*\n TODO: LocalStorage...
javascript
edit
0
1
apache-2.0
d33322b7da2447ff452c619f5baf49e1a993b12d
robinboehm/angular-mobile-docs,robinboehm/angular-mobile-docs,robinboehm/angular-mobile-docs,robinboehm/angular-mobile-docs
app/www/scripts/services/FetchService.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst AWS = require('aws-sdk');\n\nconst dynamoDb = new AWS.DynamoDB.DocumentClient();\n\nmodule.exports.create = (event, context, callback) => {\n const timestamp = new Date().getTime();\n const data = JSON.parse(eve...
javascript
edit
0
7
mit
5b1b7b03d1b5b1fbeea7ecd6b856e22893f16f15
Vortexmind/survey-api-sls-aws
questionSets/create.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2019 The FOAM Authors. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain...
javascript
edit
0
0
apache-2.0
2f9a8eb2a0ded49b3fa4ba35de32e4a78a73197b
foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm
src/foam/java/Util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar log = require('../modules/log');\n\nexports.command = function(callback) {\n var client = this;\n\n this.perform(function() {\n log.command('Starting the service...');\n\n client\n .deleteCookies()\n ...
javascript
edit
0
2
mit
98df27308bcc21a92d71d3d81ab9b9bca77b6b72
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
tests/nightwatch/commands/startService.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n function createIframe() {\n var body = document.getElementsByTagName(\"body\")[0];\n var iframe = document.createElement(\"iframe\");\n var div = document.createElement(\"div\");\n\n iframe.style.display = ...
javascript
edit
0
2
mit
23fda24f210eff4ec7779976d6a53ee211144545
daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,Factlink/factlink-core,daukantas/factlink-core,Factlink/factlink-core,Factlink/factlink-core
js-library/src/js/loader.js
rejected_duplicate
Near-duplicate of sample 70490
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nexport function parseId(potentialId) {\n return (Number.isNaN(potentialId) || potentialId === null) ? null : parseInt(potentialId, 10);\n}\n\nexport const TEMP = 'temp';\n\n```\n\nApply this change: Return null, not NaN if id being p...
javascript
edit
0
1
apache-2.0
5505c4e6ba0ed14720eaa8ebd709a25f33362d13
mitmedialab/MediaCloud-Web-Tools,mitmedialab/MediaCloud-Web-Tools,mitmedialab/MediaCloud-Web-Tools,mitmedialab/MediaCloud-Web-Tools
src/lib/numberUtil.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\n\nimport RecompressJpegs from './recompress-jpegs';\nimport ImageMinifier from './image-minifier';\n\nconsole.log('Running JPEG recompression...\\n');\nnew RecompressJpegs().run('_site/**/*.jpg');\n\nconsole.log('\...
javascript
edit
0
0
mit
4bf2a5ca7593a2fa2b91a16d83b29bd33772d6bc
ritterim/ritter-jekyll
src/lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst through = require('through2');\nconst path = require('path');\nconst util = require('util');\n\nfunction injectReact() {\n return `\n ;const scope = window.__hmr = (window.__hmr || {});\n (function() {\n if (typeof win...
javascript
edit
0
1
mit
8e8b969e374026a09a5485b65ae8b4b8c19f7172
fraserxu/browserify-react-live,fraserxu/browserify-react-live,dariocravero/browserify-react-live,dariocravero/browserify-react-live,Kureev/browserify-react-live,fraserxu/browserify-react-live,gilesvangruisen/browserify-react-live,dariocravero/browserify-react-live
browserify/transform.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).on('ready', function() {\n\n $.ajax({\n cache: false,\n url: \"/partial-index.html\"\n }).done(function(response) {\n $('.main-container').html(response);\n });\n\n // Use navigator to detect Safari and render o...
javascript
edit
0
2
mit
9ebd1c8216e05b52569040de9821bf5696a4e81b
peternatewood/peternatewood.github.io,peternatewood/peternatewood.github.io,RoyTuesday/RoyTuesday.github.io,peternatewood/peternatewood.github.io,RoyTuesday/RoyTuesday.github.io
scripts/single-page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nseajs.config({\n base: './combo-map/'\n})\n\nseajs.on('fetch', function(data) {\n data.requestUri = data.uri.replace(/\\/(a|b|c)\\.js/, '/combo.js')\n})\n\n\ndefine(function(require) {\n\n var test = require('../../../test')\n var...
javascript
edit
0
1
mit
df672fde2e40d2d7cfcdfbd424dc56fd52f99706
chinakids/seajs,LzhElite/seajs,hbdrawn/seajs,imcys/seajs,FrankElean/SeaJS,treejames/seajs,zaoli/seajs,Gatsbyy/seajs,Lyfme/seajs,121595113/seajs,judastree/seajs,MrZhengliang/seajs,yern/seajs,ysxlinux/seajs,JeffLi1993/seajs,kaijiemo/seajs,uestcNaldo/seajs,tonny-zhang/seajs,FrankElean/SeaJS,Gatsbyy/seajs,uestcNaldo/seajs,...
tests/specs/extensible/combo-map/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport LoadingSpinner from '../utility/loading-spinner';\nimport PostItem from './post-item';\n\nclass PostList extends React.Component {\n shouldComponentUpdate(nextProps) {\n return this.props.postsRe...
javascript
edit
0
3
apache-2.0
77678d919e9418b82618225c9fafb368bd3d794d
evancorl/portfolio,evancorl/skate-scenes,evancorl/portfolio,evancorl/skate-scenes,evancorl/portfolio,evancorl/skate-scenes
imports/client/components/posts/post-list.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('bolt.auth', [])\n\n.controller('AuthController', function ($scope, $window, $location, Auth) {\n $scope.user = {};\n\n $scope.signin = function () {\n Auth.signin($scope.user)\n .then(function (token) {\n ...
javascript
edit
0
2
mit
1710985618cbf5356239e4f22e29975f96429020
elliotaplant/Bolt,thomasRhoffmann/Bolt,elliotaplant/Bolt,gm758/Bolt,boisterousSplash/Bolt,boisterousSplash/Bolt,gm758/Bolt,thomasRhoffmann/Bolt
client/app/auth/auth.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport { assertHas } from '../../helpers';\n\nexport default props => {\n assertHas(props, 'className');\n assertHas(props, 'icon');\n assertHas(props, 'title');\n assertHas(props, 'subtitle');\...
javascript
edit
0
1
mit
7cb1a3f1ea5829e3d39342642f3726ae9470c060
bnjbvr/kresus,ZeHiro/kresus,ZeHiro/kresus,ZeHiro/kresus,ZeHiro/kresus,bnjbvr/kresus,bnjbvr/kresus,bnjbvr/kresus
client/components/operations/amount-well.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction loadCreateScreen(parentUrl, collectionId, type, collectionData) {\n var isDataVis = false; // Flag for template to show correct options in select\n\n // Load data vis creator or ordinary publisher creator\n if (collect...
javascript
edit
0
1
mit
bc0ea691835aee4ae8542c65fb0c8361c6b93393
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
src/legacy/js/functions/_loadCreateScreen.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar AD = require('appdev');\nvar $ = require('jquery');\n\nmodule.exports = $.extend(AD.Comm, {\n pingServer: function(server) {\n return AD.Comm.HTTP.get({\n url: 'http://'+server+'/nsserver/ping'\n });\n ...
javascript
edit
0
1
bsd-3-clause
20f393f963d1168b551f47c57a5b4c995651b9db
appdevdesigns/NextSteps,appdevdesigns/NextSteps
Resources/app/comm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('app.controllers')\n\n.controller('optionsCtrl', function($scope, $location, OptionsService) {\n\n\t$scope.options = function(selectedOption){\n\t\tOptionsService.set(selectedOption);\n\t\t\n\t\tconsole.log('select option...
javascript
edit
0
1
mit
849ee726231d294d5e5f965df7106e53b7fedda4
dst-hackathon/calme,dst-hackathon/calme
www/js/controllers/optionsController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(document){\n\n function setStyle(style, param) {\n var range, sel;\n\n if (window.getSelection) {\n sel = window.getSelection();\n if (sel.getRangeAt) {\n range = sel.getRangeAt(0);\n }\n docu...
javascript
edit
0
4
mit
e255025baf3ab4b072e136284a0a5fc0e0ccad56
guilhermecomum/minimal-editor
assets/js/main.js
accepted
null
true