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';\n\nimport styles from 'stylesheets/components/common/typography';\n\nconst Rectangle = () => (\n <div>\n <h1 className={styles.heading}>Rechteck</h1>\n <div>\n <h2>Eingabe</h2>\n <form>\n ...
javascript
edit
0
2
mit
f321bea271fd94c665c1e524a743e2b88ed21134
laschuet/geometrie_in_react,laschuet/geometrie_in_react
src/components/Rectangle.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n // TODO: platforms shouldn't be hardcoded here\n var platforms = ['win64'];\n\n // Build up array of destinations for Twister deamon files\n var destinations = {files: []};\n platfor...
javascript
edit
0
1
mit
d54be665eda70dbb074de72704eb64311e5d8c84
ArcoMul/Twisting,ArcoMul/Twisting
Gruntfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nclass ImageCardComponent extends React.Component {\n static propTypes = {\n uri: React.PropTypes.string.isRequired,\n uploadedAt: React.PropTypes.string.isRequired\n };\n\n render() {\n return (...
javascript
edit
0
1
mit
272693c4b3f83542e72cac826171b712903dd0a7
ykzts/gyazo-web-client
src/components/ImageCardComponent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n\tApplication-wide metadata is stored here for reuse\n*/\nmodule.exports = {\n\tFRONTEND_VERSION: 31\n};\n\n```\n\nApply this change: Increment version to force refresh" }, { "role": "assistant", "conte...
javascript
edit
0
0
mit
f27b29bc8075903889eb854f6641a4704add59cf
nicktindall/cyclon.p2p-webrtc-demo,nicktindall/cyclon.p2p-webrtc-demo
AppMetadata.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar canihaz = require('canihaz'),\n fs = require('fs'),\n p = require('path');\n\n/**\n * Install dependency modules that are not yet installed, and needed for executing the tasks.\n *\n * @param {Array} depNames: an array of dependen...
javascript
edit
0
3
mit
e714a374e85fbf90dffcdf4c9991cdb0ce1e35c2
cliffano/bob
lib/deps.js
rejected_duplicate
Near-duplicate of sample 102182
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction setupLinkHandling() {\n window.history.pushState({\"html\": document.documentElement.outerHTML}, \"\", window.location.href);\n\n var anchors = document.getElementsByTagName(\"a\");\n\n for (var i = 0; i < anchors.leng...
javascript
edit
0
3
mit
787aba818986daf0a17342b8d86918c8925541e8
atomhacks/club,atomhacks/club,atomhacks/club
js/links.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs')\nvar path = require('path')\n\nvar codeBlocks = document.querySelectorAll('code[data-path]')\nArray.prototype.forEach.call(codeBlocks, function (code) {\n code.textContent = fs.readFileSync(path.join(__dirname, c...
javascript
edit
0
1
mit
2ba4862ed41b50cf8a2dc7eb67abf0fc7b7426cf
electron/electron-api-demos,electron/electron-api-demos,blep/electron-api-demos,blep/electron-api-demos,electron/electron-api-demos,PanCheng111/XDF_Personal_Analysis,blep/electron-api-demos,blep/electron-api-demos,PanCheng111/XDF_Personal_Analysis,PanCheng111/XDF_Personal_Analysis
assets/code-blocks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst CleanWebpackPlugin = require('clean-webpack-plugin');\n\nmodule.exports = {\n entry: {\n login: './public/src/js/login.js',\n register: './public/src/js/register.js',\n 'admin-search': './p...
javascript
edit
0
0
bsd-3-clause
e8a791cb546031733f1e74c2831e28fd0685cec1
usi-lfkeitel/packet-guardian,packet-guardian/packet-guardian,packet-guardian/packet-guardian,usi-lfkeitel/packet-guardian,packet-guardian/packet-guardian,usi-lfkeitel/packet-guardian,packet-guardian/packet-guardian,packet-guardian/packet-guardian
webpack.common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nw/**\n * Latvian translation for foundation-datepicker\n * Artis Avotins <<EMAIL>>\n */\n\n;(function($){\n $.fn.fdatepicker.dates['lv'] = {\n days: [\"Svētdiena\", \"Pirmdiena\", \"Otrdiena\", \"Trešdiena\", \"Ceturtdiena\", ...
javascript
edit
0
1
apache-2.0
94e165492705454da2f6fae8c9d3ca3902e2c35f
najlepsiwebdesigner/foundation-datepicker,najlepsiwebdesigner/foundation-datepicker
js/locales/foundation-datepicker.lv.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport GameStateManager from \"./GameStates/GameStateManager\";\nimport CommandParser from \"./Commands/CommandParser\";\nimport GenerateName from \"./Generators/NameGenerator\";\n\nexport default {\n install: (Vue) => {\n Vue.proto...
javascript
edit
0
1
mit
14d3e65b2130937df97b0f1c3837a97bea28b5e9
Trymunx/Dragon-Slayer,Trymunx/Dragon-Slayer
src/game/vue-game-plugin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar argv = require('cmdenv')('micromono')\n\n/**\n * Parse commmand line and environment options\n */\nargv\n .allowUnknownOption()\n .option('-s --service [services]', 'Names of services to require. Use comma to separate multiple ser...
javascript
edit
0
0
mit
277bf2ab16b7936a35dcf65fa886ee836a2f98e5
lsm/micromono,lsm/micromono,lsm/micromono
lib/argv.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// Configuration for the New Relic Node.js agent\n\nexports.config = {\n app_name: process.env.NEW_RELIC_APP_NAME || 'app',\n logging: {\n filepath: process.env.NEW_RELIC_LOG || 'stdout'\n }\n};\n\n```\n...
javascript
edit
0
0
mit
e75e4cd6e3f596cee337e7e6da2fb25d8edc3f0c
dragonservice/sso-angularjs-skeleton,dragonservice/sso-angularjs-skeleton
newrelic.js
rejected_duplicate
Near-duplicate of sample 78073
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n( function() {\n\nwin = null;\n\nmodule.exports = {\n show: function() {\n if ( win === null ) {\n win = window.open('splashscreen.html');\n }\n },\n\n hide: function() {\n if ( win !== null ) {\...
javascript
edit
0
2
apache-2.0
f46aae10757ea8d86d1870503972e7c8d379aa81
IWAtech/cordova-plugin-splashscreen,Icenium/cordova-plugin-splashscreen,revolunet/cordova-plugin-splashscreen,journeyapps/cordova-splashscreen,bamlab/cordova-plugin-splashscreen,chrskrchr/cordova-plugin-splashscreen,sportstech/cordova-plugin-splashscreen,Panajev/cordova-plugin-splashscreen,journeyapps/cordova-splashscr...
src/tizen/SplashScreenProxy.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst yeoman = require( 'yeoman-generator' );\nconst description = require( './description' );\n\nmodule.exports = yeoman.Base.extend({\n constructor: function constructor( ...args ) {\n yeoman.Base.apply( this, args );\n this.ar...
javascript
edit
0
2
mit
51df22908705f471b0128416b6843c2351ab2036
edloidas/generator-tao
app/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n[ \"https://${test.server.name}/oxauth-rp/home.seam\",\n \"https://client.example.org/callback\",\n \"https://client.example.org/callback2\",\n \"https://client.other_company.example.net/callback\",\n \"https://client.exampl...
javascript
edit
0
0
mit
7206d486166786c27862f373a90d942bddbff935
madumlao/oxAuth,madumlao/oxAuth,madumlao/oxAuth,madumlao/oxAuth,GluuFederation/oxAuth,GluuFederation/oxAuth,GluuFederation/oxAuth,madumlao/oxAuth,GluuFederation/oxAuth,GluuFederation/oxAuth
Server/src/test/resources/client/sector_identifier.js
rejected_duplicate
Near-duplicate of sample 100548
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar serviceName = \"facebook\";\n\nvar request = require(\"request\");\nvar serviceConfig = require(\"./../config/services.config.json\");\n\nvar result = {\n service: serviceName,\n status: false\n}\n\nf...
javascript
edit
0
5
mit
d9e2d9c515ba46bae3b86ca44119e445ae51e9ee
punit1108/upstatejs
lib/services/facebook.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar contextify = require('contextify');\nvar fs = require('fs');\n\nvar Context = function () {\n var rawContext = contextify();\n\n rawContext.globals = rawContext.getGlobal();\n\n return {\n run: funct...
javascript
edit
0
2
mit
780def87c61f5aa1a0af7f25e85abe79a16d55c5
fusikky/node-angularcontext,rit/node-angularcontext,thrashr888/node-angularcontext,apparentlymart/node-angularcontext
lib/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst NODE_ENV = process.env.NODE_ENV || 'development';\nconst webpack = require('webpack');\nconst path = require('path');\n\nconst PATHS = {\n app: path.join(__dirname, 'app'),\n build: path.join(__dirname, 'bui...
javascript
edit
0
0
mit
7de243b38dc879ee29e34adf1e3a0fd49f772592
boriskaiser/starterkit,boriskaiser/starterkit
webpack.config.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(className, properties) {\n const decls = _.map(properties, (value, property) => {\n return postcss.decl({\n prop: _.kebabCase(property),\n va...
javascript
edit
0
1
mit
2759872ce05575f6d5bc45a5df9f071d8763c089
tailwindcss/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss
src/util/defineClass.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n mare.views.Home = Backbone.View.extend({\n el: 'body',\n\n initialize: function() {\n \t// DOM cache any commonly used elements to improve performance\n \tthis.$featur...
javascript
edit
0
1
mit
bd4355e232324d68689443b524683c803b9991ed
autoboxer/MARE,autoboxer/MARE
public/js/views/home.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\nexport default class InfoView {\n\n constructor(serializedState) {\n // Create root element\n this.rootElement = document.createElement('div')\n this.rootElement.classList.add('root-info')\n\n // Create messa...
javascript
edit
0
1
mit
3857c7cce4967365d560dc8ed4c9436cac6409e9
THM-MoTE/mope-atom-plugin
lib/info-view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar ascii = require('image-to-ascii');\n\nfunction mock() {\n return function(url, callback) {\n callback('[ascii art]');\n };\n}\n\nfunction prod() {\n return function(url, callback) {\n ascii({\n colored...
javascript
edit
0
2
mit
6568e4bacc41eb4666aa37a007a39215432fea37
earldouglas/sectery
lib/ascii-art.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\n $.ajax({\n url: '/questions/index',\n method: 'GET',\n dataType: 'json'\n }).done(function(data){\n user_questions = data['questions']\n updateQuestions(user_questions);\n });\n\n\n ...
javascript
edit
0
1
mit
d8271950357cda3fd4fdefc79e4c1f95432b8c41
n-zeplo/AskDBC,n-zeplo/AskDBC
public/js/initialize.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// On this codelab, you will be streaming only video (video: true).\nconst mediaStreamConstraints = {\n video: true,\n};\n\n// Video element where stream will be placed.\nconst localVideo = document.querySelector('vide...
javascript
edit
0
1
apache-2.0
a4703dc67d0857d52911c68ce4dc42f20629dc79
googlecodelabs/webrtc-web,googlecodelabs/webrtc-web
step-01/js/main.js
rejected_duplicate
Near-duplicate of sample 83440
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst MATHOID_IMG_CLASS = 'mwe-math-fallback-image-inline';\n\nconst MediaSelectors = [\n '*[typeof^=mw:Image]',\n '*[typeof^=mw:Video]',\n '*[typeof^=mw:Audio]',\n `img.${MATHOID_IMG_CLASS}`\n];\n\nconst Vi...
javascript
edit
0
1
apache-2.0
02cb89e6786714e27778478c18f9df6b501009c8
wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps,wikimedia/mediawiki-services-mobileapps
lib/selectors.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n(function() {\n var root = this;\n\n var Countdown = function(duration, onTick, onComplete){\n this.secondsLeft = duration;\n var tick = function() {\n if (this.secondsLeft > 0) {\n onTick(this...
javascript
edit
0
2
mit
adf821a39271131ef5ba4116b29ec38a6a3b13db
gumroad/countdown.js
lib/countdown.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { combineReducers } from 'redux'\nimport { reducer as form } from 'redux-form'\nimport filter from './components/filter/filter.reducer'\nimport routes from './components/routes/routes.reducer'\nimport sort from './components/sort...
javascript
edit
0
0
mit
9bbb27f85c6c8b59d19d620803cb75eb24fa74ed
chrisronline/route-finder,chrisronline/route-finder
app/reducers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { getUrlFromCriterias, storeToArray } from './utils';\n\ndescribe('Utils', () => {\n test('getUrlFromCriterias', () => {\n expect(getUrlFromCriterias()).toBe('');\n expect(getUrlFromCriterias({})).toBe('');\n expect(get...
javascript
edit
0
1
mit
44811f0ca64f2ebd7aea57ab9398cf80d0371588
InseeFr/Pogues,InseeFr/Pogues,InseeFr/Pogues
src/utils/utils.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports.test = function(uiTestCtx) {\n\n describe('Module test: checkout:stub', function() {\n const { config, helpers: { login, openApp, logout }, meta: { testVersion } } = uiTestCtx;\n const nightmare = new Nightmare(con...
javascript
edit
0
1
apache-2.0
d726aacd848520d79223f6b128cf2768c32b5812
cledvina/ui-instances
test/ui-testing/stub.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar humps = require('humps');\n\nvar STATUS_CONNECTING = 'connecting',\n\tSTATUS_CONNECTED = 'connected',\n\tSTATUS_DISCONNECTED = 'disconnected',\n\tSTATUS_ERROR = 'error',\n\tSTATUS_CLOSED = 'closed',\n\tSTATUS_UNKNOWN = 'unknown';\n\...
javascript
edit
0
3
apache-2.0
749a1d238ac408827671189820a31d77951f6a07
rtc-io/rtc-health,eightyeight/rtc-health
lib/util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { moduleForComponent, test } from 'ember-qunit';\nimport startApp from '../../helpers/start-app';\nvar App;\n\nmoduleForComponent('email-input', 'email-input component', {\n setup: function() {\n A...
javascript
edit
0
1
mit
05b7b2045613cb6c7cc6507a0ade7028016c9df9
pzuraq/ember-inputmask,blimmer/ember-inputmask,blimmer/ember-inputmask,pzuraq/ember-inputmask
tests/unit/components/email-input-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mongoModel = require('./mongo-model');\nconst sqlModel = require('./sql-model');\n\nfunction main() {\n sqlModel.sequelize.sync()\n .then(() => mongoModel.find({}))\n .then(users => {\n console.log('MongoDB query done....
javascript
edit
0
2
mit
28a144d15ebab7c5eaae35fc8fd432962da25046
Holi0317/sms-library-helper,Holi0317/sms-library-helper,Holi0317/sms-library-helper,Holi0317/sms-library-helper
migrate/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports.config = {\n files: {\n javascripts: {\n joinTo: {\n \"js/app.js\": /^app/,\n \"js/vendor.js\": /^(?!app)/\n },\n order: {\n before: [\n \"bower_components/jquery/dist/jque...
javascript
edit
0
0
mit
6498f1040644407b5b28d52c54e959d94fa40865
chubas/instaband,gdljs/instaband,gdljs/instaband,chubas/instaband
brunch-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global console, MashupPlatform */\n\nvar UserAPI = (function () {\n \"use strict\";\n\n var url = \"https://account.lab.fiware.org/user\";\n\n /*****************************************************************\n * ...
javascript
edit
0
1
apache-2.0
0897f65359bb90e777866f9af6be8601ed5062c4
fidash/widget-calendar,fidash/widget-calendar
src/js/UserAPI.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\n/**\n * New Relic agent configuration.\n *\n * See lib/config.defaults.js in the agent distribution for a more complete\n * description of configuration variables and their potential values.\n */\nexports.config = {\n /...
javascript
edit
0
0
mit
386c6336dd96ca76768ff0245eef00bfbd0b167c
DoSomething/blink,DoSomething/blink
newrelic.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar slice = [].slice\nvar util = require('util')\n\nexports.createInterrupterCreator = function (_Error) {\n return function (path) {\n var ejector = function (name, depth, context, properties) {\n var vargs = slice...
javascript
edit
0
10
mit
4b6e340e7683e57a5747d4b3b57e419d4f1545fa
bigeasy/interrupt
bootstrap.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction makeBarChart() {\n var xScale = new Plottable.OrdinalScale().rangeType(\"bands\");\n var yScale = new Plottable.LinearScale();\n\n var xAxis = new Plottable.XAxis(xScale, \"bottom\", function(d) { return d; });\n var yAxis ...
javascript
edit
0
1
mit
eca9c24ce69b92dfb9d97424c8dd67518dcf3489
iobeam/plottable,RobertoMalatesta/plottable,softwords/plottable,iobeam/plottable,jacqt/plottable,danmane/plottable,RobertoMalatesta/plottable,onaio/plottable,NextTuesday/plottable,onaio/plottable,alyssaq/plottable,gdseller/plottable,iobeam/plottable,gdseller/plottable,palantir/plottable,gdseller/plottable,NextTuesday/p...
tutorials/barChart/barChart.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright (c) 2013 Csernik Flaviu Andrei\n *\n * See the file LICENSE.txt for copying permission.\n * \n */\n\n\"use strict\";\n\nfunction PropertyNotInitialized(obj, propName) {\n this.property = propName;\n this.obj = ob...
javascript
edit
0
3
mit
9d311a37f5381ed26a7e212966f30d5a14bc60ca
archblob/amit
src/lib/common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst COMPOSITION_METHODS = ['compose', 'flow', 'flowRight', 'pipe'];\nconst FOREACH_METHODS = ['forEach', 'forEachRight', 'each', 'eachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight'];\nconst SIDE_EFFECT_METHODS...
javascript
edit
0
0
mit
b25451ded86bab0ed28424131e1a826b4479c69f
jfmengels/eslint-plugin-lodash-fp
rules/core/constants.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jshint rhino:true*/\nprint(\"Rhino showcase\");\nload(\"src/boot.js\");\n\njava.lang.System.exit(0);\n\n```\n\nApply this change: Allow boot by specifying the source path" }, { "role": "assistant", "content": "/*jshint rhi...
javascript
edit
0
0
mit
45ec083349602a01eacfaf7416e48c9fb2cd5ca7
ArnaudBuchholz/gpf-js,ArnaudBuchholz/gpf-js
test/host/rhino.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n(function() {\n angular.module('bifrost',[\n 'lumx',\n 'ui.router',\n 'lbServices',\n 'leaflet-directive',\n 'ngMaterial',\n 'angularFileUpload'\n ])\n .config(function($stateProvider, $urlRouterPro...
javascript
edit
0
2
mit
593695be54f4e68a613cdb1b514ae90d1a3cb362
bifrostio/bifrost,bifrostio/bifrost
client/scripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar $ = require('jquery');\nvar Clipboard = require('clipboard');\n\nvar setTooltip = function (elm, message) {\n $(elm).tooltip('hide')\n .attr('title', message)\n .tooltip('show');\n}\n\nvar hideTooltip = fun...
javascript
edit
0
1
apache-2.0
d2a4451e43db96c425f5546ed5b9fe08bb1588df
Johnetordoff/osf.io,sloria/osf.io,icereval/osf.io,felliott/osf.io,baylee-d/osf.io,felliott/osf.io,cslzchen/osf.io,brianjgeiger/osf.io,chennan47/osf.io,mfraezz/osf.io,TomBaxter/osf.io,crcresearch/osf.io,mattclark/osf.io,adlius/osf.io,caneruguz/osf.io,TomBaxter/osf.io,saradbowman/osf.io,HalcyonChimera/osf.io,icereval/osf...
website/static/js/clipboard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n 'extends': '../.eslintrc.js',\n\n 'env': {\n 'mocha': true\n },\n\n 'rules': {\n 'func-names': 0,\n 'no-unused-expressions': 0,\n 'no-console': 0,\n\n // These are said to be deprecated, but we us...
javascript
edit
0
0
mit
66b3fb8e7f084eda5d25c6d17af213d1596649a7
NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet,NiGhTTraX/react-test-buffet
tests/.eslintrc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path \t\t= require('path');\nvar rootPath \t= path.normalize(__dirname + '/../../');\n\nmodule.exports \t= {\n local: {\n baseUrl: 'http://localhost:3051',\n db: 'mongodb://localhost/rp_local',\n rootPath: ro...
javascript
edit
0
0
mit
5ab2f046e70580bca75b8c3e8dc69a61af17be09
NRGI/rp-org-frontend,NRGI/rp-org-frontend
server/config/config.js
rejected_duplicate
Near-duplicate of sample 71910
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2014 The Closure Library Authors. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy...
javascript
edit
0
1
apache-2.0
7c402a2c17fb491c5ea2ac212d4a89c15b093c5d
google/closure-library,lucidsoftware/closure-library,lucidsoftware/closure-library,lucidsoftware/closure-library,google/closure-library,lucidsoftware/closure-library,google/closure-library,google/closure-library,google/closure-library
closure/goog/test_module.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as path from \"path\";\nimport merge from \"webpack-merge\";\nimport HtmlWebpackPlugin from \"html-webpack-plugin\";\nimport webpack from \"webpack\";\nimport getCommon from \"./common\";\n\nmodule.exports = config =>\n getCom...
javascript
edit
0
3
mit
22b4fdbbef2d1fcff51334fa1ae5492345ec6576
antwarjs/antwar
packages/antwar/src/config/dev.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nchrome.app.runtime.onLaunched.addListener(function() {\n chrome.app.window.create('chrome.html', {\n 'bounds': {\n 'width': 1024,\n 'height': 768\n }\n });\n});\n```\n\nApply th...
javascript
edit
0
4
mit
cc2dc0d455685b8294dc9b23bdad33f715afafd6
sheafferusa/mail-html5,clochix/mail-html5,halitalf/mail-html5,kalatestimine/mail-html5,dopry/mail-html5,kalatestimine/mail-html5,whiteout-io/mail,whiteout-io/mail,tanx/hoodiecrow,halitalf/mail-html5,b-deng/mail-html5,dopry/mail-html5,whiteout-io/mail-html5,sheafferusa/mail-html5,whiteout-io/mail-html5,halitalf/mail-htm...
src/background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n environment: environment,\n baseURL: '/',\n locationType: 'hash',\n EmberENV: {\n FEATURES: {\n // Here you can enable experime...
javascript
edit
0
5
apache-2.0
35bb630e30e6ec721a1b2dbfceccc8bdc6fef425
fhchina/Klondike,Stift/Klondike,Stift/Klondike,fhchina/Klondike,fhchina/Klondike,Stift/Klondike,themotleyfool/Klondike,themotleyfool/Klondike,davidvmckay/Klondike,jochenvangasse/Klondike,themotleyfool/Klondike,jochenvangasse/Klondike,davidvmckay/Klondike,jochenvangasse/Klondike,davidvmckay/Klondike
config/environment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar split = require('./split-file.js');\n\nif (require.main === module) {\n cli();\n}\n\nfunction cli() {\n var option = process.argv[2];\n switch (option) {\n case '-m':\n cliMerge();\n break;\n ...
javascript
edit
0
3
mit
117ce3f5b86de2ec4d773537bd88c9f2e9d38391
tomvlk/node-split-file
split-file-cli.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport types from '../types'\nimport createReducer from '../shared/create-reducer';\n\nconst initialState = []\n\nfunction itemsRequest( state ){ return state }\n\nfunction itemsError( state ){ return state }\n\nfunction itemsSucess(sta...
javascript
edit
0
2
mit
e2d99cbda42e1993f667cbf09e9c20b6f325cdfe
atSistemas/react-base
src/reducers/Items.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'letnar-frontend',\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n adapterNamespace: 'api',\n con...
javascript
edit
0
4
mit
c2aa71310c99a5dd6d6c827afa9ee3f3ca2338c7
simi/ember-map-demo,simi/ember-map-demo
config/environment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n(function(Rubeus) {\n\n Rubeus.cfg.s3 = {\n\n uploadMethod: 'PUT',\n uploadUrl: null,\n uploadAdded: function(file, item) {\n var self = this;\n var parent = self.getByID(item.parentID);\n...
javascript
edit
0
3
apache-2.0
14c1746ece7314d8c906aeb4272bb288a15947c3
Ghalko/osf.io,sloria/osf.io,bdyetton/prettychart,GageGaskins/osf.io,abought/osf.io,petermalcolm/osf.io,erinspace/osf.io,zachjanicki/osf.io,mluo613/osf.io,doublebits/osf.io,CenterForOpenScience/osf.io,jolene-esposito/osf.io,himanshuo/osf.io,lyndsysimon/osf.io,mluke93/osf.io,Johnetordoff/osf.io,danielneis/osf.io,canerugu...
website/addons/s3/static/s3-rubeus-cfg.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst dotenv = require('dotenv');\n\ndotenv.config();\n\nmodule.exports = {\n development: {\n username: 'Newman',\n password: 'andela2017',\n database: 'postit-db-dev',\n host: '127.0.0.1',\n port: 5432,\n secret_key...
javascript
edit
0
0
mit
55b57b2b4c4df03b7b802c748a19c6489f7ef026
Philipeano/post-it,Philipeano/post-it
server/config/config.js
rejected_duplicate
Near-duplicate of sample 100896
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// activity item template\nvar itemtemplate = ['<div class=\"activity-item\">',\n\t'<a href=\"{{modifier_url}}\">',\n\t\t'<img src=\"{{modifier_siteicon}}\" />',\n\t'</a>',\n\t'<div>',\n\t\t'<p>',\n\t\t\t'<a href=\"{{modifier_url}}\">{{...
javascript
edit
0
1
bsd-3-clause
db1dcca22cfc9f5e4adf4c8e90d6e792ce9ee5ca
TiddlySpace/tiddlyspacesockets,TiddlySpace/tiddlyspacesockets
src/ts-sockets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Fetch all the files to be loaded by Karma; parse the actual tests\n// based on '.spec.js' filter\nvar tests = [];\nfor (var file in window.__karma__.files) {\n\tif (window.__karma__.files.hasOwnProperty(file)) {\n\t\tif (/\\.spec\\.j...
javascript
edit
0
1
mit
9a7d13540e5a731ec868d8051600c17d93683337
SC5/grunt-boreless-boilerplate,SC5/grunt-boreless-boilerplate
src/test/test-main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Local web server running on port 9001 with livereload functionality\n\nmodule.exports = function(grunt) {\n grunt.config('connect', {\n livereload: {\n options: {\n port: 9001,\n mid...
javascript
edit
0
1
mit
1548ab81fd04e92a7a32ddfaeb072cd72493877d
yellowled/yl-bp,yellowled/yl-bp
grunt/contrib-connect.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction AppCtrl($scope, $http) {\n\t$scope.search = function() {\n\t\t$scope.loading = true;\n\t\t$scope.movie = null;\n\n\t\t$http.get('/search/' + $scope.imdbId).then(function(response) {\n\t\t\t$scope.loading = false;\n\t\t\t$scope....
javascript
edit
0
1
mit
3d22c4f290734201fd8466a18c529c82c33a0660
renstrom/imdb-api,renstrom/imdb-api
static/js/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*globals svgEditor, svgCanvas*/\n/*jslint eqeq: true*/\n/*\n * ext-panning.js\n *\n * Licensed under the MIT License\n *\n * Copyright(c) 2013 Luis Aguirre\n *\n */\n \n/* \n\tThis is a very basic SVG-Edit extension to let tablet/mobil...
javascript
edit
0
2
bsd-2-clause
d6cb1d94c0a0397615ba5f4f90ac281b644ab3d9
Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-enhanced,Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-2-enhanced,Glutanimate/image-occlusion-enhanced
image_occlusion_enhanced/svg-edit/svg-edit-2.6/extensions/ext-panning.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// commonjs code goes here\n\n(function () {\n var i18n = window.i18n = require('i18next');\n var XHR = require('i18next-xhr-backend');\n var lngDetector = require('i18next-browser-languagedetector');\n var Cache = require('...
javascript
edit
0
2
apache-2.0
99c430f70769028a876db54df19e359cca03b128
punchagan/zulip,showell/zulip,andersk/zulip,paxapy/zulip,susansls/zulip,dattatreya303/zulip,timabbott/zulip,verma-varsha/zulip,eeshangarg/zulip,jrowan/zulip,blaze225/zulip,sharmaeklavya2/zulip,jainayush975/zulip,souravbadami/zulip,eeshangarg/zulip,synicalsyntax/zulip,peguin40/zulip,j831/zulip,sup95/zulip,dawran6/zulip,...
static/js/src/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Developed by Radu Puspana\n * Date August 2017\n * Version 1.0\n */\n\n\n// Round the n-th decimal of a float number\n// number Number the floating point number to be rounded\n// decimalIndex Number the decimal position...
javascript
edit
0
2
mit
1cebf1bf3cd75e2ba67062078dd178594f41d7e1
rpuspana/myExpenses,rpuspana/myExpenses
js/library.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\nmodule.exports = function(config) {\n\tconfig.set({\n\t\tbasePath: '',\n\t\tframeworks: ['jasmine-jquery', 'jasmine'],\n\t\tfiles: [\n\t\t\t'src/audiochart.js',\n\t\t\t'spec/*.html',\n\t\t\t'spec/*.js'\n\t\t],\n\t\treporte...
javascript
edit
0
1
mit
480fa7537fda14c7f25d986b2276565271a96323
matatk/audiochart,matatk/audiochart
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require(\"path\");\nconst parts = require(\"./webpack.parts\");\n\nmodule.exports = config => {\n const tests = \"tests/*.test.js\";\n\n config.set({\n frameworks: [\"mocha\"],\n\n files: [\n {\n pattern...
javascript
edit
0
1
mit
59292cc35cbfdebbedd4a58f7527a715d4dc5f55
survivejs-demos/webpack-demo
karma.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport boot from './boot';\nimport logger from 'debug';\nimport React from 'react/addons';\n\nconst debug = logger('app:init');\n\n// Executed when the browser has loaded everything.\nwindow.onload = () => {\n debug('`onload` event f...
javascript
edit
0
1
mit
a92338bff1d78a07bd7598867b9a08e071317394
jsilvestre/tasky,jsilvestre/tasky,jsilvestre/tasky
client/src/initialize.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @license\n * Copyright 2019 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'io.c9.ace',\n name: 'Config',\n properties: [\n {\n class: 'Int',\n ...
javascript
edit
0
0
apache-2.0
714e1d5cc8a46a1466cc5e1a2e75ddf43e4fc78f
foam-framework/foam2,foam-framework/foam2,foam-framework/foam2,jacksonic/vjlofvhjfgm,foam-framework/foam2,jacksonic/vjlofvhjfgm,jacksonic/vjlofvhjfgm,foam-framework/foam2
src/io/c9/ace/Config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst BaseStep = require('./base-step');\n\nmodule.exports = class VoidStep extends BaseStep {\n start() { return new Promise(() => {}); }\n};\n\n```\n\nApply this change: Add an action function to void steps so as to ...
javascript
edit
0
2
bsd-3-clause
144d98ff633d3d00868e1aa716d85ea5f9ced5a6
kiteco/kite-installer
lib/install/void-step.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This function is run when the app is ready to start interacting with the host application.\n// It ensures the DOM is ready before updating the span elements with values from the current message.\nOffice.initialize = function () {\n ...
javascript
edit
0
2
mit
1cee6a5ef930508959fdde398285ea181655fbca
stephenegriffin/MHA,stephenegriffin/MHA,stephenegriffin/MHA
Scripts/Default.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport bg from 'gulp-bg';\nimport gulp from 'gulp';\n\n// If this doesn't work, while manual Xcode works, try:\n// 1) delete ios/build directory\n// 2) reset content and settings in iOS simulator\ngulp.task('ios', ['native'], bg('react-...
javascript
edit
0
0
mit
17fb38813a8b843c889e8fa826e5d686fad4ff1a
robinpokorny/este,abelaska/este,TheoMer/este,christophediprima/este,TheoMer/este,syroegkin/mikora.eu,christophediprima/este,sikhote/davidsinclair,TheoMer/este,christophediprima/este,steida/este,amrsekilly/updatedEste,este/este,christophediprima/este,abelaska/este,skallet/este,abelaska/este,skallet/este,sikhote/davidsin...
gulp/ios.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n if (window.location.href.search(/query=/) == -1) {\n $('#query').one('click, focus', function() {\n $(this).val('');\n });\n }\n\n $(document).bind('keyup', function(event) {\n if ($(eve...
javascript
edit
0
1
mit
a2f5836cc763ed63d2bba47e494c636f64ef0b7e
rubygems/rubygems.org-backup,square/rubygems.org,rubygems/rubygems.org-backup,square/rubygems.org,square/rubygems.org,rubygems/rubygems.org-backup
public/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {Router} from 'express'\nimport models from '../models';\n\nexport default () => {\n\tlet app = Router()\n\n\n\tapp.get('/new', (req, res) => {\n\t\tres.render('tasks/new')\n\t})\n\n\tapp.get('/:id', (req, res) => {\n\t\tmodels.T...
javascript
edit
0
1
mit
08b70906907f70d83a2e441bce45863c3f749c85
taodav/MicroSerfs,taodav/MicroSerfs
api/routes/tasks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport Text from './text';\nimport Radio from './radio';\nimport Select from './select';\nimport Date from './date';\nimport Blob from './blob';\nimport Number from './num...
javascript
edit
0
8
mit
c1eb5999f16ebb5bae06babafc91e64f34db0c2b
Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher,Vizzuality/forest-watcher
app/components/common/form-inputs/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar server = require('webserver').create(),\n fs = require('fs');\nvar serverUrl = '127.0.0.1:8888';\n\nvar workingDirectory = fs.workingDirectory.replace(/\\//g, fs.separator);\n\nfunction create() {\n var serverCreated = server....
javascript
edit
0
1
apache-2.0
a36bd915dfe25fbb53da2fc83b6c048beb5fa5af
bperel/geotime,bperel/geotime,bperel/geotime
js/headless/localserver.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {Workbook} from '../src/parsing/workbook.js';\nimport {expect} from 'chai';\nimport fs from 'fs';\n\ndescribe('Workbook parsing', () => {\n\n let file = fs.readFileSync('example/example-with-data.xlsx');\n let wb = new Work...
javascript
edit
0
1
mit
fe0608cb308a8f083a7db4502b0f9c92d37b00e9
biosustain/microplate
test/workbook.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar findup = require('findup-sync');\nvar spawnSync = require('child_process').spawnSync;\nvar gruntPath = findup('node_modules/grunt-cli/bin/grunt', {cwd: __dirname});\n\nprocess.title = 'grunth';\n\nvar harmonyFlags =...
javascript
edit
0
1
mit
e4dfa6dab47f7fb2e9ad815c4069ae5a198e953b
EE/grunth-cli
lib/cli.js
rejected_duplicate
Near-duplicate of sample 93716
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst r = require('../services/reddit');\nlet reportedItemNames = new Set();\nlet hasFinishedFirstRun = false;\n\nconst SUBREDDITS = ['pokemontrades', 'SVExchange'];\n\nmodule.exports = {\n period: 60,\n onStart: true,\...
javascript
edit
0
3
apache-2.0
90ea06f0d7955419f9f19dc464655b4f589fddee
pokemontrades/porygon-bot
tasks/reports.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n // Display correct URL on \"no-experiments\" page. \n $('#base-domain').html(document.location.origin);\n\n // Draw charts on Details page.\n if ($('#details-page').length) { \n var id, alternative_name, color;...
javascript
edit
0
3
bsd-2-clause
3ceb06bb42c156b58e25888b8c97c41f8b320de0
seatgeek/sixpack,seatgeek/sixpack,llonchj/sixpack,vpuzzella/sixpack,vpuzzella/sixpack,nickveenhof/sixpack,blackskad/sixpack,smokymountains/sixpack,llonchj/sixpack,spjwebster/sixpack,llonchj/sixpack,blackskad/sixpack,vpuzzella/sixpack,smokymountains/sixpack,seatgeek/sixpack,seatgeek/sixpack,vpuzzella/sixpack,nickveenhof...
sixpack/static/js/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport * as m from '../models'\nimport parse from 'co-body'\nimport jwt from 'koa-jwt'\nimport {JWT_KEY} from '../config'\n\nexport default ({api}) => {\n\n api.post('/auth', async ctx => {\n const body = await parse.json(ctx)\n ...
javascript
edit
0
6
mit
0e0d3278002b01c4cd0d732fd937141d6a0f262a
websash/q-and-a-react-redux-app,websash/q-and-a-react-redux-app
api-server/src/routes/auth.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nlet apiClient;\n\nclass DrushIOMember {\n\n constructor(client, project, identifier, data = {}) {\n apiClient = client;\n this.identifier = identifier;\n this.project = project;\n this.data = data;\n }\n\n...
javascript
edit
0
2
mit
8747f9e4501b623c8eaa125c455fe1b45a8669bf
drush-io/api-client-js,drush-io/api-client-js
src/project/member/client.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.config = {\n // default: '/'\n routerBasename: '/',\n // default: ''\n relativeWebWorkerScriptsPath: '',\n servers: {\n dicomWeb: [\n {\n name: 'Orthanc',\n wadoUriRoot: 'http://127.0.0.1/pacs/wado',\n ...
javascript
edit
0
0
mit
acbb593cec671d223aa0b13020f1201bb016e987
OHIF/Viewers,OHIF/Viewers,OHIF/Viewers
public/config/example_openidc.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n plugins: [\n require('postcss-import'),\n require('postcss-css-reset'),\n require('postcss-custom-properties'),\n require('postcss-extend'),\n require('postcss-nested'),\n require('postcss-color-f...
javascript
edit
0
0
apache-2.0
1f3cf77f190be4790d555c902957a3fbbf5ebf97
input-output-hk/cardano-sl,input-output-hk/cardano-sl,input-output-hk/cardano-sl,input-output-hk/cardano-sl-explorer,input-output-hk/cardano-sl-explorer,input-output-hk/pos-haskell-prototype,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl-explorer,input-output-hk/cardano-sl,input-output-hk/pos-haskell-...
postcss.config.js
rejected_duplicate
Near-duplicate of sample 70119
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nlet PolarBear = Ember.Object.extend({\n schedule(target, f, interval) {\n return Ember.run.later(this, function() {\n f.apply(target);\n this.start(target, f, interval);\n }, interval);\n },\n\n kill() {\n return E...
javascript
edit
0
1
mit
c0bfd8a797232d1ee43f9f554b932f0c6df10b2f
sozuuuuu/ember-cli-polar-bear,sozuuuuu/ember-cli-polar-bear
addon/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * EksiOkuyucu - unofficial eksisozluk client\n * http://eksiokuyucu.com/\n *\n * Copyright (C) 2014 Onur Aslan <<EMAIL>>\n * Licensed under MIT\n * https://github.com/onuraslan/EksiOkuyucu/blob/master/COPYING\n */\n\nrequire.conf...
javascript
edit
0
1
mit
1e1aaff133bdc271386a02247811063dcbaf672e
onur/EksiOkuyucu,onuraslan/EksiOkuyucu,onur/EksiOkuyucu,onuraslan/EksiOkuyucu
app/js/main.js
rejected_duplicate
Near-duplicate of sample 84030
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"Twilio API Wrapper for Meteor\"\n});\n\nNpm.depends({ \"twilio\": \"1.1.4\" });\n\nPackage.on_use(function(api) {\n if (api.export) api.export('Twilio', 'server');\t\n api.add_files('twilio_npm.js', 's...
javascript
edit
0
2
mit
31cba1e550f8332ca46801b6884159af34324725
bright-sparks/twilio-meteor,andreioprisan/twilio-meteor
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar angular = require('angular');\n\n// Require the almost-static-site main module\nvar mainModule = require('../../main');\n\n// Define the Demo App\nvar app = window.app = angular.module('demoApp', [\n 'assMain'\n]);...
javascript
edit
0
0
mit
3f43dbfb81de9cab58fdc83c02f864872ad69210
unkhz/almost-static-site,unkhz/almost-static-site
examples/demo/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Adapted from https://github.com/etcet/HNES/blob/master/js/hn.js\n\n$(document).ready(function() {\n \n $('body > center > table > tbody > tr:first-child').attr('id', 'header');\n\n $('#header td').removeAttr('bgcolor');\n $('#hea...
javascript
edit
0
1
mit
7dd9607934d0dc964878f570a21274874c719dbe
johnotander/hckrnws
hn.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport defaultConfig from './webpack.config.default';\n\nexport default function webpackConfigAdminExtra(speedupLocalDevelopment, optimize = false) {\n const config = defaultConfig(speedupLocalDevelopment, optimize);\n\n config.en...
javascript
edit
null
null
mit
a05333fe2358143470f2400d902456695987d947
Kunstmaan/KunstmaanGeneratorBundle,Kunstmaan/KunstmaanGeneratorBundle,Kunstmaan/KunstmaanGeneratorBundle
Resources/SensioGeneratorBundle/skeleton/layout/groundcontrol/bin/config/webpack.config.admin-extra.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).on('turbo:load turbo:render', function() {\n var $panels, $tabs;\n $tabs = $('#lab_tests').tabs();\n $panels = $('.ui-tabs-panel');\n $('#departments').tabs({\n cache: true\n });\n $('#departments').tabs('paging', {...
javascript
edit
0
1
mit
671aeb8ef771da601e037ad93af5ce97a2c020c7
Labtec/OpenLIS,Labtec/OpenLIS,Labtec/OpenLIS
app/javascript/old/navtabs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const initialState = {\n loading: false,\n loaded: false,\n data: [],\n error: false\n};\n\nconst setLoading = (loading, state) => ({ ...state, loading });\nconst setLoaded = (loaded, state) => ({ ...state, loaded });\nconst ...
javascript
edit
0
1
mit
152727eb30260004929c5e212cd1217e76deb371
Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch,Vizzuality/climate-watch
app/javascript/app/providers/agriculture-countries-context-provider/agriculture-countries-context-provider-reducers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { clone, pull } = require('./lib/git')\nconst path = require('path')\nconst jetpack = require('fs-jetpack')\n\nconst configuration = require('./configuration')\n\nclass Package {\n constructor (url) {\n this.path = path.join(c...
javascript
edit
0
5
mit
f98f628dec56251db734226843b26a3d5c01e97a
tinytacoteam/zazu,tinytacoteam/zazu
app/package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\nconst Fuse = require('fuse.js')\n\nlet fuse = null\nlet fuseIndex = []\n\nconst fuseOptions = {\n shouldSort: true,\n tokenize: true,\n matchAllTokens: true,\n findAllMatches: true,\n threshold: 0.2,\n location: 0,\n...
javascript
edit
0
3
mit
a472c660b51be2a1aed5012caa68661a0d7906f4
wujysh/Lepton,wujysh/Lepton
app/utilities/search/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable react/prop-types */\nimport React from 'react';\nimport { Image, View, Text } from 'react-sketchapp';\nimport { css, withStyles } from '../withStyles';\n\nconst Profile = ({ user, styles }) => (\n <View {...css(styles...
javascript
edit
0
1
mit
490ae36bd10f9ccf6c8efc89fec5ac5c981a28aa
weaintplastic/react-sketchapp
examples/profile-cards-react-with-styles/src/components/Profile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { Request } from 'react-axios'\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n\nclass App extends React.Component {\n constructor(props) {\n super(props)\n this.state = {}\n }\n\n render() {\n return (\...
javascript
edit
0
4
mit
10921ad47828ed7b5a2c3d6d3e40e7ad69418bc7
sheaivey/react-axios,sheaivey/react-axios
examples/request/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport algolia from 'algoliasearch';\nimport icons from '../dist/icons.json';\nimport tags from '../src/tags.json';\n\nconst ALGOLIA_APP_ID = '5EEOG744D0';\n\nif (\n process.env.TRAVIS_PULL_REQUEST === 'false' &&\n process.env.TRAVIS_...
javascript
edit
0
2
mit
fb057f1f94237885bc027d0f209739cc384166b7
colebemis/feather,colebemis/feather
bin/sync-algolia.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('F1FeederApp.services', [])\n .factory('ergastAPIservice', function($http) {\n\n var ergastAPI = {};\n\n ergastAPI.getDrivers = function() {\n return $http({\n method: 'JSONP', \n url: 'http://er...
javascript
edit
0
1
mit
b676b5db32487ef6754bf4a1ddd2df5d7d455ff2
buchananjason/softsource,buchananjason/softsource
app/js/services.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('materialscommons').component('mcExperimentNotes', {\n templateUrl: 'app/project/experiments/experiment/components/notes/mc-experiment-notes.html',\n bindings: {\n experiment: '='\n }\n});\n\n```\n\nApply ...
javascript
edit
0
1
mit
2db0ace0ed6dd9c869ace773dc2b0aaf03a39a49
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/src/app/project/experiments/experiment/components/notes/mc-experiment-notes.component.js
rejected_duplicate
Near-duplicate of sample 89973
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash');\nvar base = require('./base');\n\nconst development = _.merge({}, base, {\n env: 'development',\n auth0: {\n callbackURL: process.env.AUTH0_CALLBACK_URL || 'http://localhost:9000/auth/cal...
javascript
edit
0
0
mit
5e766f596a8f5173d77e86079555f82bd90a1c38
CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder,CopenhagenCityArchives/kbh-billeder
shared/config/env/development.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n* @ngdoc overview\n* @name torrentSubscribeFrontendApp\n* @description\n* # torrentSubscribeFrontendApp\n*\n* Main module of the application.\n*/\nangular\n.module('torrentSubscribeFrontendApp', [\n 'ngResource'...
javascript
edit
0
1
mit
0aed1cbe613be7a8925c377d9ffbba59ac237de6
aqibmushtaq/torrent-subscribe-frontend,aqibmushtaq/torrent-subscribe-frontend
app/scripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar static_server = require('./static_server');\n\nstatic_server('dist');\n```\n\nApply this change: Allow env to specify dist directory" }, { "role": "assistant", "content": "'use strict';\n\nvar static_ser...
javascript
edit
0
0
mit
65dc838950683034ca613889b24cfb0a1abfb183
UoSMediaFrameworks/uos-media-playback-framework-legacy,UoSMediaFrameworks/uos-media-playback-framework-legacy,UoSMediaFrameworks/uos-media-playback-framework-legacy
app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Moisture simulator\n *\n */\nmodule.exports = function(sensor_id){\n \n var simulator = {};\n\n simulator.id = sensor_id;\n simulator.type = 'humidity';\n simulator.unit = 'humidity.%perL';\n \n simulator.ge...
javascript
edit
0
1
apache-2.0
315a504853934027997a08faf7d91a2da5aead4f
HomeAgain/HomePi
simulators/moisture_simulator.js
rejected_duplicate
Near-duplicate of sample 73512
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar browserify = require('browserify'),\n detective = require('detective');\n\nvar fs = require('fs'),\n Path = require('path');\n\n\nmodule.exports = function (path, cb) {\n fs.readFile(path, { encoding: 'utf8' ...
javascript
edit
0
3
mit
4a78c9450b187a4eb136e6bef52cb46f682243ba
eush77/nodei
lib/scriptify.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react'\nimport classnames from 'classnames'\nimport { jsdom } from 'jsdom'\nimport OrganisationListRow from './OrganisationListRow'\n\n//Snippet taken from https://www.npmjs.com/package/jquer...
javascript
edit
0
2
apache-2.0
e4c11a660be53873fdd47fcbf5fee21c369f0f4d
CodeHubOrg/organisations-database,CodeHubOrg/organisations-database
components/OrganisationList.js
accepted
null
true