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, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport Heading from '../components/heading'\nimport Counter from '../components/counter'\nimport { increment, decrement } from '../actions'\n\...
javascript
edit
0
1
mit
cabb50b76926e1da2a525101b4fe599e9f0fcaa0
edwardmsmith/react-starter,edwardmsmith/react-starter
src/containers/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar webpack = require('webpack')\n\nvar modules = {\n preLoaders: [\n { test: /\\.js$/, loader: 'eslint-loader', exclude: /node_modules/ }\n ],\n loaders: [\n {\n test: /\\.js$/,\n exclude...
javascript
edit
0
0
apache-2.0
98efd9a74a72292028403fd747a1dfe8d2021153
pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('jQuery');\nvar componentEvent = require('kwf/component-event');\nvar cookies = require('js-cookie');\n\nvar onOptChangedCb = [];\nvar api = {\n getDefaultOpt: function() {\n var defaultOpt = $('body').data('co...
javascript
edit
0
3
bsd-2-clause
07f3a2206eb2d20ce166b749e12d8925b2c8c5ef
koala-framework/koala-framework,koala-framework/koala-framework
commonjs/cookie-opt/adapter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst config = require('./config')\n\nfunction timestamp() {\n return new Date().toISOString()\n}\n\nfunction logMsg(level, msg, args) {\n // eslint-disable-next-line no-console\n console.log(`${timestamp()} INFO - ${msg}, ${args}`)\...
javascript
edit
0
2
apache-2.0
757be49dad1096fd4315dd9ca09802bbcade7777
Laastine/lukkarimaatti,Laastine/lukkarimaatti,Laastine/lukkarimaatti
app/logger.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add specifity to prevent Fuel UX module from installing bower" }, { "role": "assistant", "content": "\nif (process.env.INSTALL_FUELUX_MCTHEME_BOWER === 'true') {\n require(\"bower\").commands.install();\n}\n" } ]
javascript
new_file
0
0
bsd-3-clause
e523c3476d8957640737e5c7a96013392cd41e08
chriscorwin/fuelux-mctheme,chriscorwin/fuelux-mctheme,ExactTarget/fuelux-mctheme,interactivellama/fuelux-mctheme,ExactTarget/fuelux-mctheme,interactivellama/fuelux-mctheme
postinstall.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Include a logger in your module with:\n *\n * var logger = require('triton/core/logging').getLogger(__LOGGER__);\n *\n * This `logger` has methods for each level specified in logging/common.js.\n *\n * Example:\n *\n * logger...
javascript
edit
0
0
apache-2.0
0e3d0329900eff6ca33330360c1d7eddad4f3719
szhou8813/react-server,redfin/react-server,redfin/react-server,lidawang/react-server,doug-wade/react-server,szhou8813/react-server,davidalber/react-server,lidawang/react-server,davidalber/react-server,emecell/react-server,doug-wade/react-server,emecell/react-server
core/logging.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport config from './config/environment';\n\nvar Router = Ember.Router.extend({\n location: config.locationType\n});\n\nRouter.map(function() {\n this.route('login', function() {});\n\n this.route('articl...
javascript
edit
0
1
mit
5360c2ec12aa22163832b75f90ce6e4e5f67c3db
A-Helberg/adlet,A-Helberg/adlet
app/router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nconst webpack = require('webpack');\nconst nodeExternals = require('webpack-node-externals');\nconst env = process.env.NODE_ENV;\n\nconst config = {\n context: `${__dirname}/src`,\n resolve: {\n extensions:...
javascript
edit
0
0
mit
c9b4344ebfc1e4e3c170614bc83f6321e5da7e27
PTW-Freiburg/udi,PTW-Freiburg/udi
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst webpack = require(\"webpack\");\nconst { CleanWebpackPlugin } = require(\"clean-webpack-plugin\");\nconst HtmlWebpackPlugin = require(\"html-webpack-plugin\");\nconst CopyWebpackPlugin = require(\"copy-webpack-plugin\");\n\nmodule...
javascript
edit
0
0
mit
b022081ebfbb1e793e0f1b09b2f52ce05356a020
anttikekki/muinaismuistot,anttikekki/muinaismuistot
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable import/no-extraneous-dependencies */\n\nimport path from 'path';\nimport webpack from 'webpack';\n\nexport const globalOptions = {\n resolve: {\n extensions: ['', '.js', '.jsx'],\n },\n};\n\nexport const serverEnt...
javascript
edit
0
0
mit
a2a038b4a000feeb4b53fed8d76c6ebd5edd829f
just-paja/improtresk-web,just-paja/improtresk-web
webpack/common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global tabID */\n\"use strict\";\nconst existingIframe = document.querySelector(\"iframe#dom-distiller-result-iframe\");\nif(existingIframe) {\n existingIframe.remove();\n} else {\n const iframe = document.createElement(\"ifram...
javascript
edit
0
1
mit
16c5585ec3b9e53aad00c5ad5d82d350d23e6e32
metarmask/dom-distiller-reading-mode,metarmask/dom-distiller-reading-mode
src/content-script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar logger = require('log4js').getLogger('telegram');\n\nvar nconf = require('nconf');\nnconf.file('bots', __dirname + '/../config/bots.json')\n .file('receviers', __dirname + '/../config/receivers.json')\n .file('senders', __di...
javascript
edit
0
3
apache-2.0
3ab63fccdf8aea3a05175579a386cf1d536d81c8
dollars0427/ATMessager,dollars0427/ATMessager
atmessager/lib/telegram.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst Profiler = require('../../stats/profiler-proxy');\nconst { name: prefix } = require('../../../package.json');\n\nmodule.exports = function profiler ({ statsClient, logOnEvent = 'finish' }) {\n return function p...
javascript
edit
0
2
bsd-3-clause
df604adc2ad18fbe1c4ab359ca4c2e87193420c1
CartoDB/CartoDB-SQL-API,CartoDB/CartoDB-SQL-API
lib/api/middlewares/profiler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar pages = require('./pages.js');\nvar app = express();\n\napp.use(express.logger());\napp.use(app.router);\napp.use(express.static(__dirname + '/public'));\n\n// app.get('/', function(request, respon...
javascript
edit
0
1
mit
eb6b7bcec3e9bb7a4d9484d0d4a91478735fa858
fredantell/learning
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { storiesOf } from '@storybook/react';\nimport {\n boolean, text, select\n} from '@storybook/addon-knobs';\nimport OptionsHelper from '../../../utils/helpers/options-helper';\nimport Tooltip from '.';...
javascript
edit
0
2
apache-2.0
52ec99d5e4fed76ea1ebe82e7e6c7c56693f1d96
Sage/carbon,Sage/carbon,Sage/carbon
src/__experimental__/components/tooltip/tooltip.stories.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar webpack = require(\"webpack\");\nvar webpackOpt =\n{\n entry : \"./src/main.js\"\n, output :\n {\n filename : \"./dist/BBM.js\"\n , libraryTarget : \"umd\"\n }\n};\n\nwebpack(webpackOpt).run(function (err, ...
javascript
edit
0
2
mit
177acf7aee85e476eefc9bcd39968c1e8a18fddd
Preole/bbm,Preole/bbm
s-build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport GatewayRegistry from './GatewayRegistry';\nimport {deprecated} from 'react-prop-types';\n\nexport default class GatewayDest extends React.Component {\n static cont...
javascript
edit
0
3
bsd-3-clause
949dd73d3aad20293989f7506fc5ba53c05ac3df
cloudflare/react-gateway
src/GatewayDest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {childProcess} from 'node-promise-es6';\nimport {path as phantomJsPath} from 'phantomjs-prebuilt';\nimport PhantomJS from 'phantomjs-promise-es6';\n\nasync function sleep(ms) {\n await new Promise((resolve) => {\n setTimeout(...
javascript
edit
0
2
mit
e5058356f0c6bc4470a31ab762b5c833f47eb283
vinsonchuong/phantomjs-promise-es6
spec/index_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Using es5 in this module as it won't be transpiled in child projects\n// due to the node_modules babel loader exclude.\n/* istanbul ignore next */\nrequire('./sandbox');\n\n// require all modules ending in \"_test\" from the\n// curr...
javascript
edit
0
0
mit
28b17767adf033a24fc4d5800afc31669d093d31
kpdecker/linoleum-electron,kpdecker/linoleum,kpdecker/linoleum-webpack,kpdecker/linoleum-node,kpdecker/linoleum-electron
src/karma-index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint node:true*/\n/* global require, module */\nvar EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function(defaults) {\n var app = new EmberAddon(defaults, {\n // Add options here\n babel: {\...
javascript
edit
0
1
mit
244f07632b17c3206c3d12029269cd39980c131e
ember-a11y/ember-a11y-testing,ember-a11y/ember-a11y-testing,trentmwillis/ember-a11y-testing,ember-a11y/ember-a11y-testing,trentmwillis/ember-a11y-testing
ember-cli-build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('babel-polyfill');\nrequire('babel-core/register')({\n only: /gluestick.*/,\n presets: [\n 'react',\n 'es2015',\n 'stage-0',\n ],\n plugins: [\n 'transform-decorators-legacy',\n ],\n});\n\n\n```\n\nApply this ch...
javascript
edit
0
0
mit
22bf5c74c24e8aac9dcfcbbe604efcea74e9f719
TrueCar/gluestick,TrueCar/gluestick,TrueCar/gluestick
packages/gluestick/bin/compile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport styled from \"styled-components\";\nimport Link from \"gatsby-link\";\nimport PictureFrame from \"../components/PictureFrame\";\nimport Social from \"../components/Social\";\n\nconst StyledHome = sty...
javascript
edit
0
3
mit
b122ff342ae120223afc826de5eca43319277606
antoniwan/arodus-gatsby
src/pages/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n\t\"../core\",\n\t\"../queue\",\n\t\"../effects\" // Delay is optional because of this dependency\n], function( jQuery ) {\n\n// Based off of the plugin by Clint Helfers, with permission.\n// http://blindsignals.com/index.php/...
javascript
edit
0
4
mit
31d58c5cbbede6dc33d10feecd5277ccddb367e6
roytoo/jquery,jquery/jquery,jquery/jquery,roytoo/jquery,roytoo/jquery,jquery/jquery
src/queue/delay.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('resourceSolver', [])\n.provider('resourceSolver', function ResourceSolver() {\n var baseUrl = '';\n\n this.setBaseUrl = function(url) {\n baseUrl = url;\n };\n\n this.$get = function() {\n return {\n getBa...
javascript
edit
0
2
mit
3f40019728b70f04600cd450cd75e51476a01c9d
jbmikk/resource-solver
src/resourceSolver.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar mocha = require('gulp-mocha');\nvar istanbul = require('gulp-istanbul');\n\ngulp.task('default', ['mocha'], function() {\n gulp.watch('**/*.js', '!node_modules/**', '!coverage/**', {interval: 1000, ...
javascript
edit
0
1
mit
6b86323c8c82f69eaf17b44d739e08d7730ea13c
kanbanana/knowledgebase,kanbanana/knowledgebase,kanbanana/knowledgebase
development/server/Gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require( \"react\" );\n\nmodule.exports = React.createClass({\n\tdisplayName: \"RepubliaTimes\",\n\n\trender() {\n\t\treturn (\n\t\t\t<h1>The Republia Times</h1>\n\t\t);\n\t}\n});\n\n```\n\nApply this change: Add day number ...
javascript
edit
0
1
isc
d19f74c6eb19fd9b86459c7593cc29a588311540
bjohn465/republia-times,bjohn465/republia-times
src/components/republia-times.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add carousel initialization for the fullscreen background image slider" }, { "role": "assistant", "content": "$(document).ready(function(){$(\".smoothie\").on('click',function(event){var target=$(this.hash),navOffset=$('#navb...
javascript
new_file
0
1
apache-2.0
6e4566879523c2491b58ecb477142e793b115b3c
oaklandfinishup/oaklandfinishup.github.io,oaklandfinishup/oaklandfinishup.github.io
js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash'\nimport postcss from 'postcss'\n\nexport default function(options) {\n let breakpoints = options.breakpoints\n\n return function(css) {\n Object.keys(breakpoints).forEach(breakpoint => {\n const variable...
javascript
edit
0
2
mit
8eb25475b486fe4558bea02344f67f289ed4605b
tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindcss/tailwindcss,tailwindlabs/tailwindcss
src/lib/addCustomMediaQueries.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nelation.extend(\"engine.systems.sound\", function(args) {\n elation.implement(this, elation.engine.systems.system);\n\n this.system_attach = function(ev) {\n console.log('INIT: sound', this);\n this.stage = new AudioStage();\n\n...
javascript
edit
0
1
mit
7625324c3250240fb0fd29e9acace1e9a5691120
bioid/elation-engine,jbaicoianu/elation-engine
scripts/systems/sound.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar socketio = require('socket.io');\nvar io;\nvar guestNumber = 1;\nvar nickNames = {};\nvar namesUsed = [];\nvar currentRoom = {};\n\nexports.listen = function(server) {\n io = socketio.listen(server);\n io.set('log level', 1);\n i...
javascript
edit
0
1
mit
aebb9e34b54b032b0da802d98ddab101415fe813
sebsonic2o/chatrooms,sebsonic2o/chatrooms
lib/chat_server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n $(\".additional-options-toggle\").on(\"click\", function(e) {\n e.preventDefault();\n $(\"#\" + $(this).data(\"export-section\") + \"_options\").toggle();\n });\n\n $(\"#kanji_form input[name='a...
javascript
edit
0
1
mit
08e96d7585d748d68b6c402d3340a12d9ff5997f
dennmart/wanikani-to-anki,dennmart/wanikani-to-anki
public/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n $('#applicant_server_id').change(populateArmory);\n $('#applicant_character_name').change(populateArmory);\n});\n\nfunction populateArmory() {\n cserver = $('#applicant_server_id :selected').text().replace(/[^A...
javascript
edit
0
1
mit
692cdf0b7d2604c693b44474cf919e9d822cc188
tsigo/juggapp,tsigo/juggapp
public/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/** @jsx React.DOM */\n'use strict';\n\nvar React = require('react');\n\nvar App = React.createClass({\n render() {\n return (\n <h1>Hello, world.</h1>\n );\n }\n});\n\nmodule.exports = App;\n```\n\nApply this change: Add d...
javascript
edit
0
2
mit
4307680058dcbffc77b70777a2ed6e67cd0f8453
Nek/Signerbox
scripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Component from '@ember/component';\n\nexport default Component.extend({\n classNames: ['rl-dropdown'],\n classNameBindings: ['isExpanded:open'],\n});\n\n```\n\nApply this change: Dropdown::Content: Remove unused `.rl-dropdown` ...
javascript
edit
0
0
apache-2.0
b4f6ab24ae8e5f47fe584c6853e36c40dd207eb4
rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io,rust-lang/crates.io
app/components/dropdown/content.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst path = require ('path');\nconst {expect} = require ('chai');\nconst wannabe = require ('../lib/index.js');\n\n\ndescribe ('index', function () {\n it ('#default', function (done) {\n wannabe (path.join (_...
javascript
edit
0
1
mit
bc7515260a40402c2d3de62e3db621c46c4880be
Skywalker13/wannabe.js
test/index.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\n\nconst {\n getEntry,\n getAllEntries,\n addEntry,\n deleteEntry\n} = require('./../db/entries')\nconst {\n getDataFromUrl,\n getDataFromName\n} = require('./../sc...
javascript
edit
0
2
mit
b9e60d25f735f389ca9f1de21f69d48cea7cfac7
michael-lowe-nz/ageGuessAPI,michael-lowe-nz/ageGuessAPI
routes/scrape.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(config){\n config.set({\n\n basePath : '../',\n\n files : [\n 'app/bower_components/angular/angular.js',\n 'app/bower_components/angular-route/angular-route.js',\n 'app/bower_components/an...
javascript
edit
0
3
mit
3b12a910505e9d7464bec031af6ecb8cfb31e56f
double16/switchmin-ng,double16/switchmin-ng
test/karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar audio = document.getElementById(\"chris\");\n\nfunction pauseChris() {\n\tif (audio.currentTime >= 1283) {\n\t\taudio.pause();\n\t\taudio.currentTime = 952;\n\t}\n}\n\nfunction playChris() {\n\taudio.currentTime = 952;\n\taudio.play...
javascript
edit
0
3
mit
8e1f8f3b30b8298e1ef85c33f948c24aa2e06869
nvdaes/nvdaes.github.io,nvdaes/nvdaes.github.io
scripts/chris.js
rejected_duplicate
Near-duplicate of sample 74535
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst deserializeFromEmber = function(o, depth = 10) {\n if(o && o.toJSON) {\n var constructor = o.get && o.get('constructor').toString();\n return constructor ? \n {'_constructor': constructor, json: o.toJSON({includeId:tru...
javascript
edit
0
9
mit
2acb89f7ab10d1b292a0bd797e856831319e09be
AltSchool/ember-cli-redux,AltSchool/ember-cli-redux
app/lib/deserialize-from-ember.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Really want to replace this with something more multi-OS-friendly\nvar xhr = new XMLHttpRequest();\nxhr.open('GET', 'manifest.json');\nxhr.onload = function(){\n\tvar manifest = JSON.parse(xhr.responseText);\n\tvar link = document.ge...
javascript
edit
0
0
mit
ba548ad59666364e7fd510409b837efab3ea0daf
p3lim/dotjs-universal,p3lim/dotjs-universal
source/path.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar User = require('./controllers/user.server.controller'),\n Upload = require('./controllers/upload.server.controller'),\n Video = require('./controllers/video.server.controller'),\n View = require('./...
javascript
edit
0
1
mit
f63bb4e4e006bdcd3fd2da40cdc67a4e5ff2d9cf
goodheads/yourtube,goodheads/yourtube
server/routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { mount, shallow } from 'enzyme';\nimport { expect } from 'chai';\nimport sinon from 'sinon';\nimport { IndexLink, Link } from 'react-router';\nimport { project, workflow } from '../dev-classifier/mock...
javascript
edit
0
1
apache-2.0
3db94979e05fd2f1389a0292107e429b1a6c0a70
zooniverse/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,jelliotartz/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End,amyrebecca/Panoptes-Front-End
app/pages/project/project-navbar.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */\n\ndescribe('my app', function() {\n\n beforeEach(function() {\n browser().navigateTo('../../app/index.html');\n });\n\n\n it('should automatically redir...
javascript
edit
0
1
mit
6395592d2edb87f632705fa924c9b45bfc728ab3
johnwalley/jargon-generator,johnwalley/jargon-generator,johnwalley/jargon-generator,johnwalley/risk-jargon-generator,johnwalley/risk-jargon-generator,johnwalley/risk-jargon-generator
test/e2e/scenarios.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n name: 'kriegslustig:simulatency',\n version: '0.0.0',\n description: 'Adds a lag to all connections you make to the server',\n repository: 'https://github.com/Kriegslustig/meteor-lag.git',\n debugOnly: true\n})...
javascript
edit
0
1
mit
04cb47858763b656a605fd40edbeefb653ad9c8b
Kriegslustig/meteor-simulatency
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n git: 'https://github.com/zimme/meteor-collection-behaviours',\n name: 'zimme:collection-behaviours',\n summary: 'Define and attach behaviours on collections',\n version: '1.0.2'\n});\n\nPackage.onUse(function(ap...
javascript
edit
0
1
mit
9e3ba3b6800658bc09f08c980ee99ec076904395
zimme/meteor-collection-behaviours
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mistigri = require(\"../mistigri.js\");\nvar fs = require(\"fs\");\n\n// Some generic setup\n\nmistigri.options.escapeFunction = String;\n\nfunction readFile(name, options) {\n return new Promise(function fsReadFile(fulfill, reje...
javascript
edit
0
2
mit
16e0de05a47441d6408440f5aaa501380a01f45e
jido/mistigri.js
Examples/filter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (enyo, scope) {\n\t/**\n\t* {@link moon.Divider} is a simply styled component that may be used as a separator\n\t* between groups of components.\n\t*\n\t* @class moon.Divider\n\t* @mixes moon.MarqueeSupport\n\t* @mixes moon.Ma...
javascript
edit
0
1
apache-2.0
cd33daf6d19478d60b683aa9e0749b9e76fae80e
mcanthony/moonstone,mcanthony/moonstone,enyojs/moonstone,mcanthony/moonstone
source/Divider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global describe, it */\n\n\"use strict\";\n\nvar opencpu = require(\"../lib/opencpu\"),\n config = require(\"./opencpu-config\"),\n assert = require(\"assert\");\n\ndescribe(\"Packages test:\", function () {\n\n describe(\"MA...
javascript
edit
0
2
mit
104a9c860e57fbdc7d17451007d191559dc1f4f8
albertosantini/node-opencpu
test/packages-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe( 'csscomb', function () {\n var expand = require( 'glob-expand' );\n var path = require( 'path' );\n\n var exec = require( '../lib/exec' );\n var read = function ( file ) {\n return require( 'fs' ).readFileSync( file, {\...
javascript
edit
0
2
mit
97fc3e2a57d64a5ea97728c1b49f1fefd53f86a4
royriojas/cssbrush
specs/cssbrush.js
rejected_duplicate
Near-duplicate of sample 83879
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar code = null;\nif (/([^\\/].)?oglobo\\.globo\\.com/.test(document.location.host))\n code = 'paywallAtivo = false;';\n\nelse if (/www\\.economist\\.com/.test(document.location.host))\n code = 'document.cookie = \"ec_limit=allow\...
javascript
edit
0
0
mit
29ab94dd6a3ef2a442013c281701cddf871e29ac
rodorgas/burlesco,rodorgas/burlesco,Burlesco/chromium,rodorgas/burlesco,rodorgas/burlesco,Burlesco/chromium
src/content.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = (req, res, next) => {\n req.app.settings.nunjucksEnv\n .addGlobal('req', req)\n .addGlobal('res', res);\n\n next();\n}\n\n```\n\nApply this change: Add req/res to res.locals not global nunjucks instance" }, ...
javascript
edit
0
1
mit
54b7ea883d9d7db78d4af3229dd39e5dbeee4d07
lukechilds/tor-explorer,lukechilds/tor-explorer
lib/nunjucks-middleware.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * requires rcmApi from core\n */\nangular.module('rcmAdminApi', [])\n .factory(\n 'rcmAdminApiUrlService',\n [\n function () {\n\n /**\n * url map for APIs - These are parsed using the rcmApi...
javascript
edit
0
1
isc
579bd6e6f439e3a7445555c0eaded4decce1aeb4
rodmcnew/Rcm,reliv/Rcm,rodmcnew/Rcm,reliv/Rcm,rodmcnew/Rcm,reliv/Rcm,rodmcnew/Rcm,reliv/Rcm
public/core/rcm-admin-api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst jsdoc2md = require('jsdoc-to-markdown');\nconst fs = require('fs');\n\njsdoc2md({src: './node_modules/kittik-animation-*/**/*.js'}).pipe(fs.createWriteStream('./doc/api/Animation.md'));\njsdoc2md({src: './node_m...
javascript
edit
0
0
mit
5c103d4f77db0e2a9f3f4c6b86d3ed43ba196c60
kittikjs/kittik
tools/generate_doc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport shallowEqual from 'is-equal-shallow';\nimport { bindActionCreators } from 'redux';\n\nexport const observeStore = (store, currState, select, onChange) => {\n if (typeof onChange !== 'function') return null;\n let currentState =...
javascript
edit
0
6
mit
9689466963c8bd32db54625166f1f94ee0e0f593
davej/js-redux
src/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nclass MyClock extends React.Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {date: new Date()};\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<div>\n\t\t\t\t<h1> CLOCK TIME: {this.state.date.toLocaleTimeString()} ...
javascript
edit
0
1
apache-2.0
db341eba5ac14a111b92daac0f0504dc3fc6e6a3
gsluthra/react-play,gsluthra/react-play
first.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nexport default class App extends React.Component {\n render() {\n return (\n <h1>hello admin</h1>\n )\n }\n}\n\n```\n\nApply this change: Test case for dev reloader" }, { "role": "assis...
javascript
edit
0
1
mit
d8e8a5901fae8183881f02998e0bbcdbf4b72bf7
junorouse/valid-xss-checker,junorouse/valid-xss-checker
src/App.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst childProcess = require('child_process');\n\nconst CONFIG = require('../config');\n\nmodule.exports = function(ci) {\n console.log('Installing apm');\n childProcess.execFileSync(\n CONFIG.getNpmBinPath(),\n ...
javascript
edit
0
1
mit
86ad1c66049a450b28ad44fd469c6667f7f8b345
atom/atom,Mokolea/atom,brettle/atom,Mokolea/atom,PKRoma/atom,PKRoma/atom,atom/atom,brettle/atom,atom/atom,PKRoma/atom,Mokolea/atom,brettle/atom
script/lib/install-apm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst webViewElement = document.querySelector('.messages-iframe');\r\n\r\nwebViewElement.addEventListener('new-window', (e) => {\r\n require('electron').shell.openExternal(e.url);\r\n})\r\n\r\nwindow.addEventListener('focus', () => w...
javascript
edit
0
1
mit
840a157d7c99500c0ca9435821131eab79b395aa
Faithlife/FaithlifeMessages
src/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n angular\n .module('auth')\n .controller('LoginController', LoginController);\n\n LoginController.$inject = [\n 'AuthService',\n 'Notification',\n '$scope',\n '$loc...
javascript
edit
0
2
mit
ba882c2667e7d4061e268ed0a80eb2ba4c4f875f
scientilla/scientilla,scientilla/scientilla,scientilla/scientilla
assets/js/app/auth/login.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * User\n *\n * @module :: Model\n * @description :: A short summary of how this model works and what it represents.\n * @docs\t\t:: http://sailsjs.org/#!documentation/models\n */\n\nmodule.exports = {\n\n attributes: {\n ...
javascript
edit
0
0
mit
41b275ddb95d5ba167f7b0b3255671e9e3d543c1
thomaslangston/sailsnode
api/models/User.js
rejected_duplicate
Near-duplicate of sample 93974
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { request } from 'ic-ajax';\nimport Config from './config';\n\nexport default Ember.Object.extend({\n setPrefilter: function() {\n var token = this.get('data').token;\n var preFilter = function(...
javascript
edit
0
3
mit
2dfa1361f8ab33fca18a0e9e7fe88d22a74905f3
abuiles/rails-csrf,abuiles/rails-csrf
lib/service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst removeKeyInObject = (obj, keyToRemove) => {\n return Object.keys(obj).reduce((acc, current) => {\n const value = acc[current];\n\n if (value === null) {\n return acc;\n }\n\n if (Array.isArray(value)) {\n re...
javascript
edit
0
5
mit
4eaea5daf1f29f6380c8f1704d79d99270cf6231
wistityhq/strapi,wistityhq/strapi
packages/strapi-plugin-content-manager/admin/src/utils/removeKeyInObject.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar path = require('path');\nvar fs = require('fs');\n\nmodule.exports = function readConfig(file) {\n var content = fs.readFileSync(\n path.join(\n __dirname,\n 'node_modules',\n ...
javascript
edit
0
1
mit
af8981103ced99d50cbdcb93f3ec435c5e987042
vgno/eslint-config-vgno
read-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport Document, { Html, Head, Main, NextScript } from 'next/document'\n\nimport { GA_TRACKING_ID } from 'libs/gtag'\n\nexport default class extends Document {\n render() {\n return (\n <Html>\n ...
javascript
edit
0
0
mit
4130708a27452f366a81ce2be2e8d7465dc52d3c
sonu27/sonurai.com,sonu27/sonurai.com,sonu27/sonurai.com
pages/_document.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction circular(ref) {\n ref = ref || '[Circular]';\n var seen = [];\n return function (key, val) {\n if(!val || typeof (val) !== 'object') {\n return val;\n }\n if(~seen.indexOf(val)) {\n if(typeof ref === 'func...
javascript
edit
0
7
mit
082f8b4371c037a965eaa6e7bc1b2ac34eade311
tmpfs/circular,freeformsystems/circular
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n* @ngdoc directive\n* @name umbraco.directives.directive:umbAvatar\n* @restrict E\n**/\nfunction avatarDirective() {\n return {\n restrict: \"E\", // restrict to an element\n replace: true, // replace the htm...
javascript
edit
0
1
mit
40fbcc5a99a9118dc89fc49af7b24e7b177ca5ed
corsjune/Umbraco-CMS,VDBBjorn/Umbraco-CMS,rustyswayne/Umbraco-CMS,mstodd/Umbraco-CMS,abjerner/Umbraco-CMS,neilgaietto/Umbraco-CMS,rajendra1809/Umbraco-CMS,rajendra1809/Umbraco-CMS,mattbrailsford/Umbraco-CMS,christopherbauer/Umbraco-CMS,YsqEvilmax/Umbraco-CMS,sargin48/Umbraco-CMS,gregoriusxu/Umbraco-CMS,rustyswayne/Umbr...
src/Umbraco.Web.UI.Client/src/common/directives/html/umbavatar.directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar CommandQueue = require('./command-queue');\n\n/**\n * Creates a new robot arm\n * @constructor\n * @param {object} options The options object.\n * @param {object|array} options.axis A list of servos to control robot arm.\n */\nvar R...
javascript
edit
0
1
mit
412d508c54abab799e693711dda104b6bc69f4e3
cheton/robotarm
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar markovDictionaryBuilder = (function(logger) {\n\n\tfunction buildDict(wordSet, chainSize) {\n\n\t\tlogger.logDebug(\"building dictionary from \" + wordSet.length + \" words with a chain size of \" + chainSize);\n\t\...
javascript
edit
0
3
bsd-3-clause
78e9b9f72aebbfccb500a909da7988f327a9caae
petejscott/jsMarkov
src/js/markovDictionaryBuilder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global require, module*/\n/*!\n * missing-keys <https://github.com/tobiasoberrauch/missing-keys>\n *\n * Copyright (c) 2015, Tobias Oberrauch.\n * Licensed under the MIT License.\n */\n\n'use strict';\n\n(function (factory) {\n if (t...
javascript
edit
0
4
mit
13306cbac62a79b98e5c621095ea25883468e3c4
tobiasoberrauch/missing-keys,tobiasoberrauch/missing-keys
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require(\"fs\");\nvar path = require(\"path\");\n\nmodule.exports = {\n website: {\n assets: \".\",\n html: {\n \"body:start\": function(current) {\n \n var rootPath = current.basePath === \".\" ? \".....
javascript
edit
0
3
apache-2.0
519a19cdfb3abd824c52c593a69115957ff627f0
Simran-B/gitbook-plugin-add-header
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nclass API extends Function {\n\n constructor(path = '/', config) {\n super('next', 'return this(next)');\n this.path = path;\n this.globalConfig = Object.assign({ credentials: 'include' }, config);\n return new Proxy(this.b...
javascript
edit
0
6
mit
06342ae5ec596e2737c0b29a445bb6490fa9d42e
YanagiEiichi/apisdk,YanagiEiichi/apisdk
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-page-object',\n\n options: {\n nodeAssets: {\n ceibo: function() {\n return {\n enabled: this._shouldIncludeFiles(),\n im...
javascript
edit
0
3
mit
83d362fd763d80194913a5063396db29d62016d0
san650/ember-cli-page-object,san650/ember-cli-page-object,san650/ember-cli-page-object,csantero/ember-cli-page-object,csantero/ember-cli-page-object
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from \"react\"; // must be in scope when using JSX\nimport ReactDOM from \"react-dom\";\n\n\nfunction HelloWorld() {\n return (\n <div>React.js Hello World!</div>\n );\n}\n\n\nconst container = document.getElem...
javascript
edit
0
1
unlicense
bfee4d8b912836b1867a9cdbdd694e96dd50805b
epeli/react-starter,epeli/react-starter
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// ----------------------------------------------------------------------------\n//\n// cigar-plugin-device\n//\n// Copyright 2013 Andrew Chilton. All Rights Reserved.\n//\n// License: MIT\n//\n// ---------------------------------------...
javascript
edit
0
2
mit
74cb3bb6a04f5b7bb85b81d700332f2c4cf232aa
chilts/cigar-plugin-device
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Load required plugins\nconst mdRegex = require('markdown-it-regexp')\n\nvar chordPattern = mdRegex(\n // regexp to match \n // Assuming anything within square brackets to be a chord\n /\\[(\\w+)\\]/,\n \n // this function will be...
javascript
edit
0
2
mit
f17aad2d3d160efe31d0fb4f84d4eb7dfcdb294a
gldraphael/chordsheet
index.js
rejected_duplicate
Near-duplicate of sample 93192
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst gulp = require( 'gulp' );\nconst mocha = require( 'gulp-mocha' );\n\ngulp.task( 'test', () => {\n return gulp.src([ 'src/**/*.js', 'test/**/*.js' ], { read: false })\n .pipe( mocha())\n .once( 'end', () =...
javascript
edit
0
1
mit
33135c1182d8cc7021da250088bb6171e58559e8
BrianSilvia/fs-s3-mongo,BrianSilvia/fs-s3-mongo
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n Date: 2016-05-13\n*/\n\nvar URLCold = 'http://192.168.240.1/arduino/analog/0';\nvar URLHot = ''; // 'http://192.168.240.1/arduino/analog/1';\nvar loopTime = 0;\nvar loopCount = 0;\n\nfunction getReadings () {\n if (loop...
javascript
edit
null
null
bsd-2-clause
998c24eae4e37b16eae27e66c366e23e9fc8bacd
jessemonroy650/easy-sensor-reader,jessemonroy650/easy-sensor-reader
iot.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n/* eslint-disable react/prop-types */\n\nimport React, {Component} from 'react'\nimport {globalStyles} from '../../../styles/style-guide'\nimport {Text, Button} from '../../../common-adapters'\n\nimport type {Props} from '....
javascript
edit
null
null
bsd-3-clause
c2c138e8b3bb4447912a01af0c9202bfc29b83f8
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
shared/login/signup/error/index.render.desktop.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst gulp = require('gulp');\nconst babel = require('gulp-babel');\nconst eslint = require('gulp-eslint');\nconst Server = require('karma').Server;\n\nconst src = 'src/*.js';\n\ngulp.task('lint', () => (\...
javascript
edit
0
1
mit
1265b5eda94b54b8a930cd164adb8bd980a093bd
perrin4869/react-focus-onkeydown
gulpfile.js
rejected_duplicate
Near-duplicate of sample 84366
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst defaultScriptUrl = '//editor.unlayer.com/embed.js?2';\nconst callbacks = [];\nlet loaded = false;\n\nconst isScriptInjected = (scriptUrl) => {\n const scripts = document.querySelectorAll('script');\n let injected = false;\n\n s...
javascript
edit
0
3
mit
14a201f9edc822cadd968a95186f9d4d45464044
unlayer/react-email-editor
src/loadScript.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n 'leaflet', 'leaflet.draw', 'i18n!find/nls/bundle', 'leaflet.draw.negate'\n], function(leaflet, leafletDraw, i18n){\n\n function updateTranslations(prefix, mappedPrefix, obj) {\n _.each(obj, function(val, key){\n ...
javascript
edit
0
4
mit
9aa5479b840a6012189e4a3415f9e20cdf5f7fe8
hpe-idol/find,hpautonomy/find,hpautonomy/find,hpe-idol/find,hpautonomy/find,hpe-idol/find,hpe-idol/find,hpe-idol/find,hpautonomy/find,hpautonomy/find
webapp/core/src/main/public/static/js/leaflet.draw.i18n/leaflet.draw.i18n.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {createRunner} from 'atom-mocha-test-runner';\nimport chai from 'chai';\nimport chaiAsPromised from 'chai-as-promised';\n\nimport until from 'test-until';\n\nchai.use(chaiAsPromised);\nglobal.assert = chai.assert;\n\n// Give test...
javascript
edit
0
2
mit
2b43e07f65e308ccfbcca57621e46ab747f95f52
atom/github,atom/github,atom/github
test/runner.js
rejected_duplicate
Near-duplicate of sample 69895
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar nunjucks = require('express-nunjucks');\nvar app = express();\n\n// Application settings\napp.set('view engine', 'html');\napp.set('views', __dirname + '/views');\n\napp.use(express.static('assets'...
javascript
edit
0
2
mit
58b3b88b68f8076a0ee2f22b7264a5507144e017
nhsalpha/design,nhsalpha/design
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Discord from 'discord.js';\nimport logger from 'winston';\nimport request from 'superagent';\nimport auth from '../auth.json';\nimport messageHandler from './messageHandler.js';\n\n// Configure logger settings\nlogger.remove(logg...
javascript
edit
0
2
mit
7a4d4385a5bf8f5c2bf76b910689356020aba725
brendacs/stop-bot,brendacs/stop-bot
src/stopbot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire('env2')\nconst Hapi = require('hapi')\n\n// server plugins\nconst Inert = require('inert')\n\n// server routes\nconst Dashboard = require('./routes/nhsViews/Dashboard.js')\nconst ResourceHandler = require('./routes/nhsViews/Reso...
javascript
edit
0
2
mit
fbc772c84d0b11d710c15bb9c0ca75e6f8a1a47c
FAC7/anna-freud-hub,FAC7/anna-freud-hub,FAC7/anna-freud-hub
backend/server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport i18n from 'i18next';\nimport { initReactI18next } from 'react-i18next';\n\nglobal.requestAnimationFrame = function(callback) {\n setTimeout(callback, 0);\n};\n\ntry {\n require('canvas');\n} catch(err) {\n global.HAS_CAN...
javascript
edit
0
1
mit
2a0eb9c7bf09d15d9cec4fc5bc6fa70ba37c7130
geomoose/gm3,geomoose/gm3,geomoose/gm3
tests/setup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const PAUSE_STORAGE_KEY = 'is-logging-paused'\n\nexport function isLoggable({ url }) {\n // Just remember http(s) pages, ignoring data uris, newtab, ...\n const loggableUrlPattern = /^https?:\\/\\/\\w+([-/.#=$^@&%?+(),]\\w*...
javascript
edit
0
6
mit
9bd7b972709e7a6e2efe94b2e2267091e7a0a4b3
WorldBrain/WebMemex,WorldBrain/WebMemex
src/activity-logger/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport R from 'ramda';\nimport isUpperCase from '../src/is-upper-case.js';\n\n// a -> a\nconst swapCase = R.compose(\n R.join(''),\n R.map(\n R.either(\n R.both(isUpperCase, R.toLower),\n R.both(R.compose(R.not, isUpperCa...
javascript
edit
0
0
mit
946f15805eb7d05ca50e5b697e1dec9dc78203a3
restrung/restrung-js
src/swap-case.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar config = require('./config');\nvar http = require('http');\nvar bot = require('./modules/bot.js');\nvar tg = require('./modules/telegramAPI');\n\ntg.setupWebhook();\n\nhttp.createServer(function (req, res) {\n var body = '';\n\n ...
javascript
edit
0
3
mit
dea5210f4d75bda06a1ae623f6b545b25e49c63a
TheBeastOfCaerbannog/last-fm-bot
app.js
rejected_duplicate
Near-duplicate of sample 90829
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction changeTitle () {\n\tvar subject = document.getElementById('mail_subject').value;\n\t\n\tif ((subject == null) || (subject == \"\")) {\n\t\tdocument.title = \"SendMail\";\n\t\tdocument.getElementById('message_title').innerHTML =...
javascript
edit
0
3
mit
5eb05c167e22e21300517a1af59f963341009f19
virajchitnis/SendMail,virajchitnis/SendMail
js/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jslint forin: true */\n\nvar log = console.log;\n\nexports.report = function(file, lint) {\n log(file);\n\n var options = [], key, value,\n i, len, pad, e;\n\n for (key in lint.options) {\n value = lint.options[...
javascript
edit
0
7
bsd-3-clause
9ded2fd4ebc240c372db38393a359adef4252413
BenoitZugmeyer/node-jslint-extractor,afischer-sfly/node-jslint,marcusoftnet/node-jslint,BenoitZugmeyer/node-jslint-extractor
lib/reporter.js
rejected_duplicate
Near-duplicate of sample 82827
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar main = function() {\n $(\".btn-projects\").click(function() {\n $('html,body').animate({\n scrollTop: $(\".proj\").offset().top\n },\n 'slow');\n });\n $(\".btn-about\").click(fun...
javascript
edit
0
3
mit
e817873ffe8edcfbe7892e64353575e452cbdcbe
msembinelli/portfolio-site,msembinelli/portfolio-site
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// LinkedIn:\n$('title').remove();\n$('#name-container').hide();\n$('.profile-picture').hide();\n\n// Logged out:\n$('h1#name').hide();\n$('.reg-upsell').hide();\n$('.name-search').hide();\n\n// These should appear only if you're alread...
javascript
edit
0
0
mit
b0f04f52b03ebe65f1e545638f5d169f20f0992f
fureigh/unbias-me
source/linkedin.js
rejected_duplicate
Near-duplicate of sample 68966
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(browser){\n return {\n trade: function(){\n var data = browser.globals.pages.ticktrade;\n var login = browser.globals.pages.login;\n return browser\n .v...
javascript
edit
0
1
apache-2.0
95d4d4b21a59516759edd18ea57c04d03cce16cf
binary-com/binary-next-gen-nightwatch
pages/ticktrade.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport 'isomorphic-fetch'\nimport { call, select } from 'redux-saga/effects'\nimport { accessTokenSelector } from './selectors'\n\nexport function* fetchCredentials() {\n const accessToken = yield select(accessTokenSelector)\n if (acc...
javascript
edit
0
3
mit
af28476761665fd72598dac69a3fb2e50def35b0
ello/webapp,ello/webapp,ello/webapp
src/sagas/api.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport 'dom4';\nimport Promise from 'bluebird';\nimport { polyfill as smoothscroll } from 'smoothscroll-polyfill/src/smoothscroll';\n\nsmoothscroll();\nwindow.Promise = Promise;\n\n```\n\nApply this change: Remove weird hack, it's not f...
javascript
edit
0
0
mit
ad91b04f73277bc0a7ae8c52db6c9a70979168f6
npms-io/npms-www,npms-io/npms-www
src/polyfills.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\n/**\n * Scans all currently visible rooms and records useful information about them.\n */\n\nclass EmpireIntel extends kernel.process {\n constructor (...args) {\n super(...args)\n this.priority = PRIORITIES_EMPIR...
javascript
edit
0
6
mit
ac43082c3991172bb6f206ef5787760dd59b5675
ScreepsQuorum/screeps-quorum
src/programs/empire/intel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { clone, toLowerCase, isFunction, isString, hasOwnProperty } from '../util';\nimport { isFunctionalComponent } from './functional-component';\nimport { getNodeType } from '../dom/index';\n\n\n/** Check if two nodes are equivalent...
javascript
edit
0
6
mit
a1b5e074692db7d3b902e60f2b6acb94116b53ea
neeharv/preact,developit/preact,neeharv/preact,developit/preact,gogoyqj/preact
src/vdom/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n/**\n * juice\n * Copyright(c) 2011 LearnBoost <<EMAIL>>\n * MIT Licensed\n */\n\nmodule.exports = exports = Property;\n\n/**\n * Module dependencies.\n */\n\nvar compare = require('./utils').compare\n\n/**\n * CSS property constructo...
javascript
edit
0
2
mit
6ee492fddfb25ae9785fa0679821b75857edfae9
jrit/juice,andrewrk/juice,jrit/juice,ILUMY/juice,ILUMY/juice,jrit/juice,proofme/juice,proofme/juice
lib/property.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nrequire.config({\n paths: {\n \"goo\": \"src/goo\",\n \"test\": \"test\"\n },\n waitSeconds: 5\n });\nrequire([\n // Require does not allow us to add dependencies with wildcards...\n 'test/math/MathUtils',\...
javascript
edit
0
1
mit
437fc05bf0805d20a127b5952e6e7fd949e0b11f
GooTechnologies/goojs,GooTechnologies/goojs,GooTechnologies/goojs
test/main-test.js
rejected_duplicate
Near-duplicate of sample 77632
true