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 pluck from './pluck';\nimport {\n noop,\n mixin,\n observable,\n insertCss,\n emptyTemplate,\n computedAll,\n pureComputedAll\n} from '../util/';\n\nconst modulePolyfill = {\n constructor: noop,\n defau...
javascript
edit
0
5
mit
f0543ec50fea760d243cdf0b3d3b15f9a2c8adcd
baza-fe/knockout.register
src/core/transform.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// server.js\n\n/**IMPORT**/\nvar express = require('express');\nvar url = require('url');\nvar inject_pipe = require('./inject-pipe.js');\n\n/** SET **/\nvar app = express();\n\n/**FUNCTION**/\nfunction sendViewMiddleware(req, res, nex...
javascript
edit
0
2
mit
7a95e0e019d30775933440add700b8a2822828cb
Pingze-github/inject-piper,Pingze-github/inject-piper
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Chat = function() {\n //this.members = {};\n //this.messages = [];\n this.state = this.buildState();\n this.colors = [\n 'red',\n 'blue',\n 'green'\n ]\n}\n\nChat.prototype.buildState = function()...
javascript
edit
0
1
unlicense
3a3ba3f254f9dc0e5b5e01b5c9a0dbeef84efb85
mcramm/LiveChat,mcramm/LiveChat
server/chat.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require(\"path\");\nvar express = require(\"express\");\nvar webpack = require(\"webpack\");\nvar config = Object.assign({}, require(\"./webpack.docs.config\"));\n\nconfig.devtool = \"cheap-module-eval-source-map\";\nconfig.e...
javascript
edit
0
2
mit
63593527222d7316a3078a4a4bc93a4f008cc3b5
marketplacer/react-datepicker,mitchrosu/react-datepicker,flexport/react-datepicker,lmenus/react-datepicker,sss0791/react-datepicker,lmenus/react-datepicker,BrunoAlcides/react-datepicker,BrunoAlcides/react-datepicker,bekerov/react-datepicker-roco,Hacker0x01/react-datepicker,bekerov/react-datepicker-roco,marketplacer/rea...
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#set( $prefix=$className.toLowerCase())\n#set( $symbol_dollar = '$' )\n'use strict';\n\nfunction ${className}ListController($scope, $location, ${className}) {\n $scope.${prefix}s = ${className}.query();\n $scope.goto${className}Ne...
javascript
edit
null
null
apache-2.0
e5c6984044d4db25901cf5a9798437d591e02011
cheleb/spring-angular-archetype,cheleb/spring-angular-archetype
src/main/resources/archetype-resources/src/main/webapp/js/app/controllers.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar WebSocketServer = require('ws').Server\n , http = require('http')\n , express = require('express')\n , app = express()\n , port = process.env.PORT || 5000;\n\napp.use(express.static(__dirname + '/'));\n\nvar server = http.create...
javascript
edit
0
3
mit
d0d4c04949e0310f2040032afc8ec90648757dd9
artwise/artwise,artwise/artwise,birgitta410/monart,birgitta410/monart,birgitta410/monart,artwise/artwise
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport nodeResolve from 'rollup-plugin-node-resolve';\nimport commonjs from 'rollup-plugin-commonjs';\nimport uglify from 'rollup-plugin-uglify';\n\nexport default {\n entry: 'src/main-aot.js',\n dest: 'dist/build.js', // outp...
javascript
edit
0
2
mit
8a18760db14efdb66fa11492214ce39fe7f1cd31
waxe/waxe-image,waxe/waxe-image,waxe/waxe-image,waxe/waxe-image,waxe/waxe-image
angular/rollup-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n function transformText(text) {\n text = text.replace(/\\[0m/g, \"</span>\");\n text = text.replace(/\\[([0-9;]+)m/g, function (match, code, offset, string) {\n return \"<span ...
javascript
edit
null
null
mit
8183c08eaf0f6f2f07ff17bd2334fbf2c0d7e0e3
M6Web/JenkinsTerminalColors
js/jenkins-terminal-colors.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport React from 'react';\nimport type {Element as ReactElement} from 'react';\nimport {findDOMNode} from 'react-dom';\n\ntype Props = {\n onMouseDown: Function;\n onTouchStart: Function;\n children: ReactElement<any>...
javascript
edit
null
null
mit
7451fdad4c2e58bc89f80a6b7427cbd8ae9c604f
StreakYC/react-draggable-list,StreakYC/react-draggable-list,StreakYC/react-draggable-list
src/DragHandle.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// TODO: should the baseScore be stored, and updated at vote time?\n\n// This interface should change and become more OO, this'll do for now\nvar Scoring = {\n // re-run the scoring algorithm on a single object\n updateObject: functio...
javascript
edit
0
2
mit
70fd5dd1b056544b6dd0177f31aa6c06537fa2da
vlipco/startupcol-telescope,vlipco/startupcol-telescope
server/scoring.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { getContext } from 'ember-test-helpers';\n\nexport default function testWrapper(testName, callback, qunit) {\n function wrapper(assert) {\n var context = getContext();\n\n var result = callback...
javascript
edit
0
4
mit
5eb95b5fd34979a8d2e3d5dfe3a912d41d81fdc4
rwjblue/ember-qunit,OrKoN/ember-qunit,emberjs/ember-qunit,OrKoN/ember-qunit,rwjblue/ember-qunit,OrKoN/ember-qunit,emberjs/ember-qunit
lib/ember-qunit/test-wrapper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require(\"path\");\nconst webpack = require(\"webpack\");\n\n\nvar MINIFY = new webpack.optimize.UglifyJsPlugin({minimize: true});\n\nmodule.exports = {\n\tname: \"sunwell-card-renderer\",\n\ttarget: \"node\",\n\tentry: {\n...
javascript
edit
0
0
mit
994b65315cc7c678f3b8bae26a3956fb0ae4c5b6
HearthSim/Sunwell,HearthSim/Sunwell,Paratron/sunwell,HearthSim/Sunwell
card-renderer/webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar { generateClient } = require(\"../generateClient\")\n\nit(\"returns generated code\", function() {\n var code = generateClient({\n path: \"./__tests__/documents/*.graphql\",\n clientName: \"test-client\",\n })\n expect(code...
javascript
edit
0
1
mit
8a7fa7bf822b1827c0ca4dbe4b60659c971e4b0e
nevesenin/graphql-ruby,rmosolgo/graphql-ruby,xuorig/graphql-ruby,nevesenin/graphql-ruby,nevesenin/graphql-ruby,nevesenin/graphql-ruby,rmosolgo/graphql-ruby,rmosolgo/graphql-ruby,xuorig/graphql-ruby,xuorig/graphql-ruby,rmosolgo/graphql-ruby
javascript_client/sync/__tests__/generateClientTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nVIE.prototype.Collection = Backbone.Collection.extend({\n model: VIE.prototype.Entity,\n\n get: function(id) {\n if (!this.models.length) {\n return null;\n }\n if (this.models[0].isReference(id)) {...
javascript
edit
0
6
mit
0895b03d80a5ad062c823d12b52346c882d40910
bergie/VIE,bergie/VIE
src/Collection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nGAME.setConsts({\n SHIT : 1\n});\n\nGAME.Generator = (function() {\n\n var wow = false;\n\n function generate(level) {\n width = level.size[width];\n height = level.size[height];\n\n // generate ...
javascript
edit
0
6
mit
61b54f4bc854b83da47680b168350d34a5e67350
Hypersonic/FreezeFrame
js/generator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport assign from 'object-assign';\n\nimport { store } from './helpers';\n\nexport const MENU_SHOW = 'REACT_CONTEXTMENU_SHOW';\nexport const MENU_HIDE = 'REACT_CONTEXTMENU_HIDE';\n\n\nexport function dispatchGlobalEvent(eventName, opts...
javascript
edit
0
3
mit
ac555053fea84aa2f2a364ceb1e8adf5fc41fff8
codeart1st/react-contextmenu,danbovey/react-contextmenu,vkbansal/react-contextmenu,danbovey/react-contextmenu,codeart1st/react-contextmenu,vkbansal/react-contextmenu
src/actions.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Hide translation tab for available one language" }, { "role": "assistant", "content": "(function ($) {\n\n $(function () {\n hideTranslationTabForOneLanguage();\n });\n\n function hideTranslationTabForOneLangu...
javascript
new_file
0
2
mit
92360f00fb7dc4188b85bab20dd1e0149aae2f67
mkurc1/PurethinkCMSBundle,mkurc1/PurethinkCMSBundle
Resources/public/js/admin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright 2017 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the Lice...
javascript
edit
0
1
apache-2.0
192cfe18d70b241e6b3dc7091f7b568cfff03784
firebase/friendlyeats-web,firebase/friendlyeats-web,firebase/friendlyeats-web
scripts/FriendlyEats.Data.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction descAccessor(get, set) {\n return {\n get: get,\n set: set,\n configurable: true,\n enumerable: true\n };\n}\nfunction descConst(val) {\n return {\n value: val,\n configurable: true,\n enumerable: true\n...
javascript
edit
0
1
apache-2.0
7fa582863903a91465c066ae66b826d79053f5d9
mbebenita/shumway,mozilla/shumway,tschneidereit/shumway,yurydelendik/shumway,mbebenita/shumway,tschneidereit/shumway,yurydelendik/shumway,mbebenita/shumway,mbebenita/shumway,tschneidereit/shumway,mozilla/shumway,mozilla/shumway,yurydelendik/shumway,yurydelendik/shumway,tschneidereit/shumway,tschneidereit/shumway,tschne...
src/flash/util.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function board(state = {}, action) {\n if (action.type === 'PLAY_TURN') {\n const { location, moveId, piece } = action;\n const cells = [\n ...state.cells.slice(0, location),\n {\n contents: piece,...
javascript
edit
0
2
mit
5bd8842f58d7cbf3baa013d8bbe043386e15c7b5
Greatlemer/react-gomoku-bot,Greatlemer/react-gomoku-bot
src/reducers/board.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require('react');\nvar { Repeat } = require('Immutable');\n\nclass ReactTypeInAndOut extends React.Component {\n\n constructor (props) {\n super(props);\n\n var words = props.words;\n\n words = words....
javascript
edit
0
2
mit
afc3475d315eacdd8404915af1aa71cd64a44cc8
JRigotti/react-type-in-and-out,JRigotti/react-type-in-and-out
src/ReactTypeInAndOut.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function () {\n var isElementOnScreen = function($el, scrollTop) {\n // Get very bottom of element\n var elementBottom = $el.offset().top + $el.outerHeight();\n // Get very top of element\n var elementTop = $el.offset().t...
javascript
edit
0
5
mit
9d03540448a1903a37d47c9c4c6bddab32e3ad98
damianhakert/damianhakert.github.io
source/javascripts/issue-boards.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// const debug = require('debug')('W2:portal:instance/page/compute-document-status');\nconst Promise = require('bluebird');\n\nfunction getParentStatus(statusConfig, persistence, entity, instance) {\n return Promise.resolve()\n ...
javascript
edit
0
3
mit
ace5c0e8499b98a7ebcbf4c4bb6e1e6a7d177577
WarpWorks/warpjs
server/portal/instance/page/compute-document-status.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst merge = require('webpack-merge');\nconst common = require('./webpack.common.js');\nconst MiniCssExtractPlugin = require('mini-css-extract-plugin');\n\nmodule.exports = merge(common, {\n mode: 'production',\n module: {\n ...
javascript
edit
0
0
mit
d121e33e29ec436aadff03ba07fdb74d86202ccf
benct/tomlin-web,benct/tomlin-web
webpack.prod.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Form } from 'semantic-ui-react';\n\nexport const ListingTitle = ({ title, onChange }) => {\n return (\n <Form.TextArea\n rows=\"1\"\n className=\"ui center aligned grid\"\n label=\...
javascript
edit
0
1
mit
2d1bf46e1e821b7bc46e8050698ea4b01dacc6fe
bwuphan/raptor-ads,wolnewitz/raptor-ads,Darkrender/raptor-ads,Velocies/raptor-ads,bwuphan/raptor-ads,wolnewitz/raptor-ads,Darkrender/raptor-ads,Velocies/raptor-ads
client/src/components/Listing/AddListing/AddListingComponents/ListingTitle.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Add method to add a complete manga" }, { "role": "assistant", "content": "MangasData = new Mongo.Collection('mangasData');\n\nMeteor.methods({\n\taddCompleteMangas: function(serie) {\n\t\treturn MangasData.insert(serie);\n\t}...
javascript
new_file
0
1
mit
47c545f924c165434befba7134b40189891e27d3
dexterneo/mangatek,dexterneo/mangas,dexterneo/mangas,dexterneo/mangatek
lib/collections/mangasData.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport tldjs from 'tldjs'\n\nimport 'src/activity-logger/background'\nimport 'src/omnibar'\nimport { installTimeStorageKey } from 'src/imports/background'\n\nasync function openOverview() {\n const [ currentTab ] = await browser.tabs...
javascript
edit
0
4
mit
a701a9c2735b6ed85823af6ad168455dbb29776d
WorldBrain/WebMemex,WorldBrain/WebMemex
src/background.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nfunction JSONFormatter(){\n\n}\n\n/*\n * Every internal data structure are JSON by nature, them\n * no transformation is required\n */\nJSONFormatter.prototype.format = function(payload){\n return payload;\n};\n\nJSONFormatter.protot...
javascript
edit
0
1
apache-2.0
704c497771fb78228577f216ee73da58376dd834
cloudevents/sdk-javascript,cloudevents/sdk-javascript
lib/formats/json/formatter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\n// <a /> should be a <Link /> to avoid reloading the page, but avoids having to\n// wrap many tests in a <MemoryRouter />\nconst Header = () => (\n <header>\n <a href=\"/\">ETMobile - Reduce your CO2 em...
javascript
edit
0
2
mit
0588e21f2bbe3ca2853770f2165bcfccd0903c57
quintel/etmobile,quintel/etmobile,quintel/etmobile
src/components/Header.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport React, { Component, PropTypes } from 'react';\nimport { observer } from 'mobx-react';\nimport WalletReceive from '../../components/wallet/WalletReceive';\n\n@observer(['store'])\nexport default class WalletReceivePage e...
javascript
edit
0
1
apache-2.0
5ad52cf2fe5b6508ffb76da2b6c521b7bd8a0532
input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus
app/containers/wallet/WalletReceivePage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar shell = require('shelljs');\n\nvar nameCache = {};\nvar emailCache = {};\n\n/**\n * @mixin\n * @alias actions/user\n */\nvar user = module.exports;\n\n/**\n * Git related properties\n *\n * The value will come from th...
javascript
edit
0
3
bsd-2-clause
4b0f85c48d6917ee00846c7c0d6753a2e13d4bd0
yeoman/generator,andrewstuart/generator,yeoman/generator,rutaihwa/generator,yeoman/environment,JulienCabanes/generator
lib/actions/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nAstro.createValidator({\n name: 'number',\n validate: function() {\n return !_.isNaN(value) && _.isNumber(value);\n },\n events: {\n validationerror: function(e) {\n var fieldName = e.data.fieldName;\n\n e.data.messa...
javascript
edit
0
2
mit
9d9a921c50a5dd4df1a69f7c2856559efdeb2366
jagi/meteor-astronomy-validators,awei01/meteor-astronomy-validators
lib/validators/type/number.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction checkPathParsed (uri) {\n if (uri.charAt(0) !== '/') {\n uri = '/' + uri;\n }\n var safeUrl;\n var myUrl = parseURL(uri);\n if (myUrl.pathname.charAt(myUrl.pathname.length-1) === '/') {\n myUrl.pathname = myUrl.pathn...
javascript
edit
0
3
mit
f359bd81b4764b394025af1322575fc3b2ea3837
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
src/main/web/florence/js/functions/_checkPathParsed.js
rejected_duplicate
Near-duplicate of sample 68604
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Element = require('./Element')\nvar Window = require('./Window')\n\nvar ReactFauxDOM = {\n Element: Element,\n defaultView: Window,\n createElement: function (nodeName) {\n return new Element(nodeName)\n },\n compareDocument...
javascript
edit
0
1
unlicense
7fa799e92e2ce1490520b52bb21f1fd1f66bb413
rmoorman/react-faux-dom,Olical/react-faux-dom
src/ReactFauxDOM.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nif (!config.tasks.svgSprite) {\n\treturn false;\n}\n\nconst svgstore = require('gulp-svgstore');\nlet paths = {\n\tsrc: path.join(config.root.base, config.root.src, config.tasks.svgSprite.src, getExtensions(config.tasks...
javascript
edit
0
1
mit
994b44a47c27b9dc56978b811e8a465a768f2e89
jonnitto/gulpfile.js
gulpfile.js/tasks/svgSprite.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\r\n const IS_LOCAL = !!(localStorage[\"ultratypedev\"]),\r\n URL_REMOTE = \"https://rawgit.com/ultratype/UltraTypeBot/master/OUT/OUT.js\",\r\n URL_OUT = IS_LOCAL ? chrome.extension.getURL('OUT/OUT.js') : U...
javascript
edit
0
2
mit
50501773149ef91afa6e4e0e1e729b0ffe8df7bf
ultratype/UltraTypeBot,ultratype/UltraTypeBot,ultratype/UltraTypeBot
injectChrome.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, {Component, PropTypes} from 'react';\nimport lodash from 'lodash';\n\nexport function listeningTo(storeTokens, getter) {\n return decorator;\n\n function decorator(ChildComponent) {\n class ListeningContainerC...
javascript
edit
0
3
mit
f008633a682fb9caf85fec457ec7cf84b5301d93
goodybag/tokyo
src/decorators.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar fs = require('fs')\n , request = require('./request');\n\nexports.getContentsFromFile = function(file, callback) {\n fs.readFile(file, 'binary', function(err, body) {\n if (err) {\n return c...
javascript
edit
0
2
mit
37260c9dba0e4b1766374d49fc65dc948c7e9dbf
rexxars/imboclient-js,imbo/imboclient-js,rexxars/imboclient-js,rexxars/imboclient-js,imbo/imboclient-js,imbo/imboclient-js
lib/node/readers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/// <reference path=\"../typings/node/node.d.ts\" />\n/// <reference path=\"../typings/express/express.d.ts\" />\n/// <reference path=\"../typings/express-session/express-session.d.ts\" />\n\nvar Express = require('express');\nvar confi...
javascript
edit
0
0
mit
14b17d211820fe3555d7a60ad57ade904a6cef3b
tom19960222/C-FAR-Website,tom19960222/C-FAR-Website,tom19960222/C-FAR-Website,tom19960222/C-FAR-Website
C-FAR/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['app', 'bloodhound'], function(app, Bloodhound) {\n 'use strict';\n\n return {\n parent: 'admin_layout',\n url: 'new/project/',\n templateUrl: 'partials/admin/project-create.html',\n controller: function($scope, $h...
javascript
edit
0
1
apache-2.0
d8913e81b3f51ff4ddb5afc8577f02dac86cc80f
bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes,wfxiang08/changes,bowlofstew/changes,bowlofstew/changes,dropbox/changes,wfxiang08/changes,wfxiang08/changes,dropbox/changes,dropbox/changes
static/js/states/adminProjectCreate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\nimport { createAttributesObject } from 'ui-library/utils/create-attributes-object';\n\nconst { Mixin, get, setProperties } = Ember;\n\nexport default Mixin.create({\n classNames: ['r-btn'],\n classNameBindi...
javascript
edit
0
1
mit
43af7dc0789f48bde2cdde2ced4e6dfa64c16746
repositive/ui-library,repositive/ui-library
addon/mixins/r-button-mixin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {createAction} from 'redux-act'\nimport _defaults from 'lodash.defaults';\n\nconst defaultOption = {\n request:{},\n ok:{},\n error:{}\n}\n\nexport default function createActionAsync(description, api, options = defaultOption) ...
javascript
edit
0
3
apache-2.0
3d077b057fb44519740ea4feafae022abbc19f6d
FredericHeem/redux-act-async
src/createActionAsync.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * This file is being preloaded in Ghost Instances.\n * ⚠ Remember: No jQuery! ⚠\n */\n\n/**\n * Simple timeout function checking for \n * a) failed login\n * b) successful loaded\n */\nfunction checkStatus() {\n ...
javascript
edit
0
7
mit
a93fbc0989e3dfe8b9ad05f3180a91975969e3ce
felixrieseberg/Ghost-Desktop,felixrieseberg/Ghost-Desktop,TryGhost/Ghost-Desktop,TryGhost/Ghost-Desktop,TryGhost/Ghost-Desktop,felixrieseberg/Ghost-Desktop
main/preload.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nexport default function($translateProvider, $mdIconProvider) {\n 'ngInject';\n // put your common app configurations here\n\n // register icons from outsides\n $mdIconProvider\n .icon('icon-navigate-first', 'asse...
javascript
edit
0
1
mit
ef5a46d29e079b6a1cb444f2bceefa48548ecbae
sunshouxing/bshm,sunshouxing/bshm,sunshouxing/bshm
client/app/app.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert');\n\nvar messageTypes = {\n RESERVED : 0\n}\n\nfunction parseMessageType(inputBuffer){\n var firstByte = inputBuffer.readUInt8(0);\n var fourBitTransformation = ((0xf0 & firstByte) >> 4);\n return fourB...
javascript
edit
0
1
mit
0adf146a26cef1ae155ab2d1b0899ffde122ee98
REAANDREW/thingamabob,REAANDREW/thingamabob
test/something.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst addExports = require('babel-plugin-add-module-exports')\nconst babelEnv = require('@babel/preset-env')\nconst flow = require('@babel/preset-flow')\nconst react = require('@babel/preset-react')\nconst reactRequire = require('babel-...
javascript
edit
0
1
mit
9af5eeb53144608d61f5e7ca5ed7854c4bed4c70
conveyal/mastarm,conveyal/mastarm
lib/babel-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * biojs-io-biom\n * https://github.com/iimog/biojs-io-biom\n *\n * Copyright (c) 2015 Markus J. Ankenbrand\n * Licensed under the MIT license.\n */\n\n// chai is an assertion library\nlet chai = require('chai');\n\n// @see http://c...
javascript
edit
0
1
mit
74e0a66f23462dbf8017dd0cb13f1392e337e8fb
molbiodiv/biojs-io-biom,molbiodiv/biojs-io-biom
test/test_biom.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar amok = require('../');\nvar test = require('tape');\n\ntest('open chrome', function(t) {\n var client = amok.open('chrome', ['about:blank'], options);\n client.on('ready', function() {\n t.ok(client.pid);\n client.kill();\n ...
javascript
edit
0
1
mit
d703036b31a9e094beb8b1b4caa616592e7ad090
stereokai/amok,stereokai/amok,stereokai/amok
test/test_open.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar childProcess = require('child_process');\nvar fs = require('fs-extra');\nvar glob = require('glob');\nvar path = require('path');\nvar sortPackageJson = require('sort-package-json');\n\n// Run a production build with Typescript sour...
javascript
edit
0
0
bsd-3-clause
6a98011f5a726ada46e33198763896eec27e153a
jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab
jupyterlab/make-release.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction format (string) {\n /*eslint-disable no-unused-vars*/\n const [ _, action, state ] = `${ string }`.match(/(\\w*)\\_\\d+\\_(\\w*)/, ' ') || []\n /*eslint-enable no-unused-vars*/\n\n return action ? `the ${ action } action's ...
javascript
edit
0
7
mit
48b85d1fb28e8a27ebe536e64c6f8036bc07b457
leobauza/microcosm,vigetlabs/microcosm,vigetlabs/microcosm,vigetlabs/microcosm,leobauza/microcosm,leobauza/microcosm
src/getDomainHandlers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction _attach(tabId) {\n var protocolVersion = '1.1';\n\n return new Promise((resolve, reject) => {\n chrome.debugger.attach({\n tabId: tabId\n }, protocolVersion, () => {\n if (chrome.runtime.lastError) {\n ...
javascript
edit
0
2
mit
35d9e5eb8f6bb8f062cf7b0387f622f799be9c9f
kevinSuttle/EmulatedDeviceLab,kevinSuttle/EmulatedDeviceLab,kevinSuttle/EmulatedDeviceLab
lib/tab-debugger.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n function randomInt (min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n }\n\n function newBubble () {\n var radius = randomInt(10, 208);\n\n if (event) {\n var left = event.clientX...
javascript
edit
0
2
mit
eb5963456489290d0a770944a5a056dc2c406d61
ubuwaits/bokehdelic,ubuwaits/bokehdelic,ubuwaits/bokehdelic
javascripts/application.js
rejected_duplicate
Near-duplicate of sample 99506
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nvar exports = module.exports = {};\nexports.AbstractItem = require('../items/AbstractItem.js');\nexports.WifiGuestItem = require('../items/WifiGuestItem.js');\nvar FritzBoxAPI = require('./FritzBoxApi.js').FritzBoxAPI;\...
javascript
edit
0
1
apache-2.0
7963273521e826e98efb4dc80d94962eda16cd93
tommasomarchionni/homebridge-FRITZBox
libs/ItemFactory.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { module, test } from 'qunit';\nimport { setupRenderingTest } from 'ember-qunit';\nimport { render } from '@ember/test-helpers';\nimport hbs from 'htmlbars-inline-precompile';\n\nmodule('Integration | Component | datasets/health/...
javascript
edit
0
2
apache-2.0
8f49e5e7fd94cde6463a82b6296ed906e8ef749c
theseyi/WhereHows,alyiwang/WhereHows,alyiwang/WhereHows,linkedin/WhereHows,camelliazhang/WhereHows,theseyi/WhereHows,camelliazhang/WhereHows,linkedin/WhereHows,mars-lan/WhereHows,camelliazhang/WhereHows,linkedin/WhereHows,mars-lan/WhereHows,theseyi/WhereHows,theseyi/WhereHows,mars-lan/WhereHows,theseyi/WhereHows,mars-l...
wherehows-web/tests/integration/components/datasets/health/score-table-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n* Open external links in new tabs automatically\n*/\n\nvar links = document.links;\n\nfor (var i = 0; i < links.length; i++) {\n if (links[i].hostname != window.location.hostname) {\n links[i].target = '_blank';\n }\n}\n\n```\...
javascript
edit
0
3
mit
70a6c94d67a3edd0ffaab0f3e17c31fc86689f95
nchristiny/nchristiny.github.io,nchristiny/nchristiny.github.io,nchristiny/nchristiny.github.io
public/js/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Package = require('dgeni').Package;\n\n/**\n * @dgPackage examples-ext\n * @description Extensions for the dgeni-packages/examples\n */\nmodule.exports = new Package('examples-ext', [require('dgeni-packages/examples')])\n\n// Add in...
javascript
edit
0
1
mit
0def13e1ebdd3bbb1dd0c072132ec4a959799857
wingedfox/dgeni-alive,wingedfox/dgeni-alive
src/packages/examples-ext/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\n\nimport Tags from '../Tags';\nimport StatusButton from '../StatusButton';\n\nclass ReviewBlock extends React.Component {\n setStatus(status) {\n this.props.onUpdate(this.props.post.id, { status: status }...
javascript
edit
0
2
mit
85ee4e2b89a5611c6c55aee3e351a2ec71d7f920
DoSomething/rogue,DoSomething/rogue,DoSomething/rogue
resources/assets/components/ReviewBlock/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = HelpIntentFunction\n\n// Purpose: To provide the user with more information on how to use the skill\n// param (in): intent: given by Alexa, allows code to access parts of the intent request\n// param (in): session: give...
javascript
edit
0
1
mit
14f204578b5f0d405f595dd7e2b7a73fd99aa78b
acucciniello/the-muse-jobs
intents/help-intent-function.js
rejected_duplicate
Near-duplicate of sample 76158
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst makeDancer = (mass, x, y, z) => ({ mass, position: [x, y, z] });\nmodule.export = [\n makeDancer(100, -3, 4, -8),\n makeDancer(200, -2, -1, -12),\n makeDancer(700, 3, 2, -8),\n makeDancer(1200, 1, -2, -7),\n];\n\n```\n\nApply ...
javascript
edit
0
1
mit
037f920a2b3383c088f3738a4354effb68e22829
elliotaplant/celestial-dance,elliotaplant/celestial-dance
src/js/Helpers/dancerData.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* \n * This file exports the configuration Express.js back to the application\n * so that it can be used in other parts of the product.\n */\n\nvar path = require('path');\nvar logger = require('morgan');\nvar cookieParser = require('c...
javascript
edit
0
1
mit
3a7b21cd0af3c37993b367a0853e3dd335e76a2d
kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender,kurtbradd/facebook-music-recommender
config/express-config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst winston = require('winston');\n\n/**\n * Says Hello World and compute 1+1.\n *\n * @param req Request\n * @param res Response\n * @return {Promise.<void>} Nothing\n */\nasync function sayHelloWorld(req, res) {\n const [rows] = ...
javascript
edit
0
1
apache-2.0
02ea5a0689d3d5cd1a0a11b78de50a833f09ea21
K-Fet/K-App,K-Fet/K-App,K-Fet/K-App,K-Fet/K-App
server/app/controllers/hello-world-controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable no-undef, no-unused-vars, no-native-reassign */\nwindow.__$ = parent.$;\nwindow.__$(function() {\n var _ = parent._;\n var Rx = parent.Rx;\n var chai = parent.chai;\n var assert = chai.assert;\n var tests = parent...
javascript
edit
0
0
bsd-3-clause
574709159d2d392aef7aa4cf14413efb03438e72
Munsterberg/freecodecamp,pahosler/freecodecamp,Munsterberg/freecodecamp,BhaveshSGupta/FreeCodeCamp,tmashuang/FreeCodeCamp,matthew-t-smith/freeCodeCamp,techstonia/FreeCodeCamp,codeman869/FreeCodeCamp,BerkeleyTrue/FreeCodeCamp,MiloATH/FreeCodeCamp,TheeMattOliver/FreeCodeCamp,systimotic/FreeCodeCamp,BhaveshSGupta/FreeCode...
client/iFrameScripts.js
rejected_duplicate
Near-duplicate of sample 71623
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nimport util from './util';\n\n/**\n * @namespace\n *\n */\nvar urlUtils = {\n\n /***\n * @param {String} url\n * @type String\n */\n getOrigin:function( url ){\n var result = /https?:\\/\\/[^/]*\\/?/.exec( url );\n retur...
javascript
edit
0
3
mit
ba39ade863fc0b9ed761a9c6cac2df4305e8e045
eHanlin/frame-observer,eHanlin/frame-observer
src/js/utils/urlUtils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport setCurrentScreenAction from \"src/actions/ScreenActions.js\";\nimport { SET_CURRENT_SCREEN, MENU_SCREEN,\n GAME_SCREEN} from \"src/actions/ScreenActions.js\";\n\ndescribe(\"Screen Actions\", () => {\n\n it(\"should exist...
javascript
edit
0
1
mit
1660fb5c1c7aba4dec6709ae9b4ef3fdb88b579a
Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React,Lingvokot/Tic-Tac-Toe-React
test/actions/ScreenActions.spec.js
rejected_duplicate
Near-duplicate of sample 90488
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// If there is no WebSocket, try MozWebSocket (support for some old browsers)\ntry {\n module.exports = WebSocket\n} catch(err) {\n module.exports = MozWebSocket\n}\n```\n\nApply this change: Disable ripple-lib in Safari iOS < 5 and S...
javascript
edit
0
0
isc
a7532b5f550826d169f8aff8ad3c4e8b08a85c51
darkdarkdragon/ripple-lib,wilsonianb/ripple-lib,darkdarkdragon/ripple-lib,ripple/ripple-lib,darkdarkdragon/ripple-lib,wilsonianb/ripple-lib,wilsonianb/ripple-lib,ripple/ripple-lib,ripple/ripple-lib,ripple/ripple-lib
web_modules/ws.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nYUI.add(\"model-list-list-tweets\", function(Y) {\n \"use strict\";\n \n var tristis = Y.namespace(\"Tristis\"),\n models = Y.namespace(\"Tristis.Models\"),\n \n ListTweets;\n \n ListTweets = Y.Base....
javascript
edit
0
3
mit
7f61ec3891bf24fdeee3a1637a0e6b3b3b9a96aa
tivac/falco,tivac/falco
src/js/model-list-list-tweets.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar expect = require('expect.js'),\n child_process = require('child_process')\n\nfunction spawnSync (cmd, args, input) {\n var opts = {\n stdio: 'pipe',\n env: process.env\n }\n if (input !== undefined) {\n opts....
javascript
edit
0
5
bsd-3-clause
ea39d81e578e21ce674e647e66b2e7f9a12116ef
dirk/hummingbird,dirk/hummingbird,dirk/hummingbird
test/llvm/helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Licensed to Cloudkick, Inc ('Cloudkick') under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * Cloudkick licenses t...
javascript
edit
0
0
apache-2.0
9e6bad29283b27f56ab5c597c85dcdeef99258f9
cloudkick/cast,cloudkick/cast,cloudkick/cast,cloudkick/cast
lib/deployment/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\nconst glob = require('glob');\nconst pkg = require('./package.json');\n\n\nfunction newConfig() {\n return {\n resolve: {\n extensions: ['.coffee']\n },\n\n...
javascript
edit
0
1
mit
6e7681073c45ffb3a64a495a4829cf29196a14c9
airbrake/airbrake-js,airbrake/airbrake-js,airbrake/airbrake-js
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\nconst ExtractTextPlugin = require('extract-text-webpack-plugin');\nconst extractSass = new ExtractTextPlugin({\n filename: '[name].css', // '[name].[contenthash].css...
javascript
edit
0
0
mit
7aaecc08327f14bb6db6e2951aa0aa30e65bc878
e7d/speedtest,e7d/speedtest
webpack.common.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { CLOSE_NOTIFICATION } from '../constants';\n\nconst initialState = {\n isClosed: false,\n notes: []\n}\n\nexport default function update(state = initialState, action) {\n if(action.type === CLOSE_NOTIFICATION) {\n return {...
javascript
edit
0
2
mit
b5a67aa2712934a565b35c471c7bf5eebcda44f8
dfilipidisz/overwolf-hots-talents,dfilipidisz/overwolf-hots-talents,dfilipidisz/overfwolf-hots-talents,dfilipidisz/overfwolf-hots-talents
src/js/reducers/notifications.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path')\nconst UglifyjsPlugin = require('uglifyjs-webpack-plugin')\nconst BannerPlugin = require('webpack').BannerPlugin\nconst { name, version, author } = require('./package.json')\n\nconst banner = `${name} v${ver...
javascript
edit
0
0
mit
3aab832524fed2f63f4c179ec7202fcedd921efb
theuves/cpf
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\n\nmodule.exports = {\n devtool: 'eval',\n entry: [\n 'webpack-dev-server/client?http://localhost:3000',\n 'webpack/hot/only-dev-server',\n './scripts/index'\n ],\n output: {\n path: __d...
javascript
edit
0
0
mit
fbdbd93956241320bc3960d350c4dd0030cc6e84
talldan/hex-demo-motion,roth1002/react-hot-boilerplate,surikaterna/formr,taskworld/react-overlay-popup,IoanAlexandru/React-Redux-with-Hot-Loading-and-tcomb-forms,barock19/react-hot-boilerplate,Eol217/redux-course,OlehHappy/oleh_010-DnD_React_transhand01_bind,addi90/redux-todo,revivek/hackdays-chat-client,joshlevy89/sto...
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n server: {\n port: process.env.NODE_PORT || 8080\n , host: null\n }\n};\n\n```\n\nApply this change: Fix the port env variable" }, { "role": "assistant", "content": "module.exports = {\n...
javascript
edit
0
0
mit
53ce5f02d9c78307bd1022ba3326d45d0093f50e
Bloggify/Bloggify
lib/defaults.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\n\nmodule.exports = {\n entry: {\n index: './src/js/index.js',\n options: './src/js/options.js'\n },\n output: {\n filename: 'bundle.js',\n path: path.res...
javascript
edit
0
0
mit
9cc1e316360b41b5d19316ee7ec6acd59dfa0b91
yoshihara/tsuibami,yoshihara/tsuibami
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar models = require('../../models');\nvar sessionStore = require('../../app').sessionStore;\n\nmodule.exports = function (data, callbackToStripe) {\n if (isCanceled(data)) {\n \n var removeProStatus = function(custo...
javascript
edit
0
3
mit
cad4c74e98e2da7a8458a173da61fcc7382891a2
arcseldon/jsbin,mlucool/jsbin,kentcdodds/jsbin,vipulnsward/jsbin,arcseldon/jsbin,blesh/jsbin,jasonsanjose/jsbin-app,yohanboniface/jsbin,knpwrs/jsbin,mingzeke/jsbin,dennishu001/jsbin,KenPowers/jsbin,Hamcha/jsbin,jasonsanjose/jsbin-app,filamentgroup/jsbin,svacha/jsbin,saikota/jsbin,pandoraui/jsbin,pandoraui/jsbin,ctide/j...
lib/stripe/handlers/customer.subscription.deleted.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.AdventOfCode.Day8 = ( input ) =>\n{\n\tinput = input.split( ' ' ).map( x => +x );\n\n\tlet part1 = 0;\n\n\tconst process = () =>\n\t{\n\t\tconst childrenSize = input.shift();\n\t\tconst metadataSize = input.shift();\n\t\tlet valu...
javascript
edit
0
5
unlicense
8315d48117ba9bd54bcf8c6a9012d7a0cfbc2071
xPaw/adventofcode-solutions,xPaw/adventofcode-solutions,xPaw/adventofcode-solutions
2018/js/day8.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\nimport React from 'react';\nimport Button from 'grommet/components/Button';\nimport Anchor from 'grommet/components/Anchor';\nimport type { AssetType, ButtonType } from './BlockButtonForm';\n\nexport type Props = {\n label...
javascript
edit
null
null
apache-2.0
bbdb9c6dda6ed5a7d815a64d97299dee6821d172
grommet/grommet-cms-content-blocks,grommet/grommet-cms-content-blocks
src/ContentBlocks/BlockButton/BlockButton.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport transform from './transform'\nimport errorBoundary from './errorBoundary'\nimport evalCode from './evalCode'\n\nexport const generateElement = (\n { code = '', scope = {} },\n errorCallback\n) => (\n ...
javascript
edit
0
2
cc0-1.0
450ac4a717454ad37a72d84a133d9c2a2f1c7eae
philpl/react-live
src/utils/transpile/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash');\nvar path = require('path');\nvar webpack = require('webpack');\nvar getWebpackConfig = require('./webpack.config.js');\n\nvar devConfig = _.assign(getWebpackConfig(), {\n devtool: 'eval',\n\n output: {\...
javascript
edit
0
1
mit
b3b5e8e00b24582fdebd8f4251ba9b4e4d3804f9
zdenekkostal/react-infinite-list,jankopriva/react-infinite-list,zdenekkostal/react-infinite-list,crudo/react-infinite-list,crudo/react-infinite-list,jankopriva/react-infinite-list
webpack.dev.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright 2012 Mark Cavage, Inc. All rights reserved.\n\nvar jsonParser = require('./json_body_parser');\nvar formParser = require('./form_body_parser');\nvar multipartParser = require('./multipart_parser');\n\n\nfunction bodyParser...
javascript
edit
0
6
mit
c7c7d4e33e19f5541d8e1e7ec5a06ba6cfb316ec
prasmussen/node-restify,adunkman/node-restify,chaordic/node-restify,rborn/node-restify,kevinykchan/node-restify,TheDeveloper/node-restify,jclulow/node-restify,ferhatsb/node-restify,sstur/node-restify,uWhisp/node-restify,msaffitz/node-restify
lib/plugins/body_parser.js
rejected_duplicate
Near-duplicate of sample 96643
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n// Rewrite in-line event handlers (eg. <input ... onclick=\"\"> for a sub-set of common standard events)\n\ndocument.addEventListener('DOMContentLoaded', function(e) {\n \n var selectors = ['load', 'click', 'mouseover', 'mouseout', ...
javascript
edit
0
5
mit
629cf6ec5dd5308a1d24234950943e9a6ca676f2
operasoftware/operaextensions.js,operasoftware/operaextensions.js,operasoftware/operaextensions.js
src/common/InlineEventHandlerRewrite.js
rejected_duplicate
Near-duplicate of sample 74362
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\r\n\r\n(function () {\r\n angular\r\n .module(\"conpa\")\r\n .factory(\"basketService\", basketService);\r\n\r\n function basketService() {\r\n var assets = [],\r\n service = {\r\n ...
javascript
edit
0
3
mit
525c7d2f109f4e0354069bebf21857c995dd6ca7
albertosantini/node-conpa,albertosantini/node-conpa
src/client/app/basket/basket.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst DBus = require('dbus');\n\nfunction executeMediaKey(win, key) {\n win.webContents.executeJavaScript(`\n window.electronConnector.emit('${key}')\n `);\n}\n\nfunction registerBindings(win, desktopEnv, bus) {\n const serviceNam...
javascript
edit
0
5
mit
daaae39dc66738b17b34bf1e2e0a000902ddb46f
fcastilloec/headset-electron,fcastilloec/headset-electron,headsetapp/headset-electron,headsetapp/headset-electron,headsetapp/headset-electron,fcastilloec/headset-electron
linux/registerMediaKeys.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function ($, Vue, marked) {\n /* eslint-disable no-console */\n\n 'use strict';\n\n Vue.filter('marked', marked);\n\n new Vue({\n el: '#mail-form',\n data: {\n busy: false,\n text: '',\n domain: '',\n pass...
javascript
edit
0
5
mit
936c745c97fb1dc1f4fe11d0e0fcc0078815058d
arrowrowe/mgu,arrowrowe/mgu
public/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @file Instantiates and configures angular modules for your module.\n */\ndefine(['angular'], function (ng) {\n 'use strict';\n\n ng.module('{{template_name}}.controllers', []);\n ng.module('{{template_name}}.providers', []);\...
javascript
edit
0
1
mit
5fcfceb88f9982ad41d5877f83bd9a6287170b21
CleverStack/cleverstack-cli,CleverStack/cleverstack-cli,GrimDerp/cleverstack-cli,GrimDerp/cleverstack-cli
templates/frontend/module.js
rejected_duplicate
Near-duplicate of sample 76679
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar isReactClassish = require('./isReactClassish'),\n isReactElementish = require('./isReactElementish');\n\nfunction makeExportsHot(m) {\n if (isReactElementish(m.exports)) {\n return false;\n }\n\n var freshE...
javascript
edit
0
7
mit
c02df73d3f827cba39a285bb440959f8e0c518e1
gaearon/react-hot-loader,gaearon/react-hot-loader
makeExportsHot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { SplashEffect } from \"./effect.js\";\nimport { Linear } from \"../interpolation.js\";\n\nexport class TranslateFromPosition extends SplashEffect {\n\tconstructor(element, options) {\n\t\tsuper(element);\n\n\t\toptions = options...
javascript
edit
0
7
mit
9277c60a9f248949b3784f80b0aa62ba7bdf8546
magnontobi/splasher.js
src/js/effects/translateFromPosition.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or a...
javascript
edit
0
0
mit
e422a6327ec552e409717f994110b4d132235ae4
Lichtbit/bitcharts,Lichtbit/bitcharts,Lichtbit/bitcharts
test/dummy/app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 71086
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar MemoryStats = require('../../lib/models/memory_stats')\n , SQliteAdapter = require('../../lib/models/sqlite_adapter')\n , chai = require('chai')\n , expect = chai.expect\n , chaiAsPromised = require('chai-as-pro...
javascript
edit
0
2
mit
fb6c208e08e15575afce3c0eb1c622e45fd2796e
davidcunha/wharf,davidcunha/wharf
test/models/memory_stats_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * A directive containing a label and a column\n *\n * To be used in the showView\n */\nexport default function maShowItem() {\n return {\n restrict: 'E',\n scope: {\n field: '&',\n entry: '&'...
javascript
edit
0
1
mit
886e8ed1e179e4bad2318e44fcfcf3a6ca410610
LuckeyHomes/ng-admin,LuckeyHomes/ng-admin,ulrobix/ng-admin,jainpiyush111/ng-admin,eBoutik/ng-admin,vasiakorobkin/ng-admin,marmelab/ng-admin,manekinekko/ng-admin,SebLours/ng-admin,eBoutik/ng-admin,SebLours/ng-admin,jainpiyush111/ng-admin,marmelab/ng-admin,jainpiyush111/ng-admin,LuckeyHomes/ng-admin,marmelab/ng-admin,ulr...
src/javascripts/ng-admin/Crud/show/maShowItem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar require = {\n paths: {\n \"power-assert\": \"../build/power-assert\",\n expect: \"../bower_components/expect/index\",\n \"power-assert-formatter\": \"../bower_components/power-assert-formatter/lib/power-asser...
javascript
edit
0
0
mit
6fa17eb4e984c6a05a0eca6d0b41400b5926ff1a
twada/power-assert,falsandtru/power-assert,falsandtru/power-assert,saneyuki/power-assert,power-assert-js/power-assert,twada/power-assert,yagitoshiro/power-assert,power-assert-js/power-assert,saneyuki/power-assert,yagitoshiro/power-assert
test/rjsconfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Copyright (c) 2011 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n/**\n * This view displays information related to HTTP throttl...
javascript
edit
0
1
bsd-3-clause
474c55571efe72f40faa11b38fd0c7d75030d86b
anirudhSK/chromium,dednal/chromium.src,ondra-novak/chromium.src,ondra-novak/chromium.src,chuan9/chromium-crosswalk,keishi/chromium,dushu1203/chromium.src,chuan9/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,ltilve/chromiu...
chrome/browser/resources/net_internals/http_throttling_view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport { default as ComputeHelper } from './helpers/compute';\nexport { default as PipeHelper } from './helpers/pipe';\nexport { default as MapByHelper } from './helpers/map-by';\nexport { default as SortByHelper } from './helpers/sort-...
javascript
edit
0
0
mit
a4254e16e1da59ed02c5a2f9f72f2e3728d0b711
DockYard/ember-functional-helpers,DockYard/ember-functional-helpers
addon/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require(\"path\"),\n Files = require(\"../modules\"),\n config = require(\"../config\"),\n root_dir = config.get(\"root_dir\") + '/';\n\n// Parse the request path and figure out how to respond\nexports.file = functio...
javascript
edit
0
2
mit
b25c6cc8bcd4584503b923b2dcd001f114fc3891
btleffler/node-file-list,btleffler/node-file-list
routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar State = require('./state')\nvar Story = require('./model/story')\n\nmodule.exports = function (router) {\n router.get('/stories/list', function (req, res, next) {\n Story.find((err, stories) => {\n res.status(200).send(stor...
javascript
edit
0
1
mit
9f62106b4efa44f45026cfa8c7da5c2487dd7b41
groupwrite-io/groupwrite.io,groupwrite-io/groupwrite.io
api/stories.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable import/no-extraneous-dependencies */\n\nconst path = require('path');\nconst express = require('express');\nconst webpack = require('webpack');\nconst config = require('../webpack.config.dev');\nconst webpackDev = requ...
javascript
edit
0
1
mit
139ea133aca6f73b8091122677d520b3ebd57bbb
springload/draftail,springload/draftail,springload/draftail,springload/draftail
server/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nvar stew = require('broccoli-stew');\n\nmodule.exports = function shimAmd(tree, nameMapping) {\n return stew.map(tree, function(content, relativePath) {\n var name = nameMapping[relativePath];\n if (name) {\n ...
javascript
edit
0
2
mit
fccf2d1e093bb27d51aff0c1069a2d6b50ec3759
trentmwillis/ember-cli,acorncom/ember-cli,johnotander/ember-cli,akatov/ember-cli,twokul/ember-cli,josemarluedke/ember-cli,kellyselden/ember-cli,johnotander/ember-cli,mohlek/ember-cli,sivakumar-kailasam/ember-cli,ember-cli/ember-cli,pixelhandler/ember-cli,trentmwillis/ember-cli,williamsbdev/ember-cli,williamsbdev/ember-...
lib/broccoli/amd-shim.js
rejected_duplicate
Near-duplicate of sample 72168
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction createClassroom() {\n var auth2 = gapi.auth2.getAuthInstance();\n var name = \"\";\n var email = \"\";\n if (auth2.isSignedIn.get()) {\n var name = auth2.currentUser.get().getBasicProfile().getName();\n ...
javascript
edit
0
2
apache-2.0
f49f66eed0109b34493b6b8dc189488198a65b16
googleinterns/step152-2020,googleinterns/step152-2020,googleinterns/step152-2020,googleinterns/step152-2020
capstone/src/main/webapp/dashboard-loader.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar media = document.querySelectorAll('video, audio');\nvar rate = prompt('Speed? Currently playing back at ' + media[0].playbackRate + 'x.','');\nArray.prototype.forEach.call(media, function(player) {\n if (rate != 0) {\n player...
javascript
edit
0
3
cc0-1.0
24111a6cad56a5c2bd6954a7ae3fbb340e6ef871
jachinn/html5-video-playback-rate
script.js
accepted
null
true