messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @export\n * @param {Object} store\n * @param {Object} state - Immutable state object\n */\nexport default function createDispatcher(store, state) {\n\n /**\n * Dispatches an action function\n * @param {Function} action\n ...
javascript
edit
0
4
mit
56f41c6ad3966c34fac01a6d0b32c320a0edcf34
M-Porter/small-state
src/dispatcher.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar redis = require('redis'),\n url = require('url'),\n redis = require('redis'),\n url = require('url'),\n redisURL = url.parse(process.env.REDISCLOUD_URL || 'redis://localhost:6379');\n\nexports.redisClient = redis.createC...
javascript
edit
0
1
mit
4934d408a62b169f7520c239f63f36b8f5941164
mattheworiordan/scriptstats,mattheworiordan/scriptstats
metrics/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global window*/\n(function(NS) {\n NS = NS || {};\n var isInBrowser = typeof module === 'undefined' && typeof window !== 'undefined';\n //Container for all the post renderings functions.\n var postRenderingHelpers = {};\n //Regis...
javascript
edit
0
5
mit
ebf967d7b8fd6eee2c74bdbddfaad81f55be78af
Jerom138/focus,Jerom138/focus,KleeGroup/focus-core,Jerom138/focus
lib/helpers/post_rendering_helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ncatalogApp.directive('assetThumb', function() {\n\n var linkFn = function ($scope, $elem, attrs) {\n\n }\n\n return {\n restrict: 'E',\n template: '<a href=\"#\" class=\"thumbnail\"><img ng-src=\"{{asset.Item.thumbImage}}\" alt...
javascript
edit
0
1
mit
83f935f968b714f25376fa9901a792f962889bb5
satbirjhuti/catalogFeed,satbirjhuti/catalogFeed
js/directives/thumbnail/thumbnail.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar PIXI = require('pixi.js');\n\nclass GameObject extends PIXI.Graphics {\n constructor(x, y) {\n super();\n this.modelx = x;\n this.modely = y;\n }\n\n getSpriteWidth() {\n //return document.body.c...
javascript
edit
0
1
mit
fa92e41f4f7d077b57c8af97a37bf3380bcc14f1
davidvollmar/ld33,davidvollmar/ld33
src/gameobject.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// As defined in https://github.com/mozilla/pdf.js/blob/master/src/shared/util.js#L378-L381\n\nconst PasswordResponses = {\n NEED_PASSWORD: 1,\n INCORRECT_PASSWORD: 2,\n};\n\nexport default PasswordResponses;\n\n```\n\nApply this chan...
javascript
edit
0
0
mit
569cfe9637b9c3871eb4f34d0bdfcb4bd0242c82
wojtekmaj/react-pdf,wojtekmaj/react-pdf,wojtekmaj/react-pdf
src/PasswordResponses.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n\tCopyright 2014 Google Inc. All Rights Reserved.\n\n\tLicensed under the Apache License, Version 2.0 (the \"License\");\n\tyou may not use this file except in compliance with the License.\n\tYou may obtain a copy of the License at\...
javascript
edit
0
0
apache-2.0
ad192daadb67a87db5e5ece52e6cdb8f76e3fe64
zmoshansky/sw-toolbox,T4RDIS/sw-toolbox,localnerve/sw-toolbox,GoogleChromeLabs/sw-toolbox,deebloo/sw-toolbox,GoogleChromeLabs/sw-toolbox,GoogleChromeLabs/sw-toolbox,T4RDIS/sw-toolbox,deebloo/sw-toolbox,localnerve/sw-toolbox,wibblymat/shed,zmoshansky/sw-toolbox
lib/options.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar questionData = require('../data/questions.json');\n\n// Filter invalid questions\n(() => {\n let invalid = 0;\n\n questionData.forEach((question, i) => {\n if (question.text === undefined || question.answer === undefined || que...
javascript
edit
0
4
mit
912475c4efcada5db8ad299e1f774bbfd3e6124f
puck7744/AES-Front-End-Test
src/QuestionSet.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst FeedParser = require('feedparser')\nconst iconv = require('iconv-lite')\nconst config = require('../config.js')\n\nclass DecodedFeedParser extends FeedParser {\n constructor (options, url) {\n super(options)\n this.url = ur...
javascript
edit
0
3
mit
afae3384b9733bf14b6a877fc7647146ff6ba3dd
synzen/Discord.RSS,synzen/Discord.RSS
src/structs/DecodedFeedParser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { configure } from 'enzyme'; // eslint-disable-line import/no-extraneous-dependencies\nimport Adapter from '@wojtekmaj/enzyme-adapter-react-17'; // eslint-disable-line import/no-extraneous-dependencies\nimport '@testing-library/j...
javascript
edit
0
1
mit
2aaf371f328373d7b2388c68bc0cd5ef93885f18
TulevaEE/onboarding-client,TulevaEE/onboarding-client,TulevaEE/onboarding-client
src/setupTests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction playGong() {\n\tvar sound = document.getElementById('sound');\n\tsound.currentTime = 0;\n\tsound.play();\n}\n\nfunction gongEnabled() {\n\t return $('#gongbutton').prop(\"checked\")\n}\n\nfunction gongClicked(event) {\n\tvar so...
javascript
edit
0
4
mit
620bafbb86bef59e8d78f325ffc3f03228632198
SpeedProg/eve-inc-waitlist,SpeedProg/eve-inc-waitlist,SpeedProg/eve-inc-waitlist,SpeedProg/eve-inc-waitlist
static/js/gong.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Fix warning for fields with no source and no label" }, { "role": "assistant", "content": "import inflection from 'inflection';\n\nexport default (label, source) => {\n if (typeof label !== 'undefined') return label;\n i...
javascript
new_file
0
3
mit
eaa1c54b119cfc2ff65df53a9ebe94ff424f5dff
matteolc/admin-on-rest,marmelab/admin-on-rest,matteolc/admin-on-rest,marmelab/admin-on-rest
src/util/title.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst assert = require('chai').assert;\nconst Bird = require('../lib/bird')\n\ndescribe (\"Bird\", function(){\n context('with default attributes', function(){\n var bird = new Bird();\n\n it('should assign an x value', function(...
javascript
edit
null
null
mit
d733e048c2158c836931a2540633d653b670ce8f
jeneve/typrr-burn,jeneve/typrr-burn
test/bird-test.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst renderer = new marked.Renderer();\nconst katexOpts = {\n throwOnError: false,\n errorColor: '#F44336',\n};\nrenderer.code = function(code) {\n const r = katex.renderToString(code, {\n displayMode: true,\n ...katexOpts,\n ...
javascript
edit
0
3
mit
a1025bed25d65183185f509b2ca556c0742f7466
phantamanta44/TeXDown,phantamanta44/TeXDown
static/js/main.js
rejected_duplicate
Near-duplicate of sample 95789
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { INIT_UNITS, UPDATE_UNIT_STATE, UnitStates } from '../constants/ActionTypes';\n\nconst initialState = {\n units: initUnits()\n}\n\nfunction initUnits() {\n let count = 35, units = [];\n let maxId = 0;\n for (let i = 0; i < c...
javascript
edit
0
5
mit
5ca12055433c001e2b5d555f3adef8766e325a0b
wangjiakun/react-redux-game-of-life,wangjiakun/react-redux-game-of-life
reducers/unitList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// TODO: clean-up\n\nvar abs = require( '@stdlib/math/base/special/abs' );\nvar divide = require( 'compute-divide' );\nvar mean = require( 'compute-mean' );\nvar subtract = require( 'compute-subtract' );\nvar sqrt = req...
javascript
edit
0
0
apache-2.0
7bd31bafdf0af53b49376dbea0c7a608d6f2dad2
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/math/base/special/sqrt/scripts/precision.js
rejected_duplicate
Near-duplicate of sample 78619
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['jquery', 'backbone', 'tiddlerFormView', 'hbt!Tiddler'],\n function ($, Backbone, TiddlerFormView, template) {\n return Backbone.View.extend({\n\n events: {\n 'click .edit-button': 'edit',\n ...
javascript
edit
0
1
mit
fae6f68c10807e4d204a0f7fbc6563f32f1f9a94
pads/TiddlyBone
assets/TiddlerView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njest.unmock('../priceInt');\n\ndescribe('priceInt', () => {\n it('creates a string with a $ in it', () => {\n const priceInt = require('../priceInt');\n expect(priceInt(\"$200\")).toBe(200);\n });\n});\n\n```\n\nApply this chang...
javascript
edit
0
1
mit
8f626ba5094958aa64fe650f7bc13161ae4d94e2
rachelober/magical-bedroom-products,rachelober/magical-bedroom-products
assets/javascripts/__tests__/calculateCartTotal-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Limit = function(keyName, ttl, maxLimit) {\n\n\t// {sourceName} inside the key name will be replaced by actual source name\n\t// {userID} inside the key name will be replaced by actual user ID\n\tthis.keyName = keyName || \"undefine...
javascript
edit
0
4
mit
1d2f6f16d2cdc2c06336ef4dbd776cfde6ab85c6
emiraydin/ratelimiter
ratelimiter/limit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar keystone = require('keystone'),\n\tTypes = keystone.Field.Types;\n\n// Create model. Additional options allow menu name to be used what auto-generating URLs\nvar ChildPlacementConsiderations = new keystone.List('Child Placement Cons...
javascript
edit
0
0
mit
ca4248003bb9906e065d962bf3feea429b8c1c71
autoboxer/MARE,autoboxer/MARE
models/List_ChildPlacementConsiderations.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst BotkitGActionsBot = require(__dirname + '/botkit');\nconst BaseController = require('../base-controler');\n\nmodule.exports = class GActionsController extends BaseController {\n get botkitType() {\n return 'google';\n }\n\n ...
javascript
edit
0
2
mit
32ed4aa528d4a9e3a3b6b230cb468450a64bc77f
AbbottPlatform/abbott-framework,AbbottPlatform/abbott-framework
lib/controllers/gactions/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n{\n \"name\": \"Transition end event\",\n \"authors\": [\"Ivan Nikolić\"],\n \"notes\": [{\n \"name\": \"Modernizr Methods documentation\",\n \"href\": \"http://modernizr.com/docs/#s25\"\n },\n {\n \"name\": \"Prefi...
javascript
edit
0
3
mit
05d148fc4f3813b1412c836325a9ca78c7a63f4d
niksy/modernizr-detects,niksy/modernizr-detects
feature-detects/transitionEndEvent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Simulates local storage on IE 6,7 using userData\",\n internal: true\n});\n\nPackage.on_use(function (api) {\n api.use('jquery', 'client'); // XXX only used for browser detection. remove.\n api.use('r...
javascript
edit
0
1
mit
75fbb90e8a2df775d9a33b8147ac10d80f2f8e2d
Profab/meteor,chasertech/meteor,calvintychan/meteor,DCKT/meteor,GrimDerp/meteor,jrudio/meteor,vjau/meteor,bhargav175/meteor,aldeed/meteor,karlito40/meteor,daltonrenaldo/meteor,jrudio/meteor,guazipi/meteor,DAB0mB/meteor,stevenliuit/meteor,ericterpstra/meteor,qscripter/meteor,modulexcite/meteor,cog-64/meteor,jenalgit/met...
packages/localstorage/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport styled from 'styled-components'\n\nimport rem from '../../utils/rem'\nimport { navbarHeight } from '../../utils/sizes'\nimport NavSeparator from './NavSeparator'\nimport Link from '../Link'\n\nconst Wra...
javascript
edit
0
1
mit
6cf267d403f01ab2c484bbe155c1daf2f489368c
styled-components/styled-components-website,styled-components/styled-components-website
components/Nav/NavLinks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { connection, UserModel, GroupModel } from './models';\n\n/**\n * The User class\n * @author Babatunde Adeyemi <<EMAIL>>\n * @class\n */\nclass PostIt {\n\n /**\n * Initializes the database connection\n * Initializes the dat...
javascript
edit
0
1
mit
4bcdcfc9f391f68ec48637fbf8420e14a42a3af6
tundewritescode/PostIt,tundewritescode/PostIt
server/src/postit.js
rejected_duplicate
Near-duplicate of sample 79653
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module(\"AdminHome\", []).controller(\"AdminHomeController\", function ($scope, $http) {\n $scope.competitionId = competitionId\n\n updateCompetitionList()\n\n $scope.addCompetition = function () {\n var competition = {nam...
javascript
edit
0
1
mit
9c35f64034e71616affddc3ffcf2565444c0e5d2
TechnoX/rcj-rescue-scoring,TechnoX/rcj-rescue-scoring
public/javascripts/admin_home.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar hello = \"Hi\";\nvar world = \"Earth\";\n[\n 1,\n 100000,\n -200,\n 1.2345,\n 1e100,\n -2e9837,\n Infinity,\n null,\n this,\n true,\n false,\n NaN,\n \"foo\",\n 'bar',\n \"this string isn't going to be short. Actually...
javascript
edit
0
1
mit
bceb8b4f61a975cef9888dd5a8762f5e287aa7f7
raydog/uglier
test/fixtures/literals.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"history\", function() {\n\tbeforeEach(function(done) {\n\t\tspyOn(chrome.runtime, \"sendMessage\").and.callThrough();\n\t\tdone();\n\t});\n\n\tit(\"expects to send a message requesting localStorage\", function(done) {\n\t\tre...
javascript
edit
0
1
mit
364313440bed3c41d4f77baa322faa1fe381b685
ptmccarthy/wikimapper,ptmccarthy/wikimapper
test/spec/history_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport chai, {expect} from 'chai';\nimport createApp from '../../src/app';\nimport dbFixtures from '../utils/dbFixtures';\n\ndescribe('App', function() {\n before(async function() {\n this.timeout(60000);\n await dbFixt...
javascript
edit
0
1
mit
450a619988ebe5f327f052ccd42f368646fcccfd
motiz88/jsgrest
test/integration/basic.js
rejected_duplicate
Near-duplicate of sample 92648
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\n\nclass ArrayItemIndex extends React.Component {\n static propTypes = {\n index: React.PropTypes.number,\n }\n\n renderStyles() {\n let styles = {\n root: {\n position: 'absolute',\n ...
javascript
edit
0
1
mit
0a1d925fa31a2ba32712aac656a56ae8a0142eae
apiaryio/attributes-kit,apiaryio/attributes-kit,apiaryio/attributes-kit
src/ArrayItemIndex/ArrayItemIndex.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n EditorState,\n convertFromRaw,\n CompositeDecorator,\n} from 'draft-js';\n\nimport Link, { findLinkEntities } from '../components/entities/link';\n\n\nconst defaultDecorators = new CompositeDecorator([\n {\n strategy: ...
javascript
edit
0
3
mit
ebab92b29670bad10ca32d5a0d1ec20e6049161f
brijeshb42/medium-draft,brijeshb42/medium-draft
src/model/content.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst path = require('path');\nconst defaults = require('./defaults');\nconst chain = require('../../utils/chain');\n\nconst tasks = [\n 'check-empty',\n 'copy-files',\n 'add-gitignore',\n 'npm-init',\n 'install-th...
javascript
edit
0
2
mit
ff7f9915b4a25d7e938d89a70c49ffa590da06ec
UKHomeOfficeForms/hof-generator,UKHomeOfficeForms/hof-generator
lib/cli/init/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Licensed under the Apache License, Version 2.0 (the “License”); you may not\n// use this file except in compliance with the License. You may obtain a copy of\n// the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n...
javascript
edit
0
2
apache-2.0
f0675977308ef809d1b70e7bb7f981f20ca31376
ctrine/webpack-settings,ctrine/webpack-settings
src/configs/webpack/rules/default.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n* Weibull distribution probability density function (PDF).\n*\n* @module @stdlib/math/base/dist/weibull/pdf\n*\n* @example\n* var pdf = require( '@stdlib/math/base/dist/weibull/pdf' );\n*\n* var y = pdf( 2.0, 0.5, ...
javascript
edit
0
0
apache-2.0
61eb09a244544948d76be5bd1b164c73b831f6a0
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
lib/node_modules/@stdlib/math/base/dist/weibull/pdf/lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport extend from 'extend'\n\nconst configs = {\n main: null,\n watch: false,\n}\n\nrebuild()\n\nexport default configs\n\nexport function rebuild(overrides) {\n const environment = process.env.NODE_ENV || 'development'\n configs.m...
javascript
edit
0
1
mit
3fc1b886908ed20ebeae4c18d4c026e03c6c33a3
rumps/core,rumps/rump
src/configs/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = inject\n\nfunction inject (bot) {\n bot.isAlive = true\n\n bot._client.on('respawn', (packet) => {\n bot.isAlive = false\n bot.emit('respawn')\n })\n\n bot._client.once('update_health', (packet) => {\n if(b...
javascript
edit
0
4
mit
c4ea87d1692e9df02f453ccb13982c82e45d63c0
PrismarineJS/mineflayer,andrewrk/mineflayer
lib/plugins/health.js
rejected_duplicate
Near-duplicate of sample 91739
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nmodule.exports = [\n {\n value: function(n2k) {\n return n2k.fields.Date.replace(/\\./g, '-') + \"T\" + n2k.fields.Time + \"Z\";\n },\n node: 'navigation.datetime'\n }\n]\n\n```\n\nApply this change: Make sure Date and...
javascript
edit
0
2
apache-2.0
b5d735ac0b41238b6aa68dacfc1223c293ab7201
SignalK/n2k-signalk
pgns/126992.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).on('ready', function() {\n\n $('#facebook').hover(\n function() { colorChange($(this), \"#4C66A4\") },\n function() { colorChange($(this), \"#393939\") }\n );\n\n $('#linkedin').hover(\n function() { colorChange(...
javascript
edit
0
1
mit
b2e7c1c4a45f901025aa31f75f0a9c13557f3bfe
Roomack/portfolio
scripts/amportfolio.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const SET_CONNECTING = `mercury/SET_CONNECTING`;\nexport const SET_CONNECTED = `mercury/SET_CONNECTED`;\n\nexport function updateStatusConnecting(value) {\n return {\n type: SET_CONNECTING,\n payload: value\n };\n}\n\nexp...
javascript
edit
0
7
mit
53f209a3eccf675b94274489a039ea15ed1c136c
adamweeks/react-ciscospark-1,Altocloud/alto-react-ciscospark,bzang/react-ciscospark,Altocloud/alto-react-ciscospark,bzang/react-ciscospark,ciscospark/react-ciscospark,adamweeks/react-ciscospark-1,ciscospark/react-ciscospark,adamweeks/react-ciscospark-1,bzang/react-ciscospark,Altocloud/alto-react-ciscospark,ciscospark/r...
packages/node_modules/@ciscospark/redux-module-mercury/src/actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as PIXI from 'pixi.js';\nimport { colorCode } from '../../helpers';\n\nimport { rendererSize } from '../../app';\n\nexport default function aboutBuilder (type = 'STARTUP') {\n let sprite = new PIXI.Graphics();\n\n makeBigBG(s...
javascript
edit
0
2
mit
e7ec05628628312d54eeee1d90ec127ef14b1a09
hexrcs/MIMAviz,hexrcs/MIMAviz
src/js/view/builders/aboutBuilder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * main.js\n *\n * We keep things simple here on the countryside. No complex\n * module loading or whatever using Browserify or RequireJS.\n * Just one plain, simple vanilla JavaScript file.\n */\n\n'use strict'\n\n// Only run in c...
javascript
edit
0
3
mit
cccca273f4bee5fcec81ebb42f3c714096b7fe69
frippz/frippz.se,frippz/frippz.se,frippz/frippz.se
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\tvar self = this;\n\tself.setGameType = function(type) {\n\t\t$('.game-container').removeClass('ad');\n\t\t$('.game-container').removeClass('ap');\n\t\t$('.game-container').removeClass('pro');\n\t\t$('.g...
javascript
edit
0
2
mit
b1c959653333f8bbb6aa7da7786e0922f227fdaf
chrissloey/LoL-2048,chrissloey/LoL-2048
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar NodeHelper = require(\"node_helper\");\nconst exec = require('child_process').exec;\nconst path = require('path');\nconst request = require('request');\n\nmodule.exports = NodeHelper.create({\n\n socketNotificationReceived: functio...
javascript
edit
0
3
mit
d74b088899337fa3f7b6afba8fded48b1a91fe30
OniDotun123/MirrorMirror,OniDotun123/MirrorMirror,OniDotun123/MirrorMirror
modules/recognizer/node_helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require(\"gulp\");\nvar sass = require(\"gulp-sass\");\nvar nano = require('gulp-cssnano');\n\ngulp.task(\"sass\", function () {\n gulp.src(\"./sass/**/*.scss\")\n .pipe(sass({\n //outputStyle: \"compress...
javascript
edit
0
1
mit
155d3969b1af58b04a86955263108ecfa0d9cdad
CivilApp/civil.css
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n jsdoc = require('gulp-jsdoc'),\n livereload = require('gulp-livereload'),\n docsSrcDir = './assets/js/**/*.js',\n docsDestDir = './docs/js',\n jsDocTask;\n\njsDocTask = function() {\n return...
javascript
edit
0
1
mit
441c2e578a641823ba7c3e312cfabd06cb5b6fdc
moneyadviceservice/dough,moneyadviceservice/dough,moneyadviceservice/dough,moneyadviceservice/dough
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Disallows the use of bare strings in a template\n//\n// passes:\n// <div>{{evaluatesToAString}}</div>\n//\n// breaks:\n// <div>A bare string</div>\n\nvar calculateLocationDisplay = require('../helpers/calculate-location-display');\n\...
javascript
edit
0
3
mit
dc3ba4cfc19dbee6d8b73f885a81f4d7724a93a1
rwjblue/ember-template-lint,oriSomething/ember-cli-template-lint,oriSomething/ember-template-lint,oriSomething/ember-cli-template-lint,rwjblue/ember-cli-template-lint,rwjblue/ember-cli-template-lint
ext/plugins/lint-bare-strings.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n uglify = require('gulp-uglify'),\n del = require('del'),\n karma = require('karma').server;\n\ngulp.task('minify', function () {\n return gulp.src('src/*.js')\n .pipe(uglify())\n ...
javascript
edit
0
1
mit
6c8349dc05afc726fd597ea7429c302f9a7b068e
krtnio/angular-xslt
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function() {\n return function({ addUtilities, variants, target }) {\n const wrapPropertyName = target('wordBreak') === 'ie11' ? 'word-wrap' : 'overflow-wrap'\n\n addUtilities(\n {\n '.break-normal': {\...
javascript
edit
0
1
mit
6bb7cd4e9ee9c129574fb94ce7b48458aa932018
tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindcss/tailwindcss,tailwindlabs/tailwindcss
src/plugins/wordBreak.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar program = require('commander');\nvar packageInfo = require('../package.json');\n\nvar jokes = require('./jokes.js');\nvar advice = require('./advice.js');\nvar resume = require('./resume.js');\n\nmodule.exports = fu...
javascript
edit
0
2
mit
8e792da2f0a96e0b70899e2e72a27836220da5ff
baer/eric-baer
lib/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* This should probably have ES6 to ES5 transpilation on when compiling to bookmarklet */\n\nconst version = '1.1';\n\nconst styles = `\nhtml, body, p, li, a, input, textarea, button, *:not([class*=\"icon\"] ) {\n font-family: system-u...
javascript
edit
0
0
mit
fae829f95655598a67848dc7b7f66ceb6641a451
alanhogan/bookmarklets,alanhogan/bookmarklets
force-system-font-stack.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//\n// Article\n//\n// The reason is not a plural form, because in accordance with the MongoDB manual.\n// http://docs.mongodb.org/manual/reference/operator/aggregation/project/\n//\n(function(coll){\n coll.remove();\n coll.insert({\n...
javascript
edit
0
1
mit
b86c68c6b0500c63c6d5db99ca0ae63f76ade04d
kjirou/mongo_tutorial,kjirou/mongo_tutorial
generator/scripts/tagged_articles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\n\nvar app = express();\n\napp.use(express.static(__dirname + '/public'));\n\napp.listen(3000);\n\n```\n\nApply this change: Use PORT env variable if set" }, { "role": "assistant", "content"...
javascript
edit
0
0
mit
bf32688c03283580e186d915a9d41e5116039752
CMS611-snap/snap-frontend,CMS611-snap/snap-frontend,CMS611-snap/snap-frontend
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst nodeExternals = require('webpack-node-externals');\nconst Dotenv = require('dotenv-webpack');\n\nmodule.exports = {\n entry: [\n 'babel-polyfill',\n './index.js',\n ],\n target: 'node',\n output: {\n libraryTarget: 'c...
javascript
edit
0
0
mit
c5d1176a688486049dea6bfc081251c492dd2f54
mgi166/serverless-image-resizer
webpack.config.js
rejected_duplicate
Near-duplicate of sample 93587
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar autoprefixer = require('gulp-autoprefixer');\nvar cleanCSS = require('gulp-clean-css');\nvar concat = require('gulp-concat');\nvar gulp = require('gulp');\nvar sass = require('gulp-sass');\...
javascript
edit
0
1
mit
fced4a5fc37b7c95969700ca4b2410993942edcc
tiere/turbo-couscous,tiere/turbo-couscous
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by cfiloteo on 11/17/15.\n */\nvar gulp = require('gulp'),\n\trename = require('gulp-rename'),\n\tjade = require('gulp-jade'),\n\tbabel = require(\"gulp-babel\");\n\ngulp\n\t.task('normalize', function() {\n\treturn g...
javascript
edit
0
1
mit
e3fe25dc50f8dac8bb9d8ce2791872cbf831d011
filoxo/NewbCSS,filoxo/NewbCSS
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst gulp = require('gulp');\nconst cp = require('child_process');\nconst babel = require('gulp-babel');\nconst less = require('gulp-less');\nconst cleanCss = require('gulp-clean-css');\nconst minifyJs = require('gulp-...
javascript
edit
0
2
mit
4faaf25de78e0e036140888b27b0c07e8f776381
vampiman/Hold-My-Beer,vampiman/Hold-My-Beer
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar tasks = [];\n\n// Browserify\nvar browserify = require('browserify');\nvar vinylSourceStream = require('vinyl-source-stream');\n\nvar makeBrowserify = function(source, destination, output) {\n gulp.task...
javascript
edit
0
1
mit
896ace422c3b604f35d62e9ecccda513ff70a7c5
florentpoujol/superpowers-dom-plugin
gulpfile.js
rejected_duplicate
Near-duplicate of sample 73368
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet mix = require('laravel-mix');\nlet build = require('./tasks/build.js');\n\nmix.disableSuccessNotifications();\nmix.setPublicPath('source/assets/');\nmix.webpackConfig({\n plugins: [\n build.jigsaw,\n build.browserSy...
javascript
edit
0
0
mit
464a4af7bccb0aff0fd302df8175e3816b2a4b2e
tightenco/jigsaw,tightenco/jigsaw,adamwathan/jigsaw,tightenco/jigsaw,adamwathan/jigsaw
stubs/mix/webpack.mix.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport './App.css';\nimport TravelObject from './Components/TravelObject'\n\nclass App extends React.Component {\n render () {\n return(\n <div className=\"App\">\n <TravelObject type='flight'/>\n...
javascript
edit
0
1
apache-2.0
4aaee5a73946fc9933c7a3a7e94923edb9fa434f
googleinterns/step98-2020,googleinterns/step98-2020
step-capstone/src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst expect = require('chai').expect;\nconst Loader = require('../modules/loader');\nconst config = require('../config');\nconst image = 'https://www.google.es/images/branding/googlelogo/2x/googlelogo_color_272x92dp...
javascript
edit
0
2
mit
5727eebefe64e8aa06538a30d691d0a493ab8374
bertez/postais
test/loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('services/auth', () => {\n let auth\n\n beforeEach(() => {\n let path = require.resolve('services/auth')\n if (require.cache[path]) {\n delete require.cache[path]\n }\n auth = require('services/auth').default...
javascript
edit
0
1
mit
f89fc296018ff1be05a32ce3d78b19efa47c402d
foodsharing-dev/foodsharing-light,foodsharing-dev/foodsharing-light,foodsharing-dev/foodsharing-light
test/unit/specs/services/auth.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar argv = process.argv.slice(2)\n , path = require(\"path\")\n , dir = path.resolve(argv[0])\n , testDir = require(\"../lib/test-dir\")\n\ntestDir(dir, !process.env.nodiag, function (er, total, ok) {\n if (er...
javascript
edit
0
2
isc
d52ea7b57ba74b86f7477f40283125dbb0018d11
isaacs/node-tap,tapjs/node-tap,iarna/node-tap,isaacs/node-tap,Dignifiedquire/node-tap-core,strongloop-forks/node-tap,myndzi/node-tap,Dignifiedquire/node-tap-core,othiym23/node-tap,substack/node-tap,evanlucas/node-tap,iarna/node-tap,jondlm/node-tap,evanlucas/node-tap,jkrems/node-tap,myndzi/node-tap,jkrems/node-tap,stron...
bin/tap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Route.extend({\n beforeModel: function() {\n var translations = Ember.Object.create({\n 'PAGINATION_DISPLAYING': 'Displaying',\n 'DEVICE_LIST_PAGINATION_LA...
javascript
edit
0
1
mit
7019cf94cc3bcc2914f7b457cf6e67edec3baba4
azizpunjani/sl-ember-components,azizpunjani/sl-ember-components,juwara0/sl-ember-components,theoshu/sl-ember-components,softlayer/sl-ember-components,alxyuu/sl-ember-components,notmessenger/sl-ember-components,erangeles/sl-ember-components,Suven/sl-ember-components,Suven/sl-ember-components,notmessenger/sl-ember-compon...
tests/dummy/app/routes/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint strict:false */\n\nvar app,\n express = require('express'),\n cors = require('cors');\n\napp = express();\n\napp.get('/getjson', cors(), function (req, res) {\n res.json({hello: 'world'});\n});\n\n// Echo the headers b...
javascript
edit
0
1
mit
a91d8aa5ed171b322e198a067cb83da67df85514
matthewwithanm/httpplease.js,matthewwithanm/httpplease.js
test/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nSwaggerUi.Views.BasicAuthButton = Backbone.View.extend({\n\n\n initialize: function (opts) {\n this.options = opts || {};\n this.router = this.options.router;\n },\n\n render: function(){\n var template = th...
javascript
edit
0
3
mit
d7e998ede763207fd38838295e3de48435191b04
Ibercheck/api-playground,Ibercheck/api-playground,Ibercheck/api-playground
src/main/javascript/view/BasicAuthButton.js
rejected_duplicate
Near-duplicate of sample 81568
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n ...
javascript
edit
0
3
mit
0fab691e6f43393b20fc87450dedcad07e76a4e1
satya164/react-native,PlexChat/react-native,pandiaraj44/react-native,facebook/react-native,satya164/react-native,brentvatne/react-native,tarkus/react-native-appletv,mironiasty/react-native,jhen0409/react-native,arthuralee/react-native,ptomasroos/react-native,martinbigio/react-native,tadeuzagallo/react-native,arthuralee...
website/core/HeaderWithGithub.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path')\n\nmodule.exports = {\n http: {\n port: process.env.DEV ? 8080 : 8050,\n favicon: path.join(__dirname, '../assets/favicon.ico')\n },\n server: {\n SSR: true, // Server side rend...
javascript
edit
0
0
mit
ab216825b9c651cc6aabb22fd205a60cee93aa9a
infernojs/inferno-website,infernojs/inferno-website
src/server/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\n// Styles\nimport './styles.scss';\n\nfunction ExploreDetailFooterComponent(props) {\n const { setSidebarAnchor } = props;\n\n return (\n <div className=\"c-explore...
javascript
edit
0
1
mit
43db937df2248a7981c385c5c4f2a42fe5aa3214
resource-watch/resource-watch,resource-watch/resource-watch,resource-watch/resource-watch,resource-watch/resource-watch
layout/explore/explore-detail/explore-detail-footer/component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport replaceScript from './replaceScript';\n\n/*\n * runs an array of async functions in sequential order\n */\nexport function seq(arr, index) {\n // first call, without an index\n if (typeof index === 'undefined') {\n index = 0...
javascript
edit
0
4
mit
6176333679d9c49cf39a080b87f9bcc138470fb5
lyw07/kolibri,indirectlylit/kolibri,lyw07/kolibri,learningequality/kolibri,indirectlylit/kolibri,learningequality/kolibri,mrpau/kolibri,mrpau/kolibri,indirectlylit/kolibri,lyw07/kolibri,lyw07/kolibri,indirectlylit/kolibri,learningequality/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri
packages/hashi/src/loadCurrentPage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport PostItemContainer from '../../containers/PostItemContainer'\nimport debounce from '../../util/debounce'\n\nclass PostList extends Component {\n constructor (props) {\n super(props)\n\...
javascript
edit
0
3
mit
464b4ce4287feeb63c4d27ee204baee242c215eb
antoinechalifour/Reddix,antoinechalifour/Reddix
src/components/subreddit/PostList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies\n */\n\n// Native\nconst path = require('path');\n\n// Externals\nconst co = require('co');\nconst render = require('koa-ejs');\n\n/**\n * EJS hook\n */\n\nmodule.exports = function(strapi) {...
javascript
edit
0
2
mit
fcf6e76804d897606ceeb4578f7ec4c209490429
wistityhq/strapi,wistityhq/strapi
packages/strapi-hook-ejs/lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport mysql from './mysql';\nimport postgresql from './postgresql';\nimport sqlserver from './sqlserver';\nimport cassandra from './cassandra';\n\n\n/**\n * List of supported database clients\n */\nexport const CLIENTS = [\n {\n ke...
javascript
edit
0
0
mit
ce35e999adb1d27c208563650f30f9135c5cd182
falcon-client/falcon-core,falcon-client/falcon-core,sqlectron/sqlectron-core
src/db/clients/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst handleErrors = (response) => {\n if (!response.ok) {\n if (response.message) {\n throw Error(response.message);\n }\n throw Error(response.statusText);\n }\n return response;\n};\n\nexport const getRepos = (userna...
javascript
edit
0
3
mit
24234f54980cad490076dac6bde22c79fc2e009e
msanatan/GitHubProjects,msanatan/GitHubProjects,msanatan/GitHubProjects
src/services/github.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar TagsSettingsMenuView = Ember.View.extend({\n saveText: Ember.computed('controller.model.isNew', function () {\n return this.get('controller.model.isNew') ?\n 'Add Tag' :\n 'Save Tag';\n }),\n\n ...
javascript
edit
0
4
mit
4fef0f8785960eb82c02b5ac64f8b136d145a111
acburdine/Ghost-Admin,airycanon/Ghost-Admin,TryGhost/Ghost-Admin,acburdine/Ghost-Admin,dbalders/Ghost-Admin,kevinansfield/Ghost-Admin,kevinansfield/Ghost-Admin,dbalders/Ghost-Admin,JohnONolan/Ghost-Admin,JohnONolan/Ghost-Admin,airycanon/Ghost-Admin,TryGhost/Ghost-Admin
views/settings/tags/settings-menu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Ionic Starter App\n\n// angular.module is a global place for creating, registering and retrieving Angular modules\n// 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)\n// the 2nd par...
javascript
edit
0
4
apache-2.0
18b55365843272136c0a31876cdf43fab4c53151
teerasej/Training-Ionic-MyAPI-App,teerasej/Training-Ionic-MyAPI-App
www/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nfunction resolvePath(pathToResolve) {\n return path.resolve(__dirname, pathToResolve);\n}\n\nmodule.exports = {\n lintOnSave: false,\n\n pages: {\n 'index': {\n entry: 'src/main.js',\n ch...
javascript
edit
0
1
mit
ad309059a14428c757bff286c1602d4603f1caf1
nextgensparx/quantum-router,nextgensparx/quantum-router
vue.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nfunction daysInMonth(month,year) {\n return new Date(year, month + 1, 0).getDate();\n}\n\nfunction kmhToDegsPerH(kmh) {\n return kmh / 111;\n}\n\nmodule.exports.daysInMonth = daysInMonth;\nmodule.exports.kmhToDegsPerH = kmhToDegsPer...
javascript
edit
0
1
mit
43fa2aac34085ab330fed1a3f395cbb5d1d5eda7
lucified/lucify-asylum-countries,lucified/lucify-asylum-countries,lucified/lucify-asylum-countries,lucified/lucify-asylum-countries
src/js/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport glob from 'glob';\n\nexport default function(importPattern) {\n return glob.sync(importPattern)\n .filter(fileName => fileName.match(/\\.js$/))\n .map(fileName => {\n console.log(fileName);\n return require(fileN...
javascript
edit
0
1
mit
be69c4850655fe665bc142afe78d1e39403946f4
charlieschwabacher/gestalt,charlieschwabacher/gestalt
packages/gestalt-cli/src/import-glob.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass KasenIterator {\n constructor(iter, func) {\n this.iter = iter;\n this.func = func;\n }\n\n // eslint-disable-next-line class-methods-use-this\n next() {\n throw new Error(\"not implemented\");\n }\n\n // eslint-dis...
javascript
edit
0
3
mit
e4cc4dc14ddecf74af18db3e6ce97a9762dc999d
ttokutake/js-kasen
src/iterator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = o => `<head>\n <title>Tennisvuorot Helsingissä</title>\n <meta charset=\"utf-8\"/>\n <meta name=\"apple-mobile-web-app-capable\" content=\"yes\"/>\n <link rel=\"apple-touch-icon\" href=\"tennisBall.png\"/>\n...
javascript
edit
0
1
apache-2.0
f75dddc06513a4d44e29b720dd9a4fd30fd6e144
eeroan/tennisvuorot,eeroan/tennisvuorot,eeroan/tennisvuorot,eeroan/tennishelsinki,eeroan/tennishelsinki
src/head.html.js
rejected_duplicate
Near-duplicate of sample 75633
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n\n // show tooltip on hover\n tooltip();\n\n // do avoid clickable table cell if there is an action within\n $('table.selectable-table td').click(function () {\n\n var href = $(this).find('a').attr('href');\n ...
javascript
edit
0
2
apache-2.0
1818a443d020f38df0d2afcb8e975c9ca26e433e
synyx/urlaubsverwaltung,Intera/urlaubsverwaltung,synyx/urlaubsverwaltung,pongo710/urlaubsverwaltung,pongo710/urlaubsverwaltung,synyx/urlaubsverwaltung,Intera/urlaubsverwaltung,synyx/urlaubsverwaltung,Intera/urlaubsverwaltung,pongo710/urlaubsverwaltung
src/main/resources/static/js/actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {element} from 'deku';\n\nimport Editor from './editor';\nimport Menu from './menu';\nimport Panel from './panel';\n\nfunction render({props, state}, setState) {\n console.log({props, state});\n\n if (!state.trees) {\n state...
javascript
edit
null
null
mit
4f8e972e31bc8041218bee70211d06307d218939
foray1010/Popup-my-Bookmarks,foray1010/Popup-my-Bookmarks
js/_components/pmb.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport ReactDOMServer from \"react-dom/server\";\nimport { Route, StaticRouter } from \"react-router\";\nimport config from \"config\"; // Aliased through webpack\nimport paths from \"../paths\";\nimport Bo...
javascript
edit
0
2
mit
1e50f6bf8613eb163decd4c590db12fd004a9173
antwarjs/antwar
packages/antwar/src/build/render_page.js
rejected_duplicate
Near-duplicate of sample 89140
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport test from 'ava'\n\nimport { ConfigService } from '../../../src/services/config'\n\ntest('test', t => {\n t.deepEqual([1, 2], [1, 2])\n})\n\n```\n\nApply this change: Add tests for configFileExist & configData methods" }, { ...
javascript
edit
0
1
apache-2.0
f393c4224e9ccc9e876b8129958a3e506459b97e
Mindsers/configfile
tests/services/config/config.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\nvar express = require('express'),\n app = express(),\n config = require('./libs/config'),\n router = require('./routes'),\n SerialPort = require('serialport').SerialPort,\n serialPort = new SerialPort(config...
javascript
edit
0
2
unlicense
6b64839432cf0b9d296df5a704001519f820035f
familab/accessController,familab/accessController
api/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2016 Google Inc. 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 a copy of...
javascript
edit
0
0
apache-2.0
206e1580c6ed739de31d685f15a5b27ed2f86e3c
foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2,foam-framework/foam2
src/foam/u2/HTMLElement.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Mithril component which embeds four iframes with HTML videos\n\nconst MyComponent = {\n view(controller, args) {\n return m(\"div.ba.ma3.pa3.bg-light-purple\", [\n // Passengers 2016 - Starship Avalon Slingshot A...
javascript
edit
0
1
mit
4728c61e886a41e272b39163aa980d03f69ec0d1
pdfernhout/Twirlip7,pdfernhout/Twirlip7,pdfernhout/Twirlip7
src/ui/examples/iframe-example-video.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path')\n , fs = require('fs')\n , clone = require('clone')\n , data = require('./data')\n , getset = require('deep-get-set')\n , DeepMerge = require('deep-merge')\n , merge = DeepMerge(function(a, b) {\n r...
javascript
edit
0
2
mit
b7d66827c703e2f437ddbb81f090a6c01d9349b3
jaredhanson/node-decisions
lib/file.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nangular.module('config', [])\n .constant('config', {\n 'endpoint' : \"http://\"+window.location.hostname+\":8080\",\n 'provider' : \"basic\", // google, github, gitlab, keycloak, pingfederate, saml2 or basi...
javascript
edit
0
0
mit
c2f9f8ac9e4621d9eb96faf9b6072d67b36d310f
alerta/angular-alerta-webui,alerta/angular-alerta-webui,alerta/angular-alerta-webui
app/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Kinvey } from 'kinvey-javascript-sdk-core';\nimport { NetworkRack } from 'kinvey-javascript-sdk-core/build/rack/rack';\nimport { SerializeMiddleware } from 'kinvey-javascript-sdk-core/build/rack/middleware/serialize';\nimport {...
javascript
edit
0
1
apache-2.0
67363d5b811988f91084350d47e5d960d921b627
Kinvey/kinvey-angular-lib
src/provider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = asyncMap\nfunction asyncMap (list, fn, cb_) {\n var n = list.length\n , results = []\n , errState = null\n function cb (er, data) {\n if (errState) return\n if (er) return cb_(errState = er)\n results.p...
javascript
edit
0
8
isc
9be42103f41062a9ebe6aca82373a861438d76da
npm/slide-flow-control
lib/async-map.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//@flow\n\n/*******************************************************************************\n * Imports\n *******************************************************************************/\n\nimport React from 'react'\n\n/****************...
javascript
edit
0
1
mit
dff4c126e28721d23a6193e69e6ddd77b529be7b
ostera/tldr.jsx,ostera/tldr.jsx,ostera/tldr.jsx,ostera/tldr.jsx
src/components/Version.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (root, factory) {\n if(typeof define === 'function' && define.amd) {\n define(['knockout'], factory);\n } else {\n factory(root.ko);\n }\n}(this, function(ko) {\n ko.bindingHandlers.bindHtml = {\n update: function...
javascript
edit
0
3
mit
24af353a9acc95352691942bb40092d0e6a5b600
calvinwoo/knockout-bind-html
knockout-bind-html.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Code style test\n */\n\n/**\n * Module dependencies\n */\nvar helper = require('./helper');\n\n/**\n * Lint own code\n *\n * @param test\n */\nexports.MakeLint = function (test) {\n helper.testConsoleOutput(\n 'make',\n ['...
javascript
edit
0
1
mit
a74cb31a7a569c79677c13db60c503753afaf2a7
Sannis/wikimapia-api-clients,Sannis/wikimapia-api-clients,Sannis/wikimapia-api-clients,Sannis/wikimapia-api-clients,Sannis/wikimapia-api-clients
test/test-lint-code.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @overview A module that initializes the Gallery with Flickity\n * @module Gallery.js\n*/\n\nimport Flickity from 'flickity';\nimport { ImgixSettings } from '../media/ImgixSettings';\n\nexport const Gallery = {\n\n /**\n * Set...
javascript
edit
0
2
mit
c566ad878642f4e68df10280ba33782ac8e698cd
CasperSleep/nightshade-core,CasperSleep/nightshade-core
src/gallery/Gallery.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe(\"About Expects\", function() {\n\n //We shall contemplate truth by testing reality, via spec expectations. \n it(\"should expect true\", function() {\n expect(true).toBeTruthy(); //This should be true\n });\n\n //To un...
javascript
edit
0
1
mit
943b8c139afda5c854a574dc9c95807554a7f0c3
cflann/javascript-koans,cflann/javascript-koans,cflann/javascript-koans
koans/AboutExpects.js
rejected_duplicate
Near-duplicate of sample 71488
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//the list of servers we can access\nconst serverPaths = [\n 'http://malmo.lizenn.net:8080',\n 'http://localhost:8080',\n 'http://localhost:8081',\n 'http://malmo.lizenn.net:8082',\n]\n\n//the adress used internally in the applicati...
javascript
edit
0
0
mit
febf457825685c92b8484867ced0cd749f1a06d4
occiware/OCCInterface,occiware/OCCInterface,occiware/OCCInterface
conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// At max, each shard should have ~2500 servers \n// This is used for when you get your bot on a ton of servers. \n\nconst Discord = require(\"discord.js\");\nconst Manager = new Discord.ShardingManager(\"./swgohBot.js\"); // Tell it ...
javascript
edit
0
1
mit
ba75cc5e6bd75e30a430c2b56c0dfb5f0fa3ba1a
jmiln/SWGoHBot
swgohBotShard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport thunk from \"redux-thunk\";\nimport { combineReducers, createStore, applyMiddleware, compose } from \"redux\";\nimport _gluestick from \"./reducers\";\nimport promiseMiddleware from \"../lib/promiseMiddleware\";\n\nexport default...
javascript
edit
0
7
mit
414ecc824064ab84429a15ba107d35426efffc5f
TrueCar/gluestick-shared,TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick
src/lib/createStore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n Simple example that takes a command line provided serial port destination and routes the output to a file of the same name with .log appended to the port name.\n \n usage: node logger.js /dev/tty.usbserial <baudrate>\n \n*/\n\n...
javascript
edit
0
3
mit
92b72372d7b80d3d01a61b5503e3493b9b1533c1
alex1818/node-serialport,alex1818/node-serialport,ms-iot/node-serialport,AlexeyPopov/node-serialport,tigoe/node-serialport,jacobrosenthal/node-serialport,bfjelds/node-serialport,AlexeyPopov/node-serialport,suda/node-serialport,tmpvar/node-serialport,pr0duc3r/node-serialport,node-serialport/node-serialport,kt3k/node-ser...
examples/logger.js
accepted
null
true