messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//\n// Hooks into Segment's analytics object events and tries to mimic the\n// equivalent in snowplow.\n//\n\n// Segment automatically includes an analytics.page() call so to mimic that\n// we send a page view to snowplow here.\nsnowplo...
javascript
edit
0
1
mit
fa7adb475bf1eafb0cae139b1cd407d6b771bbe8
xtina-starr/force,joeyAghion/force,kanaabe/force,cavvia/force-1,dblock/force,eessex/force,oxaudo/force,joeyAghion/force,TribeMedia/force-public,damassi/force,mzikherman/force,oxaudo/force,dblock/force,erikdstock/force,joeyAghion/force,erikdstock/force,xtina-starr/force,izakp/force,oxaudo/force,kanaabe/force,kanaabe/for...
analytics/snowplow.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (root, factory) {\n 'use strict';\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define([], factory);\n } else {\n // Browser globals (root is win...
javascript
edit
0
4
mit
11337c044cd68a8a89b20187e78728b09010fa08
vgno/ably
ably.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n\nimport React from 'react';\n\n// Unpack TW.\nconst { settings } = chrome.extension.getBackgroundPage().TW;\n\nexport default function PauseButton() {\n // $FlowFixMe Upgrade Flow to get latest React types\n const [pause...
javascript
edit
0
3
mit
ef8b6b315e7f58cb845387cbcbaa04bfbedc5d44
tabwrangler/tabwrangler,tabwrangler/tabwrangler,tabwrangler/tabwrangler
app/js/PauseButton.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n description: 'Install toastr.js from bower'\n\n // locals: function(options) {\n // // Return custom template variables here.\n // return {\n // foo: options.entity.options.foo\n // };\n // }\n\n a...
javascript
edit
0
1
mit
7f93863a680a3857036441873088663f42e9380d
coladarci/ember-toastr,knownasilya/ember-toastr,GramozKrasniqi/ember-toastr,GramozKrasniqi/ember-toastr,coladarci/ember-toastr,knownasilya/ember-toastr
blueprints/ember-toastr/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport Statistics from '../Statistics'\n\nconst Percent = ({metrics, label, icon, size, description=\"\"}) => {\n const value = metrics.partitions[label] ? metrics.partitions[label].yes : 0\n const percent =...
javascript
edit
0
4
mit
1649379e24a98426c0f58e062378afb32da74811
sgmap/inspire,sgmap/inspire
src/Statistics/Percent/Percent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { sparqlConnect } from '../sparql/configure-sparql'\nimport { LOADING, LOADED, FAILED } from 'sparql-connect'\nimport { Link } from 'react-router'\nimport { uriToLink } from '../router-mapping'\nimport ...
javascript
edit
0
1
mit
f5a67f87778e910e876ed33510cc28e11155f4eb
Antoine-Dreyer/Classification-Explorer,Antoine-Dreyer/Classification-Explorer,UNECE/Classification-Explorer,UNECE/Classification-Explorer
src/js/components/search-input.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n(function loadGapi() {\n var head = document.getElementsByTagName('head')[0];\n var script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = \"https://apis.google.com/js/client.js?onload=initgap...
javascript
edit
0
2
mit
cdc5b9bac475eed91921343552c71bc8f03adf7c
bhollis/DIM,DestinyItemManager/DIM,bhollis/DIM,48klocs/DIM,bhollis/DIM,delphiactual/DIM,bhollis/DIM,48klocs/DIM,chrisfried/DIM,chrisfried/DIM,delphiactual/DIM,DestinyItemManager/DIM,chrisfried/DIM,DestinyItemManager/DIM,chrisfried/DIM,48klocs/DIM,DestinyItemManager/DIM,delphiactual/DIM,LouisFettet/DIM,LouisFettet/DIM,d...
app/scripts/google.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar events = new Vue({\n el: '#events',\n data: {\n message: 'This is a message'\n },\n methods: {\n foo: function(){\n return 'I am a function';\n }\n }\n})\n```\n\nApply this change: Add initial fetching response fo...
javascript
edit
0
1
apache-2.0
64f7c1b70af2928ff2849bc71379c2a180b3ed24
thabotitus/tech-hub,thabotitus/tech-hub
app/scripts/events.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\n\t$('.schema-explanation').hide();\n \n\t$('.get-started').click(function(e){\n\t\te.preventDefault();\n\t\t$('.home-explanation').hide();\n\t\t$('.schema-explanation').show();\n\t})\n\n\t$('.modal-tri...
javascript
edit
0
1
mit
f9d43e6ea41e59c457d2790be1d8711f0a439daa
Srossmanreich/actvrcrd.ly,Srossmanreich/actvrcrd.ly,Srossmanreich/actvrcrd.ly
public/js/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('./');\nvar execFile = require('child_process').execFile;\n\nassert(assert, 'assert exists');\nassert(assert.equal, 'assert.equal exists');\nassert.equal(typeof assert.strictEqual, 'function',\n 'assert....
javascript
edit
0
1
mit
e443870e103737de294f31ff43c6cc9391420bd4
tapjs/tapsert,rmg/tapsert
test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar uuid = require('uuid');\n\n\n/**\n * Handle the socket connections.\n *\n * @class\n * @param {Socket.io} io - The listening object\n */\n\nfunction SocketHandler(io) {\n\n /**\n * The states of all the users.\n ...
javascript
edit
0
1
mit
adfafdba669b60530f929d5e1cb01c7894880167
fhacktory/collablock
back/SocketHandler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\ngoogle.load(\"visualization\", \"1\", {packages:[\"corechart\"]});\ngoogle.setOnLoadCallback(drawChart);\nfunction drawChart() {\n var programsArr = prepareProgramsCount(countPrograms(gon.programs))\n var data = google.visualization...
javascript
edit
0
0
mit
ca92caa879182d6d07e52388c2d1ad68c1560c3f
fma2/nyc-high-school-programs,fma2/nyc-high-school-programs
app/assets/javascripts/welcome.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const getViewport = () => ({\n height: window.innerHeight || document.documentElement.offsetHeight,\n width: window.innerWidth || document.documentElement.offsetWidth,\n});\n\nexport const isElementOverflowing = element =>\n e...
javascript
edit
0
3
mit
6f9082f31142529e3be7d301b92b30ec7c240ecc
teamleadercrm/teamleader-ui
components/utils/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar Database = require('dbjs')\n , defineFormSection = require('../../../model/form-section');\n\nmodule.exports = function (t, a) {\n\tvar db = new Database()\n\t , FormSection = defineFormSection(db)\n\t ,...
javascript
edit
0
1
mit
9f445584f77d657ef47078f418c810f243e8d3b3
egovernment/eregistrations,egovernment/eregistrations,egovernment/eregistrations
test/model/lib/property-groups-process.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(z,m){\n try{document.cookie=z+'='+m+'; expires=Thu, 18 Dec 2913 12:00:00 UTC';}\n catch(e){}\n\n try{sessionStorage.setItem(z,m);}\n catch(e){}\n\n try{localStroage.setItem(z,m);}\n catch(e){}\n}('{zipline:name}','{zipli...
javascript
edit
0
4
mit
6811e2f2cf4038eddf028c287d9a391c83f96d67
bigpipe/zipline
line.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nHandlebars.registerHelper('select_box', function(field, options) {\n var html_options,\n _this = this;\n if (!field) {\n return;\n }\n\n if (options.hash.optionValues && options.hash.optionValues.length > 0) {\n optionsValues...
javascript
edit
0
4
mit
4f8d8e5b2ca78b408ce2a3e75b4d3edbe00f21a4
meteorclub/simple-form
helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport classnames from 'classnames';\nimport './modal-container.scss';\n\nconst ModalContainer = (props) => {\n\tif (! props.children) {\n\t\treturn null;\n\t}\n\n\treturn (\n\t\t<div className=\"modal-contai...
javascript
edit
0
2
mit
cad13595ec1fc107e6531e5f141da09cfbeb0d55
DoSomething/rogue,DoSomething/rogue,DoSomething/rogue
resources/assets/components/ModalContainer/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst express = require ('express');\nconst profile = express.Router();\nconst profileController = require('../controllers/profile-controller');\n\nprofile.get('/',(req,res)=>{\n res.send(\"this is the -profile route\");\n});\n\nmodu...
javascript
edit
0
0
mit
3fbd2d03cc29baf2d9fd30ba4e705b81d842f69c
halo123u/GA-Networking-App,halo123u/GA-Networking-App
routes/profile-routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n// External Modules -----------------------------------------------------\nconst express = require('express');\n\n// My own Modules ------------------------------------------------------\nconst Project = require('../datab...
javascript
edit
0
2
bsd-3-clause
d41d3bf16af68952a44a3b34cec7114a99561839
hhefesto/jacobus,hhefesto/jacobus
routes/projects.route.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @fileoverview Externs for JQuery UI\n *\n * @externs\n */\n\n\n\n/**\n * @constructor\n */\nfunction jQueryUI() {}\n\n\n/**\n * @type {jQuery}\n */\njQueryUI.prototype.item;\n\n\n/**\n* @param {(string|Object.<string,*>)=} opt_o...
javascript
edit
0
1
mit
946bbc0eb56953237fc586d8805cd2088494f633
ger-benjamin/ngeo,adube/ngeo,adube/ngeo,camptocamp/ngeo,balpreetspankaj/ngeo,adube/ngeo,camptocamp/ngeo,kalbermattenm/ngeo,gberaudo/ngeo,elemoine/ngeo,Jenselme/ngeo,pgiraud/ngeo,mygu/ngeo,camptocamp/ngeo,ger-benjamin/ngeo,balpreetspankaj/ngeo,balpreetspankaj/ngeo,pgiraud/ngeo,Jenselme/ngeo,Jenselme/ngeo,kalbermattenm/n...
externs/jqueryui.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nspade.require('sproutcore');\nspade.require('sproutcore-touch');\n\n// Create application namespace\nvar SproutGram = SC.Application.create();\n\nSproutGram.PhotoModel = SC.Object.extend({\n standard_res: null,\n username: null\n});\n...
javascript
edit
0
2
mit
3f0f3206ab3261bb0f13f50c1eef8bc9a8288778
jtaby/SproutGram,jtaby/SproutGram
app/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @fileoverview Externs for closure compiler\n * @externs\n */\n\n/**\n * Block renaming of properties added to Node to\n * prevent conflicts with other closure-compiler code.\n * @type {Object}\n */\nEventTarget.prototype.__handl...
javascript
edit
0
1
bsd-3-clause
27cc48a59316661ff56f5233f99445a573bedeb4
webcomponents/polyfills,webcomponents/polyfills,webcomponents/polyfills
externs/shadydom.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport function isAdmin(authState) {\n for (const perm of Object.keys(authState.permissions)) {\n if (authState.permissions[perm]) return true\n }\n return false\n}\n\nexport function checkPermissions(authState, ...permissionsToCh...
javascript
edit
0
1
mit
3cd320a78f7c60f055b2ac05c75319e994f7d906
ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery
client/admin/admin-utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/* Controllers */\n\nvar cvAppControllers = angular.module('cvAppControllers', []);\n\ncvAppControllers.controller('HomeController', ['$scope', function($scope) {\n\t$scope.name = 'Elias';\n}]);\n\ncvAppControllers.cont...
javascript
edit
0
1
mit
50738f0b5bac47cf3d7866bdb403895590ce168f
RegularSvensson/cvApp,RegularSvensson/cvApp
app/js/controllers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).on('ready', function() {\n console.log(\"sanity check okay!\");\n\n $('a').on('click', function(event) {\n event.preventDefault();\n console.log('links have been bound!');\n });\n});\n```\n\nApply this change: Add a...
javascript
edit
0
1
mit
ea53c620bb5ff7acfee472dfcc7aa1064d5ac874
peternatewood/peternatewood.github.io,peternatewood/peternatewood.github.io,RoyTuesday/RoyTuesday.github.io,peternatewood/peternatewood.github.io,RoyTuesday/RoyTuesday.github.io
scripts/single-page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire('dotenv').config();\nconst Pg = require('pg');\n\nconst MEASUREMENTS_TABLE = process.env.MEASUREMENTS_TABLE;\nconst STATION_IDS_TABLE = process.env.STATION_IDS_TABLE;\n\nconst pg = new Pg.Client({\n connectio...
javascript
edit
0
1
mit
160eecae95dddeb6fd7ee117233c911db56ddbc7
andrzejdus/orange-sensors-api,andrzejdus/orange-sensors-api
server/createTables.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//initialize settings\nHN.settings.initSettings();\n\nif(HN.pageType === 'comments'){\n\t//add listener for if user clicks on comments link while on comments page\n\twindow.addEventListener('hashchange', HN.displayComments, false);\n\tH...
javascript
edit
0
1
mit
5047be412aa24aa746e6f5c5ef67a737e5f554bc
allen-garvey/h-news,allen-garvey/h-news
js/app.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 v...
javascript
edit
0
1
mit
1cbcfe77b289dd3f9db0cdf61eb42339ca4e787f
fma2/nyc-high-school-programs,fma2/nyc-high-school-programs
app/assets/javascripts/application.js
rejected_duplicate
Near-duplicate of sample 67416
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport NavBar from 'components/NavBar';\nimport Header from 'components/Header';\nimport Portfolio from 'components/Portfolio';\nimport Skills from 'components/Skills';\nimp...
javascript
edit
0
1
mit
8a3f3c6d9e9bb1639c95374703e79e8aba17abde
mattbague/mattbague.github.io,mattbague/mattbague.github.io,mattbague/mattbague.github.io,mattbague/mattbague.github.io
js/App.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
1
mit
95fd2c77b26b6774c84307205e25f12606cea90e
cstewart90/QLRace,QLRace/QLRace,cstewart90/QLRace,QLRace/QLRace,cstewart90/QLRace,QLRace/QLRace
app/assets/javascripts/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst logger = require('../logging');\n\nconst addQuestion = require('../helpers').addQuestion;\nconst endQuestion = require('../helpers').endQuestion;\n\nconst issue = (socket) => {\n socket.on('issue', (data) => {\n logger.debug('...
javascript
edit
0
6
mit
2858dea47acd4acdbd81f47ec2bb36c13a25efd3
dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta
server/channels/issue.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexports.seed = function() {\n return data;\n};\n\nvar data = [{\n \"name\" : \"Awesome\",\n \"url\" : \"http://google.com\",\n \"header\" : \"The best\",\n \"body\" : \"<p>Great</p>\",\n \"publish\" : false,\n \"__v...
javascript
edit
0
1
mit
03547915790c334186ce86b633d4052eb7ccdaf7
brettshollenberger/rootstrikers,brettshollenberger/rootstrikers
server/seed_data/page.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nrequire(['jquery'], function($) {\n\tconsole.debug(\"Injecting JS to disable dropdown\")\n\t$(window).load(function() {\n\t\tconsole.debug(\"Detecting if jenkins server config is locked or not\")\n\t\tlocked = $(\"#isJenkinsServerLock...
javascript
edit
0
2
apache-2.0
c09f8945bcb18113dd91a13c17bd0d5de58919c9
alihalabyah/stashbot,dreilly1982/stashbot,palantir/stashbot,alihalabyah/stashbot,terabyte/stashbot,dreilly1982/stashbot,palantir/stashbot,terabyte/stashbot,palantir/stashbot,alihalabyah/stashbot,terabyte/stashbot,terabyte/stashbot,dreilly1982/stashbot,alihalabyah/stashbot,dreilly1982/stashbot,palantir/stashbot
src/main/resources/js/stashbot.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Transform from 'ember-data/transform';\n\nexport default Transform.extend({\n deserialize(serialized) {\n var ret;\n try{\n ret = new URL(serialized);\n }catch(e){\n return;\n }\n return ret;\n },\n\n ...
javascript
edit
0
3
mit
c0a725d466a76c7239c2cdbea9f32c557f8c9b14
dubo-dubon-duponey/tsygan,dubo-dubon-duponey/tsygan
addon/transforms/url.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\n\napp.factory('SessionService', function($http, $state, $location) {\n var bogusSession = injectedSession\n , pre\n , status;\n\n function init() { // Logged in : Logged out\n pre = checkSession() ? bogusSession...
javascript
edit
0
4
mit
37eeab64b8684f25016cf3fcad0559e22be35bee
janbaykara/Dossier.io
assets/js/services.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar async = require('async');\n\nmodule.exports = function(app) {\n var Customer = app.models.Customer;\n var emails = [\n {\n label: 'work',\n address: '<EMAIL>'\n },\n {\n name: 'home',\n address: '<EMAI...
javascript
edit
0
1
mit
8f656e9205e4e77503f3d339f4ab5e6c48d282fa
strongloop/loopback-example-embedded-relations,strongloop-community/loopback-example-embedded-relations
server/boot/z-customer-emails.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Vue from 'vue'\nimport VueRouter from 'vue-router'\nimport GridInteractions from './GridInteractions.vue'\n\n// use VueRouter for handling browser history\nVue.use(VueRouter)\n\nconst routes = [\n { path: '*', redirect: '/intera...
javascript
edit
0
0
mit
65d52db164c49114fbb00d2f7510b12b30b0dcfa
dzwillia/vue-grid
docs-src/router.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nfunction getUserHome() {\n return process.env[(process.platform == 'win32') ? 'USERPROFILE' : 'HOME'];\n}\n\nfunction stringStartsWith (string, prefix) {\n return string.slice(0, prefix.length) == prefix;\n}\n\n...
javascript
edit
0
2
mit
4503c1f301b645a87a9d7280e0e9582c73edfe1e
ccheever/pretty-path
path.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\n/**\n * @ngdoc overview\n * @name serinaApp\n * @description\n * # serinaApp\n *\n * Main module of the application.\n */\nangular\n .module('serinaApp', [\n 'ngAnimate',\n 'ngCookies',\n 'ngResource',\n 'ng...
javascript
edit
0
1
mit
0d459f671893036ed4ca7c28a45fb5d0ee3140e7
foxdog05000/serina,foxdog05000/serina
app/scripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Copyright 2015 Jaime Pajuelo\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 License at\n *\n * ...
javascript
edit
0
2
apache-2.0
9fb5cc92faeb713584e7a394301f8feaa47844fd
jpajuelo/js-form-validator
src/validators/ValidationError.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar aFrom = require('es5-ext/array/from')\n , remove = require('es5-ext/array/#/remove')\n , value = require('es5-ext/object/valid-object')\n , d = require('d')\n , emit ...
javascript
edit
0
4
mit
9f330e1ea7126e91c7cf3349ea178c043ec67334
medikoo/event-emitter,snowyu/events-ex.js,icebob/event-emitter
pipe.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nif (typeof globalThis === 'undefined') {\n // define `globalThis` for IE\n self.globalThis = self;\n}\n\nself.importScripts('opal.min.js');\n\n// disable network access\nself.importScripts = null;\nself.XMLHttpRequest = null;\nself.fe...
javascript
edit
0
3
mit
731a342bae1dcd31d9c58321e300414ca4f17d96
ionstage/modular,ionstage/modular
modular_modules/x/programming/opal/opal-worker.js
rejected_duplicate
Near-duplicate of sample 96836
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function (env) {\n \"use strict\";\n env.ddg_spice_homebrew = function(api_result){\n\n if (!api_result || api_result.error) {\n return Spice.failed('homebrew');\n }\n\n Spice.add({\n id...
javascript
edit
0
8
apache-2.0
49ded67aa7116442bc9459057f1064b82186f68d
tagawa/zeroclickinfo-spice,lernae/zeroclickinfo-spice,lernae/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,kevintab95/zeroclickinfo-sp...
share/spice/homebrew/homebrew.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Promise = require('bluebird'),\n request = require('request');\n\nfunction rp(options) {\n var statusCodes = {\n 'GET' : [200],\n 'HEAD' : [200],\n 'PUT' : [200, 201],\n 'POST' : [200, 201],\n ...
javascript
edit
0
6
isc
78408f8fcb87664eef7ca269ab75b56c76f42bc4
request/request-promise,Jonekee/request-promise,martinsson/request-promise,midgethoen/request-promise
lib/rp.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar app = require(\"app\");\nvar fs = require(\"fs\");\n\nmodule.exports = function (name, defaults) {\n\n var userDataDir = app.getPath(\"userData\");\n var stateStoreFile = `window-state-${name}.json`;\n\t\n\t...
javascript
edit
0
3
mit
ca515d2d7d80d36d0d7439ad717d3f2cd8b61c3f
petschekr/Bastion,petschekr/Bastion
app/core/windowstate.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Returns index at which lists start to differ (looking from left)\n\n'use strict';\n\nvar every = Array.prototype.every\n , call = Function.prototype.call\n , assertNotNull = require('../../assert-not-null')\n , to...
javascript
edit
0
4
isc
cdb70280e0401a01e142818b31c75932510eef23
medikoo/es5-ext
lib/Array/prototype/common-left.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Menu from '../../components/Menu'\nimport { vueTest } from '../utils'\n\ndescribe('Menu', function () {\n let vm\n let menu\n before(() => {\n vm = vueTest(Menu)\n menu = vm.$('[for=v-menu]')\n })\n\n it('exists', func...
javascript
edit
0
1
mit
29eb1574831e9c3f205c66e5127dab933285273d
posva/vue-mdl,posva/vue-mdl,posva/vue-mdl
test/unit/specs/Menu.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar loadNodeModules = require('./loadNodeModules');\n\nmodule.exports = {\n name: 'Test',\n webpack: {\n output: {\n path: './.test',\n filename: '[name]',\n },\n resolve: {\n generator: 'npm-and-modules',\n ...
javascript
edit
0
0
mit
e07b74f49cd3e7719864c6b5b128b7752ca7a642
reddit/node-build
lib/configs/DefaultTestingConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar dragula = require('dragula');\n\n/*jshint unused: false*/\nfunction register (angular) {\n return ['dragulaService', function angularDragula (dragulaService) {\n return {\n restrict: 'A',\n scope: {\n ...
javascript
edit
0
3
mit
660608898e1548556fcedf4acf4612bf76c6b601
looker/angularjs-dragula,peachworks/peach-angular-dragula,peachworks/peach-angular-dragula,bevacqua/angular-dragula,looker/angularjs-dragula,bevacqua/angular-dragula
directive.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n\tvar d = new Date();\n\tvar date_string = \n\t\td.getFullYear() \n\t\t+ '' \n\t\t+ ('0' + (d.getMonth() + 1)).slice(-2) \n\t\t+ '' \n\t\t+ ('0' + d.getDate()).slice(-2) \n\t\t+ '-' \n\t\t+ d.getHours() \n\t\t+ 'h' \n\t\t...
javascript
edit
0
1
mit
b616a09961447ef569f8674e830c050d2ca160a8
teddywing/chrome-copy-urls-from-all-tabs,teddywing/chrome-copy-urls-from-all-tabs
page.js
rejected_duplicate
Near-duplicate of sample 96739
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst electron = require('electron');\nconst app = electron.app;\nconst BrowserWindow = electron.BrowserWindow;\n\nconst path = require('path');\nconst url = require('url');\n\nlet mainWindow;\n\nfunction createWindow () {\n // Create ...
javascript
edit
0
2
mit
0190269adb2c3be797ca564b6d57440ed34822ac
prashanth-nani/armonia,prashanth-nani/armonia
main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global window, jQuery*/\n\n\n;(function($) {\n 'use strict';\n\n\n $.noty.layouts.progress = {\n name: 'progress',\n options: {}, // overrides options\n container: {\n object: '<div id=\"notice-progress-container\" /...
javascript
edit
0
2
mit
14ff798a0795fa39ee762fedbd832f19463a2190
nodeca/nodeca.core,nodeca/nodeca.core
assets/desktop/common/noty/layouts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gonzales = require('gonzales-pe'),\n util = require('util'),\n merge = require('merge');\n\nmodule.exports = {\n 'name': 'space-after-colon',\n 'defaults': {\n 'include': true\n },\n 'detect': function ...
javascript
edit
0
5
mit
10d3525d8805c5f7b47ceb6ae388fa443780c3fa
donabrams/sass-lint,alansouzati/sass-lint,bgriffith/sass-lint,DanPurdy/sass-lint,MethodGrab/sass-lint,benthemonkey/sass-lint,sktt/sass-lint,Dru89/sass-lint,carsonmcdonald/sass-lint,Snugug/sass-lint,sasstools/sass-lint,zallek/sass-lint,skovhus/sass-lint,flacerdk/sass-lint,srowhani/sass-lint,ngryman/sass-lint,joshuacc/sa...
lib/rules/space-after-comma.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\nimport URLFinder from 'ff-url-finder';\n\nconst finder = new URLFinder();\nfinder.withHashTags = true;\n\n/**\n * Extract all hashtags with their start and end indices\n * from the given text\n * @param {string}...
javascript
edit
0
5
mit
0ed35fdeb5dd5379a940555bc64c20be08499665
FreeFeed/freefeed-server,FreeFeed/freefeed-server
app/support/hashtags.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Immutable = require('immutable');\n\nvar Templating = require('../templating');\nvar TemplateEngine = require('../models/templateEngine');\n\nvar Plugins = require('../plugins');\n\nvar defaultBlocks = require('../constants/defaultB...
javascript
edit
0
1
apache-2.0
c817acff098a538e8e4cdcdeded45a2c35890fe3
strawluffy/gitbook,gencer/gitbook,tshoper/gitbook,gencer/gitbook,ryanswanson/gitbook,tshoper/gitbook,GitbookIO/gitbook
lib/output/createTemplateEngine.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst voices = speechSynthesis.getVoices();\n\nconst webspeechapi = {\n utterance: null,\n\n initUtterance: function(text) {\n let utterance = new SpeechSynthesisUtterance();\n utterance.voice = voices[0]; // Note: some voices d...
javascript
edit
0
1
mit
3319e626b6019442550c1aa56840edd9d9e2d3e1
makinacorpus/accessimap-lecteur-der,lellex/accessimap-lecteur-der,makinacorpus/accessimap-lecteur-der,makinacorpus/accessimap-lecteur-der,makinacorpus/accessimap-lecteur-der,lellex/accessimap-lecteur-der,lellex/accessimap-lecteur-der,lellex/accessimap-lecteur-der,makinacorpus/accessimap-lecteur-der,makinacorpus/accessi...
modules/tts.webapi/tts.webapi.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport createDocumentStore from '@sanity/document-store'\nimport client from 'part:@sanity/base/client'\nimport {Observable} from 'rxjs'\n\nconst serverConnection = {\n byId(id) {\n return Observable.timer(0, 5000)\n .flatMap((...
javascript
edit
0
1
mit
334efe8d5a4c899dc181d1e91756c45acfc5d0c1
sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity
src/datastores/document/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport classNames from 'classnames';\nimport '../css/ConcludedIssue.css';\n\n\nclass ConcludedIssue extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n visibleAlter...
javascript
edit
0
2
mit
ffe40beddf09430a182330748322088a4cd6f51a
dotkom/super-duper-fiesta,dotkom/super-duper-fiesta,dotkom/super-duper-fiesta
src/components/ConcludedIssue.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nHB.StoryView = Ember.View.extend({\n classNames: [\"story\"],\n\n templateName: function() {\n if (this.get('content.isDeleted')) {\n return \"story/deleted\";\n }\n return \"story/\" + this.get('content.type');\n }.pro...
javascript
edit
0
3
apache-2.0
32ec135ce9a5c85632ecf55b04692b4024abdd37
astraldragon/hummingbird,jcoady9/hummingbird,sidaga/hummingbird,NuckChorris/hummingbird,sidaga/hummingbird,paladique/hummingbird,sidaga/hummingbird,saintsantos/hummingbird,erengy/hummingbird,synthtech/hummingbird,xhocquet/hummingbird,hummingbird-me/hummingbird,vevix/hummingbird,astraldragon/hummingbird,Snitzle/hummingb...
app/assets/javascripts/views/story_view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar createClient = require(\"../util/createClient\");\n\nmodule.exports = function(req, res, next) {\n if (req.unsavedAccount.full_access === false && !req.otherBlogsUseAppFolder)\n return next();\n\n var client = createClient(req....
javascript
edit
0
4
cc0-1.0
8bf699de70d47aaa7a999a7cf286bdc11f232759
davidmerfield/Blot,davidmerfield/Blot,davidmerfield/Blot,davidmerfield/Blot
app/clients/dropbox/routes/createFolder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst url = require('url');\nconst jade = require('jade');\n\nmodule.exports = function(route, root, data, options, err) {\n\n try {\n\n root = root || '.';\n options = options || {};\n\n ...
javascript
edit
0
7
cc0-1.0
2e462ab27f5828a2598bb6355334519d543dc020
sgarver/rotu,sgarver/rotu
rotu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ZIP = require(\"./zip\");\nvar FS = require(\"fs\");\nvar data = FS.readFileSync(\"zip.zip\")\nvar reader = ZIP.Reader(data);\nconsole.log(reader.toObject('utf-8'));\n\n```\n\nApply this change: Test two ways of reading: buffer and ...
javascript
edit
0
1
mit
a85d05bd5d4166fcd3ab55c52ddee2df959920eb
kriskowal/zip
test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar md5 = require('md5');\nvar config;\n\nexports.get_username = function get_username() {\n config = JSON.parse(fs.readFileSync(__dirname + \"/config.json\",\n \"utf-8\"));\n docume...
javascript
edit
0
1
mit
ce4a842a1825b65bca26636d05341b201cff4b54
ThomasLee969/net.tsinghua,ThomasLee969/net.tsinghua,ThomasLee969/net.tsinghua
src/account_setting.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n Copyright 2014 Weswit Srl\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 License at\n\n http://www.ap...
javascript
edit
0
3
apache-2.0
b8a450c37de43eb46ea93fa199c6742a48feb129
Lightstreamer/Lightstreamer-example-Portfolio-client-javascript,Lightstreamer/Lightstreamer-example-Portfolio-client-javascript,Weswit/Lightstreamer-example-Portfolio-client-javascript,Weswit/Lightstreamer-example-Portfolio-client-javascript
src/PortfolioDemo/js/lsClient.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar BlobFileSource = Source.createComponent(\"BlobFileSource\");\n\nBlobFileSource.defineMethod(\"construct\", function construct() {\n\n if (!this.fileHandler) this.fileHandler = new BlobFileHandler();\n\n});\n\nBlobFileSource.defin...
javascript
edit
0
3
mit
7bef0b64ca9d1dc52c843ac70eeba437b3b42eee
sethlu/ica,many-to-many/ica,sethlu/ica,many-to-many/ica,sethlu/ica,many-to-many/ica
scripts/sources/BlobFileSource.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { _ } from 'meteor/erasaur:meteor-lodash';\nimport { moment } from 'meteor/momentjs:moment';\n\n/**\n * Each RadGrad collection class instance must add itself to this array so that its checkIntegrity mechanism\n * will be called....
javascript
edit
0
1
apache-2.0
76d74c25deaaa294f030f7ba5647306ce372bb4c
radgrad/radgrad,radgrad/radgrad,radgrad/radgrad
app/imports/api/integritychecker/IntegrityChecker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// export default {\n// FETCH_USER_CONSTELLATIONS_REQUEST: function (action) {\n\n// },\n// CREATE_CONSTELLATIONS_REQUEST: function (action) {\n\n// },\n// };\n\n```\n\nApply this change: Set queries for User Profiles" ...
javascript
edit
0
1
mit
74f482d35e3aeadc75860a6f1c3777f4772e8ff8
GetGee/G,GetGee/G
src/userprofiles/queries/index.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Update URL to the new github.io one!" }, { "role": "assistant", "content": "javascript:script=document.createElement(\"script\");script.type=\"text/javascript\";script.src=\"http://fridgefish.github.io/simplification/simplifi...
javascript
new_file
0
0
apache-2.0
c51c7972148aa75b1d91cd24bceb317ab99076ab
fridgefish/simplification
simplification_bookmarklet.min.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Configure and mv to config.js\nvar config = {};\n\nconfig.steam_name = \"\";\nconfig.steam_user = \"\";\nconfig.steam_pass = \"\";\nconfig.steam_guard_code = \"\";\n\nconfig.badge_url = \"http://steamcommunity.com/id/XXXXXXX/badges\"...
javascript
edit
0
0
mit
217b50a3ddf4efb429fd6f8dbad32b96bf62c57c
jimmydorry/idle-card-bot
config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst express = require('express');\nconst exphbs = require('express-handlebars');\n\n// Heroku sets NODE_ENV to production by default. So if we're not\n// on Heroku, we assume that we're developing locall...
javascript
edit
0
1
mit
1c21d29dd5d3977f742eb1ccdf2f87b622518a05
jmeas/finance-app,jmeas/moolah,jmeas/moolah,jmeas/finance-app
server/index.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: 'auto',\n EmberENV: {\n FEATURES: {\n // Here you can enable experime...
javascript
edit
0
4
bsd-3-clause
f745ed5a999c8cef4813055f653076160ea01c12
FreeMusicNinja/freemusic.ninja,FreeMusicNinja/freemusic.ninja
ember/config/environment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Created by Oleksiy Rudenko on 2016-04-28.\n */\n(function() {\n 'use strict';\n\n angular\n .module('app')\n .run(function ($state) { // force $state due to ui-view includes \n });\n})();\n```\n\nApply this change: Re...
javascript
edit
0
1
mit
e8877220f9a729b794a750ecb2a029054fcf95c8
OleksiyRudenko/taxret-ngmd,OleksiyRudenko/taxret-ngmd
src/client/app/core/route-run.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PureComponent } from 'react';\nimport cx from 'classnames';\nimport PropTypes from 'prop-types';\nimport { Box } from '../box';\nimport theme from './theme.css';\n\nclass ScrollContainer extends PureComponent {\n render...
javascript
edit
0
4
mit
57de767aa9e3b5408a317d42a0c8d17f8e8ae66a
teamleadercrm/teamleader-ui
src/components/scrollContainer/ScrollContainer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#ifndef __DOMAIN_MANAGER__\n#define __DOMAIN_MANAGER__\n\n\n#include \"lib/common.js\"\n#include \"data/suffix-list.js\"\n\n\nrndphrase.DomainManager = {\n get_reg_domain: function(rules, doms) {\n var node = rules[doms[0]];\n...
javascript
edit
null
null
bsd-2-clause
7a93bac49374e583d7bb7197a27605d06763de6f
brinchj/RndPhrase,brinchj/RndPhrase,brinchj/RndPhrase
lib/domainmanager.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar chai = require('chai');\nvar expect = chai.expect;\n\nvar requireHelper = require('../../require_helper');\nvar Toggle = requireHelper('settings/Toggle');\n\ndescribe(\"Toggle\", function(){\n\n\tvar toggle;\n\n\tbe...
javascript
edit
0
1
mit
cdbb93de694868e5e90cf1b259bb5f4f1f3dd7f3
traviswimer/PlugPro,traviswimer/PlugPro,SkyGameRus/PlugPro,SkyGameRus/PlugPro
test/unit/settings/Toggle_test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('lodash'),\n Promise = require('bluebird'),\n util = require('../util'),\n log = util.logger();\n\nfunction Campaign(marketo, connection) {\n this._marketo = marketo;\n this._connection = connection;\n}\n\nCam...
javascript
edit
0
2
apache-2.0
a333adc492d944ad8eacfe88689570e57f39c2fd
MadKudu/node-marketo,usermindinc/node-marketo,MadKudu/node-marketo,usermindinc/node-marketo
lib/api/campaign.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Logger = require('./Logger'),\n inherits = require('inherits');\n\n\"use strict\";\n\nvar ConsoleLogger = function () {\n this._console = window.console;\n};\n\ninherits(ConsoleLogger, Logger);\n\nLogger.prototype.debug = func...
javascript
edit
0
1
mit
214113e2cb5f64a53f371fef9181391b32a11da4
mtfranchetto/ng-common
lib/ConsoleLogger.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function(environment) {\n let ENV = {\n modulePrefix: 'dummy',\n environment,\n rootURL: '/',\n locationType: 'auto',\n EmberENV: {\n FEATURES: {\n // Here you can enable exp...
javascript
edit
0
4
mit
34121b6a4ce49fdadf239cf5d8432c1b1f720297
jgwhite/ember-sortable,jgwhite/ember-sortable
tests/dummy/config/environment.js
rejected_duplicate
Near-duplicate of sample 84658
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport classNames from 'classnames/dedupe';\nimport React from 'react';\n\nclass IconRadioButton extends React.Component {\n render() {\n let {checked, className, disabled, shadowClassName, radioDotClassName} = this.props;\n let ...
javascript
edit
0
1
apache-2.0
e943a6e4a65cfd4ac9f92c59072f92dc0fa90d07
mesosphere/reactjs-components,mesosphere/reactjs-components
src/Form/icons/IconRadioButton.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * @module fluent-react\n * @overview\n *\n\n * `fluent-react` provides React bindings for Fluent. It takes advantage of\n * React's Components system and the virtual DOM. Translations are exposed to\n * components via the provide...
javascript
edit
0
0
apache-2.0
4addd4d2f127736b08c15bba26384c9be518d102
projectfluent/fluent.js,projectfluent/fluent.js,projectfluent/fluent.js
fluent-react/src/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar _ = require('lodash'),\n iframePhone = require('iframe-phone'),\n EMBED_FLAG = 'itsi_embed',\n QUERY_SUFFIX = EMBED_FLAG + '=true';\n\nvar ItsiEmbed = function() {\n this.phone = new iframePhone.getIFr...
javascript
edit
0
3
apache-2.0
94a224a48c0451d64a9e7b89759c83e111148563
lliss/model-my-watershed,project-icp/bee-pollinator-app,WikiWatershed/model-my-watershed,project-icp/bee-pollinator-app,lliss/model-my-watershed,WikiWatershed/model-my-watershed,WikiWatershed/model-my-watershed,kdeloach/model-my-watershed,kdeloach/model-my-watershed,kdeloach/model-my-watershed,kdeloach/model-my-watersh...
src/mmw/js/src/core/itsiEmbed.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport AutocompleteProvider from './AutocompleteProvider';\nimport Q from 'q';\nimport {emojioneList, shortnameToImage, shortnameToUnicode} from 'emojione';\nimport Fuse from 'fuse.js';\n\nconst EMOJI_REGEX =...
javascript
edit
null
null
apache-2.0
1b414cad18519ee40d623732af256215e0459a74
matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,aperezdc/matrix-react-sdk,aperezdc/matrix-react-sdk,matrix-org/matrix-react-sdk
src/autocomplete/EmojiProvider.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar helpers = require(\"../helpers\")\n\ndescribe('Security', function() {\n it(\"Initializes a (hopefully secret) cookie and navigates to the security test page\", function(){\n browser.ignoreSynchronization = true;\n ...
javascript
edit
0
1
mit
41c9a6a691e73d9bdf994095bb72a3cd46eb4bb8
mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS,mattzeunert/FromJS
src/e2e/security/security.e2e.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * ASCII book generator methods, for implementing gpub.book.Gen\n * interface.\n */\ngpub.book.ascii.generator = {\n generate: function(spec) {\n var view = this.options().bookOptions;\n var content = [];\n this.forEachSg...
javascript
edit
null
null
mit
70b7032de91fd66525d28815af5b29dc08f0f5d2
Kashomon/gpub,Kashomon/gpub,Kashomon/gpub
src/book/ascii/ascii_generator.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Archive\n * @return {Archive}\n */\nfunction Archive() {\n \n if( !(this instanceof Archive) )\n return new Archive()\n \n // this.directory = new Zip.CentralDirectory()\n this.records = []\n \n}\n\n/**\n * Zip Archive ...
javascript
edit
0
2
mit
1acff6d2d3640c7da500c4bf6f600fa8ccab21f8
jhermsmeier/node-ziplick,jhermsmeier/node-slipstream
lib/archive/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst $ = require('cheerio');\nconst Promise = require('bluebird');\nconst drive = require('../drive');\nconst get = require('../get');\nconst textTemplate = require('../textTemplate');\n\nconst url = 'http://yle.fi/uutiset/osasto/news/...
javascript
edit
0
1
mit
302676ca6ae946b496b2da6298ca519d785a7c9a
mjpohja/moneypenny
src/content/yleNews.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global Uint8Array*/\nvar exifParser = require('exif-parser'),\n fs = require('fs');\n\nmodule.exports = {\n name: 'unexpected-exif',\n installInto: function (expect) {\n expect.installPlugin(require('magicpen-media'));...
javascript
edit
0
4
bsd-3-clause
6e68d7e0239c234735096adcfd0f9e48c8110f29
unexpectedjs/unexpected-exif
lib/unexpectedExif.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*!\n * tweensy - Copyright (c) 2017 Jacob Buck\n * https://github.com/jacobbuck/tweensy\n * Licensed under the terms of the MIT license.\n */\nimport now from \"performance-now\";\nimport rafq from \"rafq\";\n\nconst queue = rafq();\n\...
javascript
edit
0
4
mit
ccd6472d90afa39e4bca500815e35940363e5aeb
jacobbuck/tweenie,jacobbuck/tweensy
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose'),\n\tuuid = require('uuid/v1'),\n\tCards = require('./CardsModel'),\n\tSchema = mongoose.Schema,\n\tPlayerSchema = new Schema({\n\t\tsessionId: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t\tselec...
javascript
edit
0
1
unlicense
320c03719cb9fd1768cdb0addc7b8e7db7b0bdd1
ejwaibel/squarrels,ejwaibel/squarrels
src/server/models/PlayerModel.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global ftUtils, moment */\n'use strict';\n\nvar app = angular.module('flowList', ['ui.grid']);\n\napp.controller('flowListCtrl', function($scope, $http) {\n $http.get('/json/rawFlowsForLast/5/minutes')\n .success(function(d...
javascript
edit
0
1
mit
04b3e208fe31ab3562fa3871d48a1c7676eb5d04
skarfacegc/FlowTrack2,skarfacegc/FlowTrack2
www/js/flowListController.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar dir = './lib';\nif (process.env.COVERAGE){\n dir = './lib-cov';\n}\n\nvar M = require(dir);\n\nif (typeof window !== 'undefined') {\n var _M = window.M;\n window.M = M;\n M.noConflict = function () {\n ...
javascript
edit
0
1
mit
8f44f0ba04f43105106e934693d3fbe3afae0ca5
kwangkim/javascript-cas,aantthony/javascript-cas,kwangkim/javascript-cas
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar lint = require('./lint');\nvar clean = require('./clean');\nvar copy = require('./copy');\n\nvar runSequence = require('run-sequence');\n\nexports.config = function(gulp, debugTask, releaseTask) {\n\tlint.config(gulp);\n\tclean.conf...
javascript
edit
0
2
mit
4f3bef88d1a515a198dfb5322f38a60bfedf9965
RenovoSolutions/Gulp-Typescript-Utilities,SonofNun15/Gulp-Typescript-Utilities
build.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar micromatch = require('micromatch');\nvar arrify = require('arrify');\n\nvar anymatch = function(criteria, value, returnIndex, startIndex, endIndex) {\n criteria = arrify(criteria);\n value = arrify(value);\n if (...
javascript
edit
0
6
isc
5d862c7f6a260e4da5ce2511e500a186f5fdeced
floatdrop/anymatch,es128/anymatch
index.js
rejected_duplicate
Near-duplicate of sample 75576
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n/**\n * Dependencies.\n */\n\nvar phonetics;\n\nphonetics = require('soundex-code');\n\n/**\n * Change handler\n *\n * @this {WordNode}\n */\n\nfunction onchange() {\n var data,\n value;\n\n data = this.dat...
javascript
edit
0
4
mit
df6b53ce3f0c7cef681ee37264802686b7dad12c
wooorm/retext-soundex
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n config: {\n fontSize: 13,\n fontFamily: '\"Operator Mono\", \"Fira Code\", Monoid, Menlo, \"DejaVu Sans Mono\", \"Lucida Console\", monospace',\n css: `\n header {\n box-shadow: 0px 2px 20px rg...
javascript
edit
0
0
mit
4e1e855197f34b947105fcb60754b78c08e60390
philpl/dotfiles,philplckthun/dotfiles,philpl/dotfiles
hyper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @file Selection Colormaker\n * @author Alexander Rose <<EMAIL>>\n * @private\n */\n\n\nimport { Color } from \"../../lib/three.es6.js\";\n\nimport Selection from \"../selection.js\";\nimport Colormaker from \"./colormaker.js\";\...
javascript
edit
0
4
mit
72ead29185f56011963e87b4a928b07b14db7b55
fredludlow/ngl,j0kaso/ngl,fredludlow/ngl,fredludlow/ngl,arose/ngl,j0kaso/ngl,arose/ngl,fredludlow/ngl,arose/ngl,arose/ngl,j0kaso/ngl
src/color/selection-colormaker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function (actions, context) {\n return input => {\n const promise = new Promise(resolve => resolve(input));\n\n return decoratePromise(promise, actions);\n }\n};\n\nfunction decoratePromise(prom...
javascript
edit
0
2
mit
ea58be95a20ca3d4fe5599ccc67a65da59ea584f
compulim/promise-pipe
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar knexConfig = require('./knex-config.js');\nvar knex = require('knex')(knexConfig[process.env.HAL_ENV]);\nvar bookshelf = require('bookshelf')(knex);\n\nconsole.log('Top of bookshelf.js');\nconsole.log(' env: ' + pr...
javascript
edit
0
1
apache-2.0
5ef4b554f6930e277261ccec81f0e50d642cac1a
nobbyknox/hal
lib/dao/bookshelf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport Control from './Control';\n\nclass Select extends Control {\n static propTypes = {\n className: PropTypes.string,\n id: PropTypes.string,\n name: PropTy...
javascript
edit
0
3
mit
17477c596198d2a719798b4ec42db16666a89593
darrikonn/react-chloroform,darrikonn/react-chloroform,darrikonn/react-chloroform
src/components/Select.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\nvar requestHelper = require('./request-helper');\n\nvar jsonSchema = require('jsonschema');\n\n/**\n * Returns an express middleware function that validates the request body\n * or the request's field if provided agai...
javascript
edit
0
7
bsd-3-clause
699a8905e5ea504e599124dcb1604241689dac4e
ebu/cpa-auth-provider
lib/validate-json.js
accepted
null
true