messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport Document, { Head, Main, NextScript } from 'next/document'\nimport { JssProvider, SheetsRegistry } from 'react-jss'\n\nexport default class SSRDocument extends Document {\n static getInitialProps ({ ren...
javascript
edit
0
2
mit
80a1f0ae74dc1e080236845667ffa32eed252f0b
u-wave/hub
client/pages/_document.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar browserify = require('browserify');\nvar watchify = require('watchify');\nvar gulp = require('gulp');\nvar gutil = require('gulp-util');\nvar source = require('vinyl-source-stream');\nvar reactify = require('reactify');\n\nfunction ...
javascript
edit
0
3
mit
b726c4d468aed786b534b47741c9a8aca0b812b7
mbalamat/ting,VitSalis/ting,gtklocker/ting,sirodoht/ting,VitSalis/ting,odyvarv/ting-1,mbalamat/ting,dionyziz/ting,VitSalis/ting,gtklocker/ting,sirodoht/ting,gtklocker/ting,dionyziz/ting,mbalamat/ting,sirodoht/ting,dionyziz/ting,sirodoht/ting,mbalamat/ting,odyvarv/ting-1,VitSalis/ting,dionyziz/ting,gtklocker/ting,odyvar...
client/gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar moment = require('moment');\n\nvar _floor = function(val) {\n return Math.floor(val);\n};\n\nvar Formatters = {\n speed: function(speed) {\n var str;\n speed *= 8;\n if (speed > 1024 * 1024) str = _floor(s...
javascript
edit
0
3
mit
d9064b5e503138be1b657cb6be57e83923817f1e
leeroybrun/node-mt-files-downloader
lib/Formatters.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Paper.js - The Swiss Army Knife of Vector Graphics Scripting.\n * http://paperjs.org/\n *\n * Copyright (c) 2011 - 2014, Juerg Lehni & Jonathan Puckey\n * http://scratchdisk.com/ & http://jonathanpuckey.com/\n *\n * Distributed u...
javascript
edit
0
1
mit
bfbe0b31478fedf66975ecd01760df70a6e05ceb
lehni/paper.js,byte-foundry/paper.js,byte-foundry/paper.js,lehni/paper.js,iconexperience/paper.js,iconexperience/paper.js,byte-foundry/paper.js,iconexperience/paper.js,lehni/paper.js
test/tests/TextItem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\njQuery(document).ready(function($) {\n var container = $('#splashing_images');\n $.LoadingOverlaySetup({\n color : \"rgba(241,241,241,0.8)\",\n maxSize : \"80px\",\n minSize : \"20px\...
javascript
edit
0
2
mit
98339c030b63a5befcee41d5d2a26642f93fed40
studioespresso/craft-unsplash,studioespresso/craft-unsplash,studioespresso/craft-unsplash
unsplash/resources/js/Unsplash_Script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\nvar less = require('../thirdparty/less');\n\nmodule.exports = fixUrls;\nfunction fixUrls(getURL) {\n less.tree.URL.prototype.genCSS = function (env, output) {\n output.add(\"url(\");\n\n...
javascript
edit
0
8
mit
2fe6ffeae37299469ad1aea39a9ef12ff5336f50
ForbesLindesay/less-file,ForbesLindesay/less-file
lib/url-fixer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nSettings = {\n chart: {\n padding: { right: 40, bottom: 100 },\n margins: { top: 30, bottom: 0, right: 35 },\n dots: {\n size: 5,\n color: '#378E00',\n opacity: 0.7\n }\n },\n defaultData: {\n title: 'Sc...
javascript
edit
0
1
mit
1a1a40f3065b038d3390f83f7405a864cfd0adc0
berkmancenter/internet_dashboard,blaringsilence/internet_dashboard,berkmancenter/internet_dashboard,berkmancenter/internet_dashboard,blaringsilence/internet_dashboard
packages/imon-scatter/imon_scatter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyons-borders/package.json')\nvar moduleCss = fs.read...
javascript
edit
0
0
mit
bd84e1f726412af6879937dff335c0d3302837e5
matyikriszta/moonlit-landing-page,tachyons-css/tachyons,fenderdigital/css-utilities,pietgeursen/pietgeursen.github.io,topherauyeung/portfolio,topherauyeung/portfolio,getfrank/tachyons,topherauyeung/portfolio,cwonrails/tachyons,fenderdigital/css-utilities
lib/borders.js
rejected_duplicate
Near-duplicate of sample 67327
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @fileoverview script.js - JS Orrery - A CS323 Assignment\n * @author Ben Brooks (<EMAIL>)\n * @version 1.0\n */\n\nvar gl;\n\nfunction init() {\n canvas = document.getElementById('canvas');\n gl = initWebGL(canvas);\n initSce...
javascript
edit
0
1
mit
165356c7437c8e4404fab4e51629623cb4e3fd0c
bbrks/webgl-orrery,bbrks/webgl-orrery
script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport appendPxIfNeeded from './append-px-if-needed';\nimport camelCasePropsToDashCase from './camel-case-props-to-dash-case';\nimport mapObject from './map-object';\nimport {getPrefixedStyle} from './prefixer';\n\nfuncti...
javascript
edit
null
null
mit
40580a38cc596569ba542b1c88310c9b9a77c58f
MicheleBertoli/radium,FormidableLabs/radium,nfl/radium
src/css-rule-set-to-string.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node:true, browser:true */\n\n'use strict';\n\nvar Output = require('./output');\nvar output = null;\n\n/**\n * Try to request MIDI access, and select first\n * defined output. Will fail if no output is available or\n * if MIDI...
javascript
edit
0
3
mit
6fcd411edeac835ef45b09e73853ad20946d9767
MattouFP/midijs,FlatIO/midijs,eriser/midijs,matteodelabre/midijs,corentingurtner/midijs
lib/connect.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react';\n\n// Styles\nimport './footer.css';\n\nclass Footer extends PureComponent {\n render() {\n return <footer className=\"Footer pa3 flex justify-between f7\">\n <p className=\"ma0\">\...
javascript
edit
0
1
apache-2.0
4e810e9fd1136e524442034d2c419fd9658cf3cb
Angelmmiguel/discuzzion,Angelmmiguel/discuzzion,Angelmmiguel/discuzzion
client/src/components/Footer/Footer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// copy card id on click\nconst input = document.createElement('input');\ndocument.body.appendChild(input);\n\ndocument.addEventListener('click', (e) => {\n\n\tconst elem = e.originalTarget;\n\tconst isCardShortId = elem.classList.conta...
javascript
edit
0
2
mit
1960527b865f33d41fdc55043ae30e48c35fbf20
alex-pl/trello-card-id
script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Translation configuration\n */\nfunction translationConfig($translateProvider) {\n $translateProvider.useStaticFilesLoader({\n prefix: '/locale/locale-',\n suffix: '.json'\n });\n\n $translateProvider.useSanitizeValueSt...
javascript
edit
0
1
mit
1613c356e2293cbcd3248943b5ba961f234029bd
BenjaminBini/dilemme,BenjaminBini/dilemme
public/app/config/translation.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = module.exports = express.Router();\nvar path = require('path');\n\nvar appDir = path.join(__dirname, 'app');\n\nrouter.get('/', function(req, res) {\n res.render('index');\n});\n\n\n```\n...
javascript
edit
0
1
mit
dfe76dd56642cbb6642a9a3776e407647f6ca1ba
szekelyszilv/hackkings2015,SomeRandomTeam/hackkings2015,SomeRandomTeam/hackkings2015,szekelyszilv/hackkings2015,szekelyszilv/hackkings2015,SomeRandomTeam/hackkings2015
router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express')\nvar requireAll = require('./lib/require-all')\n\ncontrollers = requireAll({\n dirname: __dirname + '/app/controllers',\n filter: /(.+)\\.js(on)?$/\n})\n\nvar app = express()\n\nrequire('./config/initi...
javascript
edit
0
0
isc
3d743bd42df2c9956cd831bb0f354cf03dd925de
zealord/gatewayd,crazyquark/gatewayd,crazyquark/gatewayd,whotooktwarden/gatewayd,xdv/gatewayd,Parkjeahwan/awegeeks,xdv/gatewayd,zealord/gatewayd,Parkjeahwan/awegeeks,whotooktwarden/gatewayd
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar util = require('util');\nvar events = require('events');\nvar ServiceObject = require('./service_object');\n\nvar Service = module.exports = function(bus, serviceName) {\n\tvar self = this;\n\n\tself.bus = bus;\n\...
javascript
edit
0
2
mit
b3042d51f1ac88caf67804cf90d421ab5884144e
Shouqun/node-dbus,Shouqun/node-dbus,Shouqun/node-dbus
lib/service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst createTab = id => {\n browser.notifications.clear(id)\n browser.tabs.create({\n url: 'https://worldbrain.helprace.com/i34-feature-tagging',\n })\n}\n\nconst updateNotification = () => {\n browser.notifications.c...
javascript
edit
0
1
mit
b36147f7aa446442bc29136d9b2e7c9adba5cfdc
WorldBrain/WebMemex,WorldBrain/WebMemex
src/util/update-notification.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true, asi: true, laxcomma: true, esversion: 6 */\n'use strict'\n\nvar path = require('path');\nvar ghost = require('./ghost-middleware.js');\n\nconst express = require('express')\nconst app = express()\n\n//ghost({\n //...
javascript
edit
0
2
mit
b909dbb77952ee076e66062397f5c0e4752a8be7
enlore/rayna-corporation-ghost-theme,enlore/rayna-corporation-ghost-theme
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet requireAsHash = require('../utils/require-as-hash'),\n Command = require('../models/command'),\n commands = requireAsHash('../commands/*.js', Command),\n CLI = require('./cli');...
javascript
edit
0
1
mit
1ba7aae72e48b60e30998287626e6c6b2c86d7d2
reactcli/react-cli,reactcli/react-cli
lib/cli/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n---\n---\nwindow.search_data = {\n {%- assign documents = site.documents | concat: site.pages %}\n {%- for document in documents %}\n {%- unless document.title %}{% continue %}{% endunless %}\n \"{{ document.url }}\": {\n \"title...
javascript
edit
null
null
mit
1df4721a177e2d89b7e1e2585473c978b3cd6cc4
thelounge/thelounge.github.io,thelounge/thelounge.github.io,thelounge/thelounge.github.io
js/search_data.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nexport const getCKEditorDocumentId = (documentId, userId, formType) => {\n if (documentId) return `${documentId}-${userId}-${formType}`\n return `${userId}-${formType}`\n}\n\nexport function generateTokenRequest(documentId, userId, ...
javascript
edit
0
4
mit
f2d3428a7e15f35d5c68da0030baee0bffcfc505
Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2
packages/lesswrong/lib/ckEditorUtils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nconst router = require('express').Router();\nconst SpotifyController = require('./SpotifyController');\nconst controller = new SpotifyController();\n\nconst validParams = ['song', 'artist'];\n\n/**\n * Middleware layer th...
javascript
edit
null
null
mit
5905c45d0f94187ea533721d3f45a74e1aa13b49
a-rmz/sbotify
src/lib/spotifyRouter.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// if you don't specify a html file, the sniper will generate a div\nvar app = require(\"ProtVista\");\nnew app(\n {\n el: yourDiv, text: 'biojs',\n uniprotacc : 'P05067',\n customDataSource: {\n url: ...
javascript
edit
0
0
apache-2.0
cdf43814c913e300cfa669ca7fb2b66b05c46c19
ebi-uniprot/biojs-vis-proteinFeaturesViewer,ebi-uniprot/ProtVista,ebi-uniprot/ProtVista,ebi-uniprot/biojs-vis-proteinFeaturesViewer
snippets/with_external_data.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar request = require('request');\nmodule.exports = function(bot){\n\tbot.addCommand('define', 'Define', '[<keyword>]', USER_LEVEL_NORMAL, false, function(event){\n\t\tvar keyword = event.params.join('+');\n\t\trequest('http://api.urban...
javascript
edit
0
4
mit
8f0599ec678b5e1ad456e05e9ac10badf24723d5
datagutt/YattaBot,datagutt/YattaBot
plugins/urban.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global ga */\n\nvar eventTracking = (function() {\n\n 'use strict';\n\n // http://blog.gospodarets.com/track_javascript_angularjs_and_jquery_errors_with_google_analytics/\n var _sendErrorsToGoogleAnalytics = function () {\n win...
javascript
edit
0
6
mit
3f87af4d9ae25131200ea593da34083004c6b32f
davidensinger/webworke.rs,davidensinger/webworke.rs,davidensinger/webworke.rs
app/scripts/_modules/event-tracking.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport {module, test} from 'qunit';\nimport startApp from 'unicodeparty/tests/helpers/start-app';\n\nlet application;\n\nfunction getChars() {\n return new Set(Ember.$('.emoji-char').toArray().map(el => el.i...
javascript
edit
0
1
mit
275139474b9b222f244c7c076459209dc14c801a
TruthfulTechnology/unicode.party,TruthfulTechnology/unicode.party
tests/acceptance/search-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\n// var dbUrl = 'mongodb://username:password@mongodb:port/database';\n// var dbUrl = process.env.MONGO_DB_URL; // AWS\n// var dbUrl = process.env.MONGODB_URI; // Heroku\nvar dbUrl = 'mongodb://localho...
javascript
edit
0
1
mit
33c1e6f2449a4d62fb8bd5150b6dfa0d05fd1b9d
brightparagon/personal-web,brightparagon/personal-web
mongodb/connection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n\tvar impl = document.implementation;\n\tvar mother;\n\tif (impl && impl.createHTMLDocument) {\n\t\tif (impl.custom) return;\n\t\tmother = impl.createHTMLDocument(\"\");\n\t} else {\n\t\tmother = document.createElement('i...
javascript
edit
0
4
mit
4d03df6a910e5bee7bb8e619d7e8d2cc0965be1a
kapouer/bundledom
createHTMLDocument.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\n'use strict';\n\nvar path = require('path');\n\nfunction getTaskConfig(projectConfig) {\n\t// Browser Sync options object\n\t// https://www.browsersync.io/docs/options\n\n\tvar taskConfig = {\n\t\t// Files to ...
javascript
edit
0
1
mit
3cf2e5d0b6df1943b7201f360a2d7c88e5eeb81b
cartridge/cartridge-local-server
_config/task.local-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** Created by hhj on 1/26/16. */\nexport default function loadEnv(envFile) {\n let env\n if (process.env.IS_BROWSER !== true) {\n const fs = require('fs')\n const nodeEnv = process.env.NODE_ENV === 'production' ? 'production' :...
javascript
edit
0
4
mit
3540768687b5f6d4d87e92d5d615bb23d72bcd68
hhjcz/too-simple-react-skeleton
src/shared/lib/loadEnv.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n// ---------------------------------------------------------------------------------------------------------------------\n// This script is intended to automate the versioning and changelog generation process for a ...
javascript
edit
0
1
apache-2.0
bfc933299c3c73bee4dda806fe4eace129786772
postmanlabs/postman-sandbox
npm/create-release.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar moduleSrc = ['module-name.js'];\nvar specDir = 'spec';\nvar specs = specDir + '/**/*spec.js';\nvar gulpTasks = ['gulpfile.js', 'gulp/**/*.js'];\nvar allSrc = moduleSrc.concat(specs).concat(gulpTasks);\n\nmodule.expo...
javascript
edit
0
0
mit
3824644fe2501f179f830e9240e0682d7f3deeb6
gerrypower/js-template-node
gulp/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nglobal.__onUncaughtError = function(error){\n\tif(error.nativeException){\n\t\t__log(\"err.message: \" + error.message);\n\t\t__log(\"err.stackTrace: \" + error.stackTrace);\n\t\t// false == do not continue execution\n\t\treturn false;\...
javascript
edit
0
2
apache-2.0
7d66b909e19552f95d0001d03bf3a1a0276ac7b3
NativeScript/android-runtime,NativeScript/android-runtime,NativeScript/android-runtime,NativeScript/android-runtime,NativeScript/android-runtime,NativeScript/android-runtime,NativeScript/android-runtime
test-app/assets/app/bootstrap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {resolveRoles} from '@sanity/resolver'\nimport isPlainObject from 'lodash/isPlainObject'\nimport merge from 'lodash/merge'\n\nlet resolving = false\nconst waiting = []\nconst roleName = 'variables:@sanity/base/style'\n\nfunction ...
javascript
edit
0
4
mit
97c8d78b2c28545d809930cb06071135dbe219b2
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
packages/@sanity/server/src/getStyleVariables.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst Sequelize = require('sequelize');\n\n// projects-model.js - A sequelize model\n//\n// See http://docs.sequelizejs.com/en/latest/docs/models-definition/\n// for more of what you can do here.\n\n\nmodule.exports = fun...
javascript
edit
0
1
mit
bef632ccaefdcc7bbd8409968b9f1c0c07d3bf7f
Resourceful-Redwoods/MVPme,Resourceful-Redwoods/MVPme
src/services/projects/projects-model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Load the http module to create an http server.\nvar http = require('http');\n\n// Configure our HTTP server to respond with Hello World to all requests.\nvar server = http.createServer(function (request, response) {\n response.write...
javascript
edit
0
2
mit
8c9d3634633352bd22db8552ecc206a5f9b8ded1
thenewtricks/docker-hello-world-nodejs,thenewtricks/docker-hello-world-nodejs
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n module.exports.register = function(Handlebars, options) {\n var fs = require('fs')\n , path = require(\"path\")\n , _ = require('lodash')\n\n /*\n * Usage: {{ include [partial] }}\n */\n ...
javascript
edit
0
4
mit
a3ba63ca9e71213fc9e58c0d8ffa6b63db1460c1
neemzy/putaindecode.fr,revolunet/putaindecode.fr,putaindecode/putaindecode.fr,pdoreau/putaindecode.fr,neemzy/putaindecode.fr,pdoreau/putaindecode.fr,skinnyfoetusboy/putaindecode.fr,neemzy/putaindecode.fr,putaindecode/putaindecode.fr,revolunet/putaindecode.fr,skinnyfoetusboy/putaindecode.fr,putaindecode/putaindecode.fr,...
src/_helpers/helper-include.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar addCommas = require('add-commas')\nvar columnify = require('columnify')\nvar minimist = require('minimist')\nvar npmme = require('./')\n\nvar argv = minimist(process.argv.slice(2), { boolean: 'p' })\nif (...
javascript
edit
0
2
mit
f7319db219a5fd4cd2df621a8bf273dd6a4023b8
KenanY/npm-me,hughsk/npm-me
cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Vector2 from 'flockn/types/vector2';\n\nclass Rect {\n constructor(x = 0, y = 0, w = 0, h = 0) {\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n }\n\n toString() {\n return JSON.stringify({\n x: t...
javascript
edit
0
4
mit
bc68ba5b353f85493443585bd38ba58859699585
freezedev/flockn,freezedev/flockn
src/types/rect.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyons-max-widths/package.json')\nvar moduleCss = fs.r...
javascript
edit
0
0
mit
dd8e569904438a2a9d3657c12b8eff54d7f4d153
fenderdigital/css-utilities,topherauyeung/portfolio,topherauyeung/portfolio,matyikriszta/moonlit-landing-page,topherauyeung/portfolio,fenderdigital/css-utilities,getfrank/tachyons,pietgeursen/pietgeursen.github.io,tachyons-css/tachyons,cwonrails/tachyons
lib/max-widths.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { promisify } = require(\"util\");\n\nconst command = {\n command: \"console\",\n description:\n \"Run a console with contract abstractions and commands available\",\n builder: {},\n help: {\n usage: \"truffle console [-...
javascript
edit
0
2
mit
eee102fd57d93a3c2af94732169f142e470ad9d1
ConsenSys/truffle
packages/core/lib/commands/console.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nclass PagerNumbers extends React.Component {\n constructor(props, context) {\n super(props, context);\n }\n render(){\n const {pagerNum, itemsPerPage, count} = ...
javascript
edit
0
1
mit
cccddcad29b09f0c63664fdfb0903a72d922aeae
aragonwa/kc-restaurant-reviews,aragonwa/kc-restaurant-reviews
src/components/PagerNumbers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable no-var */\n// NPM 5 now adds optional dependencies, which older versions of npm\n// try to install even if it is the wrong architecture.\n\nvar fs = require('fs');\nvar toRemove = ['fsevents'];\nvar shrinkwrap = JSON.p...
javascript
edit
0
4
mit
47d97c4aebca433aa4babb4cf9691d773129f5b3
zodern/meteor-up,zodern/meteor-up
tests/clean-shrinkwrap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Sequelize = require('sequelize');\n\nmodule.exports = {\n JSONType: (fieldName, {defaultValue = {}} = {}) => ({\n type: Sequelize.TEXT,\n get: function get() {\n const val = this.getDataValue(fieldName);\n if (!va...
javascript
edit
0
3
mit
f9f78968b15896a496624e12e4609750cd2421f5
nylas-mail-lives/nylas-mail,nirmit/nylas-mail,nylas-mail-lives/nylas-mail,nirmit/nylas-mail,simonft/nylas-mail,nylas/nylas-mail,nylas/nylas-mail,nirmit/nylas-mail,nylas/nylas-mail,simonft/nylas-mail,nirmit/nylas-mail,simonft/nylas-mail,nylas-mail-lives/nylas-mail,simonft/nylas-mail,nylas-mail-lives/nylas-mail,nylas/nyl...
packages/nylas-core/database-types.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nconst Policy = require('trails-policy')\n\n/**\n * @module <%= name %>Policy\n * @description <%= answers.desc %>\n */\nmodule.exports = class <%= name %>Policy extends Policy {\n\n}\n\n\n```\n\nApply this change: Remove...
javascript
edit
null
null
mit
b74dc57e87747007fd910505952c7c5bb2ca7136
tnunes/generator-trails,jaumard/generator-trails,konstantinzolotarev/generator-trails
src/policy/templates/Policy.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2014-2015, Renasar Technologies Inc.\n/* jshint node: true */\n\n\"use strict\";\n\nvar di = require('di');\n\nmodule.exports = Runner;\n\ndi.annotate(Runner, new di.Provide('Http'));\ndi.annotate(Runner, new di.Inject(\n ...
javascript
edit
0
1
apache-2.0
58aa5b43f40233b3ece08527487d86e31cbb68a8
keedya/on-http,RackHD/on-http,lanchongyizu/on-http,keedya/on-http,larry-dean/on-http,larry-dean/on-http,larry-dean/on-http,RackHD/on-http,keedya/on-http,keedya/on-http,RackHD/on-http,lanchongyizu/on-http,lanchongyizu/on-http,larry-dean/on-http,lanchongyizu/on-http,RackHD/on-http
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Notifications system server front-end.\n *\n * @package randy\n * @author Andrew Sliwinski <<EMAIL>>\n */\n\n/**\n * Dependencies\n */\nvar _ = require('underscore'),\n async = require('async'),\n randy = require...
javascript
edit
0
2
mit
95b38d32a6082a1ecbe385209d80595c5e855577
thisandagain/randy
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Mixin.create({\n\n /**\n * Attribute bindings for mixin's component element\n * @property {array} attributeBindings\n */\n attributeBindings: [ 'title' ],\n\n /**\n...
javascript
edit
0
7
mit
35fb2c9d84bd4372b5201a5b3d80741118761780
Suven/sl-ember-components,notmessenger/sl-ember-components,azizpunjani/sl-ember-components,notmessenger/sl-ember-components,SpikedKira/sl-ember-components,juwara0/sl-ember-components,alxyuu/sl-ember-components,erangeles/sl-ember-components,azizpunjani/sl-ember-components,theoshu/sl-ember-components,jonathandavidson/sl-...
app/mixins/sl-tooltip-enabled.js
rejected_duplicate
Near-duplicate of sample 69919
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar expect = require('chai').expect;\nvar count = require('count-substring');\nvar htmlToText = require('html-to-text');\n\nmodule.exports = function (browser) {\n describe(\"The tests written in Elm\", function () {\n it('sho...
javascript
edit
0
3
mit
7ffa7489b598b49c38774f62f9e0e4391918fc34
rgrempel/elm-web-api,rgrempel/elm-web-api
test/src/mocha/elmTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default {\n entry: 'lib/src/index.js',\n dest: 'lib/apollo.umd.js',\n format: 'umd',\n sourceMap: true,\n moduleName: 'apollo',\n external: [\n 'lodash'\n ]\n};\n\n```\n\nApply this change: Define globals for lodash in ...
javascript
edit
0
2
mit
ecef360fb7b12d36124bc2990e536f1567ef5c81
stevewillard/apollo-client,calebmer/apollo-client,cesarsolorzano/apollo-client,cesarsolorzano/apollo-client,calebmer/apollo-client,cesarsolorzano/apollo-client,stevewillard/apollo-client,calebmer/apollo-client,stevewillard/apollo-client,apollostack/apollo-client,apollostack/apollo-client,apollographql/apollo-client,apo...
rollup.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\r\n grunt.initConfig({\r\n concat: {\r\n options: {\r\n separator: ''\r\n },\r\n app: {\r\n dest: 'deploy/app.js',\r\n ...
javascript
edit
0
1
unlicense
a32074629a403b1e7903cce9d89bb27cf515bc28
Kazark/conway-game-of-life-with-angular-js
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport RepoSearchBar from './components/RepoSearchBar';\n\nexport default class SearchScreen extends Component {\n render() {\n return (\n <RepoSearchBar />\n );\n }\n}\n\n\n```\n\...
javascript
edit
0
1
mit
5320a82b5529b2d14bf74e6cae0c9d75faac6b03
msanatan/GitHubProjects,msanatan/GitHubProjects,msanatan/GitHubProjects
app/scenes/SearchScreen/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar Objectid = mongoose.Schema.Types.ObjectId;\nvar Organisation = require(\"./organisation_model\");\nvar SageItem = require(\"./sageitem_model\");\nvar Sa...
javascript
edit
0
1
mit
8676f6f9411da29c162b1334e530a0e6b0f5cb45
10layer/jexpress,10layer/jexpress
app/models/lineitem_model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function (grunt) {\n\n // Project configuration.\n grunt.initConfig({\n release: {},\n simplemocha: {\n options: {\n timeout: 60000,\n reporter: 'spec'\n },\n all: { src: ['test/**/*...
javascript
edit
0
1
mit
14858929325c953d0c99a0569d61d1442c0232a0
brettpostin/launchpad,brettpostin/launchpad,ekryski/launchpad,ekryski/launchpad
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nclass Pokemon {\n\n constructor(name) {\n this.name = name;\n this.cp = 100;\n }\n\n attack() {\n console.log(`Attack ${this.cp} points!`);\n }\n\n powerUp() {\n this.cp += 100;\n ...
javascript
edit
0
1
apache-2.0
ad62461bfbe05fca3daae9bb2d666e979217ee94
teerasej/training-javascript-es6-beginner-thai
class/basic/app-finish.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Development environment settings\n * @description :: This section overrides all other config values ONLY in development environment\n */\n\nmodule.exports = {\n log: {\n level: 'silly'\n },\n models: {\n c...
javascript
edit
0
0
mit
cb0e58b5d876fe9903a8ee4cd7a96da0f61df8cf
synergycns/generator-sails-rest-api,jaumard/generator-trails,mhipo1364/generator-sails-rest-api,konstantinzolotarev/generator-trails,IncoCode/generator-sails-rest-api,ghaiklor/generator-sails-rest-api,italoag/generator-sails-rest-api,eithewliter5518/generator-sails-rest-api,italoag/generator-sails-rest-api,ghaiklor/gen...
generators/app/templates/config/env/development.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('jquery-browserify');\nvar _ = require('underscore');\nvar Backbone = require('backbone');\nvar templates = require('../../dist/templates');\nvar auth = require('../config');\nvar cookie = require('../cookie');\n\n// Set...
javascript
edit
0
1
bsd-3-clause
ebe3e3f7e41245f68130eafb21c6fd9ed5f23048
prose/prose,prose/prose,prose/prose
app/views/start.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(req, res, next){\n \"use strict\";\n var Strings = require('../../../strings'),\n Response = require('../../helpers/response'),\n content = require('../../../entities/content'),\n str...
javascript
edit
0
4
mit
acbbcf25d66262559349eee5f0f4f047b52e5032
Solid-Interactive/grasshopper-api-js,Solid-Interactive/grasshopper-api-js
lib/api/routes/preconditions/setParentOfContent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// User Model\nmodule.exports = function(sequelize, DataTypes) {\n var User = sequelize.define('User', {\n type: { type: DataTypes.INTEGER, allowNull: false },\n name: { type: DataTypes.STRING, allowNull: false },\n em...
javascript
edit
0
1
mit
df29f9a002b244222b19b39267cbb2d45432901b
kocsenc/nodejs-tutorme,kocsenc/nodejs-tutorme
models/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* Services */\nvar SERVER_URL = 'http://localhost:8081';\n\nangular.module('myApp.services', ['ngResource']).factory('Items', function ($resource) {\n return $resource('http://localhost:8081/items', {}, {\n q...
javascript
edit
0
1
mit
9bd3ebe8e8f32ab962d0f14c02dfc6c5dece2676
kettuniko/catalog,kettuniko/catalog,kettuniko/catalog,kettuniko/catalog
client/app/js/services.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\nvar SimpleStyleDefaults = require('./simple-style-defaults');\nvar defaultFormValues = require('../../../data/default-form-styles.json');\nvar rampList = require('cartocolor');\n\nmodule.exports = _.defau...
javascript
edit
0
1
bsd-3-clause
1bbe8c062f042f6ac3af7e608f7334daf3bce5ee
splashblot/dronedb,splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb
lib/assets/javascripts/cartodb3/editor/style/style-defaults/hexabins-aggregation-style-defaults.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar setPrototypeOf = Object.setPrototypeOf || function (obj, proto) {\n /* jshint proto:true */\n obj.__proto__ = proto;\n return obj;\n};\n\nmodule.exports = function (React) {\n var mounted = [];\n\n var Mixin = ...
javascript
edit
0
4
mit
0bde4fca6e3385ade5e24a030d281bcc3c7f2185
gaearon/react-hot-loader,gaearon/react-hot-loader
hot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by Wayne on 16/3/11.\n */\n'use strict';\n\nvar newTenderService = require('../../../libraries/services/new_tender_payment'),\n fs = require('fs');\n\nexports.examine = function (req, res, next) {\n var tender = req.te...
javascript
edit
0
5
mit
bd522d6f5df6aa0fb96f309e08450ef874cc6028
hardylake8020/youka-server,hardylake8020/youka-server
tender/app/controllers/tender_payment.server.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst yelp = require('yelp-fusion');\nconst ApiSecrets = require('./apisecrets.js');\n\nconst searchRequest = {\n term: 'restaurant chinese vegetarian',\n location: '94131',\n radius: 8000,\n price: '1,2,3,4',\n limit: 1\n};\n\ncon...
javascript
edit
0
4
mit
69cb3eacbf86a1d08d6c70921c448a71b79209f2
Sibilant-Siblings/sibilant-siblings,Sibilant-Siblings/sibilant-siblings
apicall.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar path = require('path'),\n optimist = require('optimist'),\n usage = require('./usage'),\n commands = require('../lib/commands'),\n properties = require('../lib/properties'),\n version = require(...
javascript
edit
0
1
mit
8938f2637af0a6fdbfe373bbd481f3d03c09f5ca
saintedlama/bumm,saintedlama/bumm,the-diamond-dogs-group-oss/bumm
bin/cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n siteMetadata: {\n title: `JavaScript Zagreb`\n },\n plugins: [\n 'gatsby-plugin-styled-components',\n `gatsby-plugin-react-helmet`,\n 'gatsby-transformer-remark',\n {\n resolve: `gatsby-plugin...
javascript
edit
0
0
mit
2150883b431c274a2e0f8b305c7ffb5e96118b41
jszgb/jszgb.github.io
gatsby-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Game from './game';\n\nexport default class Glyph {\n\tconstructor(chr, fg, bg){\n\t\tthis.chr = chr || ' ';\n\t\tthis.fg = fg || null;\n\t\tthis.bg = bg || null;\n\t}\n\t//Setters and Getters for properties\n\t//When any of thos...
javascript
edit
0
4
apache-2.0
581a42287953031ecadd0d136b66386a5ef1d9fb
TheAlchemist64/Flying-Tower,TheAlchemist64/Flying-Tower
assets/js/glyph.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Day from './day';\n\nconst MS_IN_DAY = 1000*60*60*24;\n\nconst Calendar = ({ events }) => {\n\n let id = 0;\n let lastEpochDays = 0;\n let daysEvents = [];\n let allDays = [];\n\n for (let event of events) {\n\n event.sta...
javascript
edit
0
4
mit
a3b0bd0069c1318bf5dcfdb7c9115231c5f2f14e
dotKom/glowing-fortnight,dotKom/glowing-fortnight
components/calendar/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n(function() {\n angular.module('ncsaas')\n .service('customersService', ['RawCustomer', customersService]);\n\n function customersService(RawCustomer) {\n /*jshint validthis: true */\n var vm = this;\n vm....
javascript
edit
0
2
mit
18ff8d6a0fb4752a5c594089e8d673a22f380ae2
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
app/scripts/services/customers-service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (Meteor.isServer) {\n const _resetDatabase = function (options) {\n if (process.env.NODE_ENV !== 'development') {\n throw new Error(\n 'resetDatabase is not allowed outside of a development mode. ' +\n 'Abortin...
javascript
edit
0
4
mit
9152b2b2573c99886310785baccf32c34b2c3ce8
xolvio/cleaner
cleaner.js
rejected_duplicate
Near-duplicate of sample 82701
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar db = require('../db');\n\n\nmodule.exports = function() {\n\n db.serialize(function() {\n db.run(\"CREATE TABLE IF NOT EXISTS users (username TEXT, hashed_password BLOB, salt BLOB, name TEXT)\");\n db.run(\"CREATE TABLE IF NO...
javascript
edit
0
1
unlicense
91706403df5d8e10bd36c985e4e4850b1558a761
passport/express-4.x-facebook-example,passport/express-4.x-facebook-example
boot/db.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar User = require('../models/user');\nvar Person = require('../models/person');\nvar OperationalNumber = require('../models/psquare/op-number');\n\nvar express = require('express');\nvar pSquare = require('../psquare_m...
javascript
edit
0
2
isc
d82fecd849d00f5867ac55c94c3e0c1d75fa6614
faustixro/white-lotus-server,faustixro/white-lotus-server
routes/psquare.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Home controller\n */\n\nvar util = require('util');\n\nvar home = {\n index: function index(req, res, next) {\n res.locals.title = 'Home';\n res.render('index');\n },\n\n upload: function uploadfn(req, res...
javascript
edit
0
1
mit
2d49896c423c25f4e73ff81994e85b0d61a4aa10
vnykmshr/formidable-upload-example,vnykmshr/formidable-upload-example
routes/home.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Backbone = require(\"backbone\");\n\nmodule.exports = class StationConfig extends Backbone.Model {\n urlRoot = '/api/stations';\n\n defaults() {\n return {\n 'darkStartHour': 21,\n 'darkEndHour': 6\n }\n };\n};\...
javascript
edit
0
1
mit
45fe2a3f8aa1718aa64e0e7e7b95c0c199ec648a
monitron/jarvis-ha,monitron/jarvis-ha
lib/web/scripts/StationConfig.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Implement simple singly and double linked list builders and node classes." }, { "role": "assistant", "content": "//very basic implementation of singly and doubly linked lists. list constructors only create a list from an arr...
javascript
new_file
0
4
mit
4e4bca329674fa3d9940688ac5c124eadf7124e9
philosoralphter/ToyProblems,philosoralphter/ToyProblems
problems/data-structures/linkedList.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n db : {\n URL : 'mongodb://localhost/wapm',\n port : 3000\n },\n port : 8000\n}\n\n```\n\nApply this change: Add mongoDB from jitsu URL" }, { "role": "assistant", "content": "module.exports = {\n...
javascript
edit
0
0
mit
de2d684372beec88b569a603b00df5242a88e276
web-audio-components/component.fm-old
service/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* to run: babel-node albums.js */\n\nglobal.fetch = require('node-fetch');\n\nimport { searchAlbums } from '../src/main';\n\nconst albums = searchAlbums('Incubus');\n\nalbums.then(data => data.albums.items.map(item => console.log(item....
javascript
edit
0
1
mit
b1d20128ec0d8c84271185b736194f3c56b68870
willianjusten/spotify-wrapper
examples/albums.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar fs = require('fs');\nvar cp = require('child_process');\nvar assert = require('assert');\n\nvar partialDependencies = {\n \"concat-stream\": \"^1.4.7\",\n \"os-shim\": \"^0.1.2\"\n};\nvar fullDependencies = {\n \...
javascript
edit
0
2
mit
204e9d2719b08f4a7bf56bcebbc5489054db8c12
ForbesLindesay/spawn-sync,terabyte/spawn-sync,tmagiera/spawn-sync,bcoe/spawn-sync
postinstall.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst TapReporter = require('testem/lib/reporters/tap_reporter');\n\nclass FailureOnlyReporter extends TapReporter {\n constructor(...args) {\n super(...args);\n this._reportCount = 0;\n }\n\n display(prefix, result) {\n thi...
javascript
edit
0
3
mit
ea6d78b8f97ffb5f6f70fd4fd5befd50a3fc87b4
intercom/ember.js,mfeckie/ember.js,stefanpenner/ember.js,miguelcobain/ember.js,knownasilya/ember.js,bekzod/ember.js,jaswilli/ember.js,givanse/ember.js,tildeio/ember.js,qaiken/ember.js,qaiken/ember.js,bekzod/ember.js,mfeckie/ember.js,asakusuma/ember.js,qaiken/ember.js,intercom/ember.js,miguelcobain/ember.js,asakusuma/em...
lib/failure-only-testem-reporter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar PermissionConstructor = require('./PermissionConstructor').PermissionConstructor;\n\nfunction WebService(currentUser) {\n\tthis._currentUser = currentUser;\n\tthis._dependencies = {};\n\tthis.runRef = undefined;\n}\n\nWebService.pro...
javascript
edit
0
3
mit
1463eb2986eff0d303175b3be28d9d1bedaf34eb
rootsher/server-side-portal-framework
Architecture/WebService.js
rejected_duplicate
Near-duplicate of sample 69568
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Book = require('../../models/book');\nvar createMockFS = require('../../fs/mock');\n\ndescribe('parseBook', function() {\n var parseBook = require('../parseBook');\n\n pit('should parse multilingual book', function() {\n ...
javascript
edit
0
1
apache-2.0
4f8bdbb5189ddb40923c1e9fdce2ccc833446187
strawluffy/gitbook,ryanswanson/gitbook,GitbookIO/gitbook,gencer/gitbook,gencer/gitbook,tshoper/gitbook,tshoper/gitbook
lib/parse/__tests__/parseBook.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n generateQueryString: function (data) {\n var ret = []\n for (var d in data)\n if (data[d])\n ret.push(encodeURIComponent(d) + \"=\" + encodeURIComponent(data[d]))\n return ret.join(\"&\")\n },...
javascript
edit
0
4
mit
8eca685c488fca25b0499c207d0823f03c52ba57
Flieral/Publisher-Service,Flieral/Publisher-Service
public/utility.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Module dependencies.\n */\nvar Parser = require('htmlparser2/lib/Parser');\nvar DomHandler = require('domhandler');\n\n/**\n * Parse HTML string to DOM nodes.\n *\n * This is the same method as `require('htmlpar...
javascript
edit
0
2
mit
70b457c9c0f6ad5a67030f2a04a5797487c58888
remarkablemark/html-dom-parser,remarkablemark/html-dom-parser,remarkablemark/html-dom-parser,remarkablemark/html-dom-parser
lib/html-to-dom-server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ntype LivEventHandler = (msgData: Object) => void;\n\nexport default class LiveEvents {\n\n messageHandlers: Object;\n\n constructor() {\n this.messageHandlers = {};\n }\n\n emitSingle(msgType: string, msgData: Object)...
javascript
edit
null
null
mit
13425c836ebd9c9e4af673f5b8942aceb25f2676
qingweibinary/binary-live-api,nuruddeensalihu/binary-live-api,nuruddeensalihu/binary-live-api,qingweibinary/binary-live-api
src/LiveEvents.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar JSONSerializer = require('./JSONSerializer'),\n _ = require('lodash');\n\nvar SettingsManager = function (data, serializer) {\n this._data = data || {};\n this._serializer = serializer || new JSONSerializ...
javascript
edit
0
3
mit
8c0cc88b67cf79945a0441fdbf2446b095e995a3
mtfranchetto/ng-common
lib/io/SettingsManager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction turnRed(){\n $('.nav-main-container').css('background-color', 'red');\n };\n\nfunction turnPurple(){\n $('.nav-main-container').css('background-color', 'purple');\n };\n\nvar url = window.location.href\nfunction colorChoice...
javascript
edit
0
4
mit
6a0bd45249b5913a440d46b512345e9f7eabd728
jessicashannon/thrive-dev-chrome-extension
content.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvinisketch.directive ('vsScrollable', function () {\n\n return {\n replace: false,\n restrict: 'A',\n\n link: function (scope, element, attr) {\n\n // default options\n var options = {\n // scroll only verti...
javascript
edit
0
3
mit
7aef3cbbaab2a490a3f4800b7dd65e20de51446f
dthevenin/VST_AngularJS,dthevenin/VST_AngularJS
src/js/attrDirectives/vsScrollable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n/* Directives */\n\nangular.module( \"TrelloBlogDirectives\", [\"ngSanitize\"] )\n .directive( \"markdown\", [\"$sanitize\", function ( $sanitize ) {\n var converter = new Showdown.converter();\n return {\n ...
javascript
edit
0
3
mit
d08a287d07b7afca50843ad9974c91d2320adddc
fabien0102/trelloblog
js/directives.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst config = require('collections-online/shared/config');\nrequire('cookieconsent/build/cookieconsent.min.js');\n\n// We're using http://cookieconsent.wpengine.com/documentation/javascript-api/\n\nwindow.cookieconsent.initialise({\n ...
javascript
edit
0
0
mit
f679e3d953164bf3ae1d7cf4cf544b6f62fdf4c8
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
app/scripts-browserify/cookie-consent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs')\nconst csv = require('fast-csv')\n\nconst transformToDocs = require('./transform-data-to-docs')\n\n/**\n * Input should be a single CSV row at a time. From one row we can transform a number of documents,\n * eac...
javascript
edit
0
3
unlicense
4fcd78e63ec1d4e5fdda909ce9668276cfd76ddc
poltak/worldbrain-data-converter
converter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nWebApp = {\n\n _isCssLoaded: function () {\n return _.find(document.styleSheets, function (sheet) {\n if (sheet.cssText && !sheet.cssRules) // IE8\n return !sheet.cssText.match(/meteor-css-not-found-error/);\n retur...
javascript
edit
0
3
mit
dd6d6a702b2bd709999642ea170f423ad49b4653
udhayam/meteor,hristaki/meteor,h200863057/meteor,shrop/meteor,dandv/meteor,DCKT/meteor,aldeed/meteor,vacjaliu/meteor,Quicksteve/meteor,yanisIk/meteor,Ken-Liu/meteor,shadedprofit/meteor,planet-training/meteor,yinhe007/meteor,yiliaofan/meteor,Eynaliyev/meteor,Jonekee/meteor,dfischer/meteor,LWHTarena/meteor,emmerge/meteor...
packages/webapp/webapp_client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar morgan = require('morgan');\nvar redis = require('redis');\n\nvar port = process.env.PORT || 3000;\nvar dbhost = process.env.DBHOST || \"redis\";\n\nvar client = redis.createClient(6379, dbhost);\n...
javascript
edit
0
2
mit
805b5f9d53e9e8a0ae818447b764ea9b3ae2a6af
pbes/counter-with-redis
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar Serializer = require('./Serializer'),\n inherits = require('inherits');\n\nvar JSONSerializer = function () {\n\n};\n\ninherits(JSONSerializer, Serializer);\n\nJSONSerializer.prototype.serialize = function (dat...
javascript
edit
0
2
mit
d75f3306454f71107cf66f02a4fbfffc89ebbff9
mtfranchetto/ng-common
lib/io/JSONSerializer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (){\n \"use strict\";\n\n function getBoardID(){\n var pathname = window.location.pathname;\n var regex = /\\/b\\/(\\w*)(\\/*)/;\n var boardID = regex.exec(pathname);\n if(!boardID){\n alert('Not a Trello bo...
javascript
edit
0
2
mit
9860a4335679f4db2c58dd1c08320d98642244f9
zachch/csv-trello
csv.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n'use strict';\nconst childProcess = require('child_process');\nconst isCi = require('is-ci');\nconst isWindows = process.platform === 'win32';\nconst npmExec = isWindows ? 'npm.cmd' : 'npm'\n\nfunction run(args, i...
javascript
edit
0
3
mit
a8635629438adbb5146b75add322b09607213909
YellowKirby/is-ci-cli
cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar debug = require('debug')('rose');\nvar mongoose = require('mongoose');\n\nvar mongoURI = process.env.MONGOLAB_URI || 'mongodb://localhost/mydb';\ndebug('Connecting to MongoDB at ' + mongoURI + '...');\nmongoose.connect(mongoURI);\n\...
javascript
edit
0
1
mit
7211c046c2d0c2edfcdc793482eca2dfda4e7850
nicolasmccurdy/rose,nickmccurdy/rose,nicolasmccurdy/rose,nickmccurdy/rose
feature.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Issue = require('../issue');\n\nmodule.exports = {\n name: 'line-length',\n on: ['line']\n};\n\nmodule.exports.lint = function (line, opts) {\n var maxLength = opts[this.name];\n var ignoreRegExpString = opts[this.name + '-ignor...
javascript
edit
0
5
isc
f00c810aea04619219294d20acda1a4e15a7e4a7
htmllint/htmllint,htmllint/htmllint
lib/rules/line-length.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar path = require('path');\n\nvar root = path.join(__dirname, 'aws-sdk');\nif (!fs.existsSync(root)) {\n root = path.join(__dirname, '..', 'lib');\n}\nroot = path.normalize(root);\n\nmodule.exports = {\n root...
javascript
edit
0
0
apache-2.0
bd74a75bcc3261f107713da84b9992c4e721d8b0
jippeholwerda/aws-sdk-js,j3tm0t0/aws-sdk-js,mohamed-kamal/aws-sdk-js,chrisradek/aws-sdk-js,chrisradek/aws-sdk-js,dconnolly/aws-sdk-js,guymguym/aws-sdk-js,mohamed-kamal/aws-sdk-js,AdityaManohar/aws-sdk-js,grimurjonsson/aws-sdk-js,grimurjonsson/aws-sdk-js,MitocGroup/aws-sdk-js,Blufe/aws-sdk-js,j3tm0t0/aws-sdk-js,odeke-em...
dist-tools/bundle-helpers.js
rejected_duplicate
Near-duplicate of sample 88552
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport DOMProperty from 'react-dom/lib/DOMProperty'\nimport EventPluginRegistry from 'react-dom/lib/EventPluginRegistry'\n\n\nconst reactProps = {\n children: true,\n dangerouslySetInnerHTML: true,\n key: true,\n ref: true,\n\n aut...
javascript
edit
null
null
mit
525d52ba3579eb1437b1be5e407dca4a633c6dbc
lttb/is-react-prop
src/index.js
rejected_syntax
Syntax error detected by tree-sitter
false