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\nmodule.exports = {\n safe: function (thing, path, otherwise) {\n thing = (typeof thing === 'object' && thing != null) ? thing : {};\n var props = path.split('.');\n if (props.length === 1) {\n return typeof thing[props[0]...
javascript
edit
0
5
mit
11ecafba1b14572b0c2cf486619ea6ae9d52be86
mantacode/safe-obj
safe.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable no-console */\nimport chalk from 'chalk';\n\nexport function logConfig(caption, config) {\n console.log(chalk.cyan(caption));\n console.log(JSON.stringify(config, null, 2));\n}\n\n```\n\nApply this change: Use consol...
javascript
edit
0
1
mit
18d243ed97fa7bb7556817459f542e38c4b0f934
kadirahq/react-storybook,storybooks/react-storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook
lib/core/src/server/logConfig.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\n\n\n/*global nodeca, _*/\n\n\nvar me_in_fields = [\n '_uname',\n 'locale'\n];\n\n\n// fetch current user info\n// fired before each controllers\nnodeca.filters.before('', { weight: -70 }, function load_current_user(pa...
javascript
edit
0
4
mit
efdc856ccd13429937555dbb863666523764ae9c
nodeca/nodeca.users
lib/filters/load_current_user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Translate keys like laravel helper method trans\n *\n * @param {String} key the translation key to translate\n * @param {Object} [params={}] the params to include in the translation\n * @return {String} the...
javascript
edit
0
2
mit
2fabe2fab5bdf028a79309b35362223f02e3d4a4
hadefication/polyglot,hadefication/polyglot
src/resources/assets/js/trans.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar os = require('os');\nvar io = require('socket.io-client');\n\n// The Castle address is loaded dynamically and passed to this script as an argument\nvar socket = io.connect('http://'+process.argv[2]+':8888');\n\nif(!process.stdin.isT...
javascript
edit
0
5
mit
fa89ff8ebfd8f5f9cbd6d3477fa15fc180e7213b
vjacek/watchman,vjacek/watchman,vjacek/watchman
send.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Shortcuts for common image kinds\n\nexport const BINARY = 'BINARY';\nexport const GREYA = 'GREYA';\nexport const RGBA = 'RGBA';\nexport const RGB = 'RGB';\nexport const GREY = 'GREY';\n\n\n```\n\nApply this change: Add CMYK and CMYKA...
javascript
edit
0
0
mit
3ba7104d55581f41c4e25238941be42ddfed489f
image-js/core,image-js/ij,image-js/ij,image-js/ij,image-js/image-js,image-js/image-js,image-js/core
src/image/kindNames.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport Chronodex from './src/Chronodex.jsx'\n\nlet events = [\n [9, 10, 'Email'],\n [10, 12, 'Meeting'],\n [12, 13, 'Lunch'],\n [13, 15, 'Meeting'],\n [15, 16, 'Coffee'],\n [16, 17, 'Email'],\n [17, 18,...
javascript
edit
0
0
mit
2d54e99d3398d7a3e96ba4076de297d1f234cbfd
naush/chronodex,naush/chronodex
entry.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Appcelerator Titanium Mobile\n * Copyright (c) 2011-2012 by Appcelerator, Inc. All Rights Reserved.\n * Licensed under the terms of the Apache Public License\n * Please see the LICENSE included with this distribution for details....
javascript
edit
0
0
apache-2.0
c992ded3b95aa8f11a37361039c8fd478244a2e9
appcelerator/titanium_mobile_tizen,appcelerator/titanium_mobile_tizen,appcelerator/titanium_mobile_tizen,appcelerator/titanium_mobile_tizen,appcelerator/titanium_mobile_tizen,appcelerator/titanium_mobile_tizen
tests/anvil/configSet/configs/tizen/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport {\n RepeatWrapping,\n NearestFilter,\n LinearMipMapLinearFilter,\n TextureLoader,\n Vector2\n} from 'three';\n\nconst loader = new TextureLoader();\n\nexport class TextureModule {\n static load(url) {\n return new Textur...
javascript
edit
0
2
mit
43d0b05f5ff368310219ee75c0538f60a590d009
WhitestormJS/whitestorm.js,WhitestormJS/whitestorm.js
src/modules/mesh/TextureModule.js
rejected_duplicate
Near-duplicate of sample 70389
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#! /usr/bin/env node\n\n/*\n * gog-scraper\n * Copyright (c) 2016 Jeff Minnear\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar program = require('commander');\nvar request = require('request');\nvar cheerio = require('c...
javascript
edit
0
5
mit
0ebc227c660657151a5212e488d803f341f6bee3
jeffminnear/pilot-fish
lib/gog-scraper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar React = require('react'),\n StateMixin = require('../mixins/app-StateMixin'),\n SearchBox = require('../components/app-SearchBox'),\n TaskList = require('../components/app-TaskList');\n\nvar MainCard = React.createClass({\n...
javascript
edit
0
1
mit
d150699117d5c01fbf51a0ba7b2400638b950da9
AwadMaharoof/Lazymine,Raathigesh/Lazymine,AwadMaharoof/Lazymine,Raathigesh/Lazymine
src/js/components/app-MainCard.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\nvar http = require('http');\nvar cheerio = require('cheerio');\n\nexports.translate = function(text, lang, trans, cb){\n http.get('http://tyda.se/search/'+text+'?lang%5B0%5D='+lang+'&lang%5B1%5D='+trans, function(res){\n var bod...
javascript
edit
0
4
mit
d16a65ae7572ccb3e1028e28742d4d284b241a32
siimon/tyda-cli,siimon/tyda-cli
tyda.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nwindow.addEventListener(\"load\", function(e) {\n var run = function() {\n var document = content.document;\n var reGist = /^https?\\:\\/\\/gist\\.github\\.com\\/(\\d*)/i,\n reRel = /^\\/?(\\d+)$/,\n gist = reGist.t...
javascript
edit
0
9
bsd-3-clause
470d60cecd661784183cc9633790262e16a9d494
techtonik/bl.ocks.org,dubu/bl.ocks.org,dubu/bl.ocks.org,bclinkinbeard/bl.ocks.org,cool-Blue/bl.ocks.org,techtonik/bl.ocks.org,cool-Blue/bl.ocks.org,bclinkinbeard/bl.ocks.org
firefox/bl.ocks.firefox/content/bl.ocks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport createReducer from 'borex-reducers/createReducer';\nimport actionCreator from 'borex-actions/actionCreator';\nimport setMetaStatic from 'borex-actions/setMetaStatic';\n\nimport initialState from 'vclub/redux/initialClubState';\n\...
javascript
edit
0
2
mit
9f34db7a4daaaa4c1058dcd3aa34c7b7168d980b
BudIT/vclub,VirtualClub/vclub,BudIT/vclub,VirtualClub/vclub
src/redux/club/vote.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable */\n'use strict';\n\nmodule.exports = {\n name: 'ember-flatpickr',\n included: function(app) {\n let cssPath = 'themes/';\n if(app.options && app.options.flatpickr && app.options.flatpickr.theme) {\n cssPa...
javascript
edit
0
4
mit
32c6c1747b798b03a8d200dbf5dc3b84fd7fa487
shipshapecode/ember-flatpickr,shipshapecode/ember-flatpickr,shipshapecode/ember-flatpickr
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function cu(fn) {\n 'use strict';\n var args = [].slice.call(arguments);\n\n if ('function' !== typeof fn) throw new Error('auto-curry: Invalid parameter. First parameter should be a function.');\n if ('function' ==...
javascript
edit
0
4
mit
22cd0157d81831d765ae328e4cba253f314761a3
zeusdeux/auto-curry
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar debug = require( 'debug' )( 'wpcom-vip' );\nvar request = require( './lib/util/request' );\n\n// Modules\n\n\nfunction WPCOM_VIP( token ) {\n this.req = new Request( this );\n}\n\nWPCOM_VIP.prototype.API_VERSION = '1';\...
javascript
edit
0
1
mit
2536e5d46101068a045c8a7c05c8b02d99bb1e65
Automattic/vip-js-sdk
index.js
rejected_duplicate
Near-duplicate of sample 92534
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nmodule.exports = require('./abstract/test')\n\nif (!module.parent) {\n var test = require('tape')\n var packager = require('./')\n var leveldown = require('leveldown')\n module.exports(test, packager(leveldown))\n}\n...
javascript
edit
0
1
mit
df3de17e8bcca1250493822413638ad1de9dcc2d
Level/packager
test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { readdirSync, lstatSync } from 'fs';\nimport { resolve } from 'path';\nimport { init } from './server/init';\nimport { replaceInjectedVars } from './server/lib/replace_injected_vars';\n\nexport default function (kibana) {\n ret...
javascript
edit
0
1
mit
017042607ba141f7d7a51731f5466fb7a9b6d517
sw-jung/kibana_notification_center,sw-jung/kibana_notification_center
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Hapi = require('@hapi/hapi');\nconst routes = require('./routes');\nconst auth = require('./auth');\n\nmodule.exports = async (elastic, config, cb) => {\n const server = new Hapi.Server({ port: config.port, routes: { cors: { orig...
javascript
edit
0
3
mit
61e507ef3bbf11ee4f59ea3d9f470091d9229040
TheScienceMuseum/collectionsonline,TheScienceMuseum/collectionsonline
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express'),\n app = express();\n\napp.use( express.static( __dirname + '/public' ) );\n\nvar server = app.listen(3000, function() {\n console.log('Listening on port %d', server.address().port);\n});\n\n```\n\...
javascript
edit
0
1
mit
a68c652fd9b1d3f287f2885a6826751bbb02a4f4
jonkemp/wizard-mvc
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar express = require('express');\nvar routes = require('./app/routes/index.js');\nvar mongoose = require('mongoose');\nvar passport = require('passport');\nvar session = require('express-session');\nvar bodyParser = re...
javascript
edit
0
1
mit
5523bbb2eff7474aaf564f6180846e959f61eb03
jcsgithub/jcsgithub-mangatradingapp,jcsgithub/jcsgithub-mangatradingapp
server.js
rejected_duplicate
Near-duplicate of sample 80290
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\nconst yargs = require('yargs');\n\nyargs\n.usage('$0 command')\n.command('all', 'run all bundled commands', yargs => {\n\tconst operations = require('./src');\n\tconsole.log(\"yargs\" yargs)\n\n\tfor (const key of O...
javascript
edit
0
2
mit
ab73dbf435953e1b0b1b49501cd46e4a60caf0a1
Thinkmill/react-native-schemes-manager,Thinkmill/react-native-schemes-manager
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable no-console */\n/**\n * Setup and run the development server for Hot-Module-Replacement\n * https://webpack.github.io/docs/hot-module-replacement-with-webpack.html\n * @flow\n */\n\nimport express from 'express';\nimpor...
javascript
edit
0
3
mit
d1ec63c6fb8258bc218ecebdc4e4159ed630663b
ThomasBaldry/mould-maker-desktop,irwinb/table-viewer,stefanKuijers/aw-fullstack-app,TheCbac/MICA-Desktop,nantaphop/redd,Andrew-Hird/bFM-desktop,Byte-Code/lm-digitalstore,ivtpz/brancher,runandrew/memoriae,carly-lee/electron-sleep-timer,kivo360/ECC-GUI,kaunio/gloso,kme211/srt-maker,chentsulin/electron-react-boilerplate,b...
server.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst express = require('express');\nconst logger = require('winston');\nconst passport = require('passport');\nconst bodyParser = require('body-parser');\nconst bearerAuth = require('./auth/bearer');\ncon...
javascript
edit
0
1
mit
3abbaf59ea7786d4b9df82dcb08b20df35952cbe
sharemyscreen/api-service
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n'use strict';\n\nvar pkg = require('../package.json')\nvar cli = require('yargs');\nvar updateNotifier = require('update-notifier');\n\nupdateNotifier({ pkg }).notify();\n\ncli\n .strict()\n...
javascript
edit
0
0
mit
aef6e84abcfb237cedb9d92b05b0b8e28d316462
simonsinclair/collider-cli
bin/collider.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-env node */\nmodule.exports = {\n test_page: 'tests/index.html?hidepassed',\n disable_watching: true,\n launch_in_ci: [\n 'Chrome'\n ],\n launch_in_dev: [\n 'Chrome'\n ],\n browser_args: {\n Chrome: {\n mo...
javascript
edit
0
0
mit
d6095c1e7ee53f957652fea0cdf680f5a13f7880
topaxi/ember-bootstrap-datepicker,topaxi/ember-bootstrap-datepicker
testem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-plupload',\n\n included: function (app) {\n this._super.included(app);\n if (process.env.EMBER_ENV === 'development') {\n app.import('bower_compone...
javascript
edit
0
2
mit
7c51d2fd014fc8fcc6f1a36859d9f43b8cb7238b
musicdealers/ember-plupload,musicdealers/ember-plupload
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n\"use strict\";\nexports.__esModule = true;\nvar fs = require(\"fs\");\n\n\n// read in the /index.ts\n\n// use regex to find a console log for printing the version and update it for the new version\n\n// update /index.ts with the new co...
javascript
edit
0
2
apache-2.0
5f1c78aef2eae992e614584f6ca955f22b39e3b4
awayjs/core,awayjs/core,awayjs/core,awayjs/core,awayjs/core
copyVersionToIndex.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar assert = require('assert');\n\ndescribe('linter', function () {\n var linter = require('../../lib/linter');\n\n describe('lint', function () {\n it('should return array of errors', function () {\n var source ...
javascript
edit
0
1
mit
cca3e5f727b8f5beb25d6c54e1787be9efe60fae
JoshuaKGoldberg/lesshint,gilt/lesshint,runarberg/lesshint,lesshint/lesshint
test/specs/linter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar fields = ['skin', 'location', 'ink', 'layering', 'scarring', 'colors'];\nvar form;\n\n$(function() {\n form = document.forms[0];\n\n $('input').change(onChange);\n});\n\n\nfunction onChange(e) {\n var scale = {};\n var field_cou...
javascript
edit
0
5
mit
e8ca8f23f9b3d907e73be4f0ca67a80c833947f8
0x24a537r9/kirbydesai,0x24a537r9/kirbydesai
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { USER_ROLES } from '../constants';\n\nconst { ADMIN_ROLE, MEMBER_ROLE } = USER_ROLES;\n\nexport const hasPaidMail = ({ Subscribed }) => Subscribed & 1;\nexport const hasPaidVpn = ({ Subscribed }) => Subscribed & 4;\nexport const...
javascript
edit
0
1
mit
dbb5f2329fb98e62ce5adf992585e04a39e47f2a
ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient
packages/shared/lib/user/helpers.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n framework: 'mocha',\n 'test_page': 'tests/index.html?hidepassed&coverage',\n 'disable_watching': true,\n 'launch_in_ci': [\n 'Chrome'\n ],\n 'launch_in_dev': [\n 'Chrome'\n ]\n}\n\n```\n\nApply this cha...
javascript
edit
0
0
mit
08876f416ca45d2bb08db91068b6a2fde3d1c198
rox163/ember-frost-core,dafortin/ember-frost-core,dafortin/ember-frost-core,helrac/ember-frost-core,EWhite613/ember-frost-core,helrac/ember-frost-core,ciena-frost/ember-frost-core,dafortin/ember-frost-core,rox163/ember-frost-core,ciena-frost/ember-frost-core,helrac/ember-frost-core,rox163/ember-frost-core,EWhite613/emb...
testem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { getContext, mapProps, compose } from 'recompose';\n\nimport { visibleRowIdsSelector, classNamesForComponentSelector, stylesForComponentSelector ...
javascript
edit
0
1
mit
ead2ddad26b912f4f011922b392b359a8d0cadda
ttrentham/Griddle,GriddleGriddle/Griddle,joellanciaux/Griddle,GriddleGriddle/Griddle,joellanciaux/Griddle
src/plugins/local/components/TableBodyContainer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst through = require('through2');\nconst gutil = require('gulp-util');\nconst fm = require('front-matter')\n\nconst PluginError = gutil.PluginError;\nconst PLUGIN_NAME = 'front-matter';\n\nmodule.exports = () => {\n ...
javascript
edit
0
3
mit
64c0803d06ba64dc822ab06f3da88fa9413a5384
kellychurchill/gulp-armadillo,Snugug/gulp-armadillo
lib/plugins/front-matter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$( document ).ready(function(){\n $('#add_to_calendar').click(function(e){\n e.preventDefault();\n var $form = $(this).closest('form');\n $.ajax({\n url: '/emails',\n type: 'POST',\n data: $form.serialize(),\n ...
javascript
edit
0
1
mit
dc939b494bb414c9d63b20b9388fd614b47bc102
ruby005-reed-sufrin-tang/concertify-me,ruby005-reed-sufrin-tang/concertify-me
app/assets/javascripts/users.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$([IPython.events]).on('notebook_loaded.Notebook', function(){\n // add here logic that should be run once per **notebook load**\n IPython.notebook.metadata.language = 'ruby' ;\n});\n\n$([IPython.events]).on('app_initialized.Noteb...
javascript
edit
0
1
mit
0687ad2cd63250e2077940a3c7499d62f78fea58
domitry/iruby,SciRuby/iruby,domitry/iruby,SciRuby/iruby,SciRuby/iruby,zalt50/iruby,mijoharas/iruby,zalt50/iruby,Rambatino/pi-ruby,mijoharas/iruby,Rambatino/pi-ruby,jjn2009/iruby,zalt50/iruby,hainesr/iruby,zalt50/iruby,SciRuby/iruby,astroboxio/iruby,astroboxio/iruby,hainesr/iruby,jjn2009/iruby
lib/iruby/static/custom/custom.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp');\nvar jshint = require('gulp-jshint');\nvar stylish = require('jshint-stylish');\n\ngulp.task('jshint', function() {\n return gulp.src(['*.js', 'lib/*.js', 'spec/*.js']).\n pipe(jshint())....
javascript
edit
0
1
mit
9bc6661eb135751f800a70b4ea0cf16875e450ac
chaoran/blackjack
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp');\nvar stylus = require('gulp-stylus');\nvar stylint = require('gulp-stylint');\nvar concat = require('gulp-concat');\nvar uglify = require('gulp-uglify');\n\nvar stylFiles = './assets/styl/*.styl';\n\nfunction...
javascript
edit
0
1
mit
2c97ef51e9916af7c5fa11ef70c5b6c131d0f0d4
arthurrump/gct,arthurrump/gct
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nrequire('../test_helper');\n\nvar Factory = require('factory-lady'),\n mongoose = require('mongoose');\n\nmongoose.model('ConfigVersion', new mongoose.Schema({\n version: {\n type: Date,\n unique: true,\n },\...
javascript
edit
0
1
mit
8e171c389e3d2e984383c3b02734259660629ebd
NREL/api-umbrella-router,NREL/api-umbrella,OdiloOrg/api-umbrella-router,NREL/api-umbrella,OdiloOrg/api-umbrella-router,NREL/api-umbrella-router,OdiloOrg/api-umbrella-router,apinf/api-umbrella,apinf/api-umbrella,NREL/api-umbrella,NREL/api-umbrella-router,apinf/api-umbrella,NREL/api-umbrella,apinf/api-umbrella,apinf/api-...
test/factories/config_versions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n\tjshint = require('gulp-jshint'),\n\tmocha = require('gulp-mocha');\n\ngulp.task('default', function () {\n\t// place code for your default task here\n});\n\ngulp.task('lint', function () {\n\treturn gulp.s...
javascript
edit
0
1
mit
87f621008c55215bf157606c4c2bf60cd7039b65
ashpool/telldus2graphite,ashpool/telldus2graphite
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('menuCtrl tests', function() {\n describe('instantiation and scope tests', function() {\n var $httpBackend, $rootScope, createController;\n beforeEach(function() {\n module('starter');\n module('starter.control...
javascript
edit
0
1
mit
3104476b61b126b4203f9cf7e68c61caefa95052
mdsgpp2016/frontend,mdsgpp2016/frontend,mdsgpp2016/frontend,mdsgpp2016/frontend,mdsgpp2016/frontend,mdsgpp2016/frontend,mdsgpp2016/frontend
test/controllers/menuCtrlTest.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction onOpen() {\n var spreadsheet = SpreadsheetApp.getActive();\n spreadsheet.addMenu('Time Tracking', [{ \"name\": 'Lauch Timer', \"functionName\": 'launchTimer_'}]);\n}\n\nfunction launchTimer_() {\n var ui = SpreadsheetApp.get...
javascript
edit
0
1
mit
6e1d449579254cff7d2e316bedfddf59bda00935
igrep/gs-timer
gs-timer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar browserify = require('browserify');\nvar gulp = require('gulp');\nvar glob = require('glob');\nvar reactify = require('reactify');\nvar source = require('vinyl-source-stream');\nvar shell = require('gulp-shell');\n\n/*\n gulp brows...
javascript
edit
0
2
mit
18a518ed6f18487693755f614fbc943adc3a2bc4
BinghamtonCoRE/core-site
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gulp = require('gulp'),\n concat = require('gulp-concat'),\n rename = require('gulp-rename'),\n uglify = require('gulp-uglify'),\n gulpif = require('gulp-if'),\n react = require('gulp-react');\n\nvar paths = [\n 'wra...
javascript
edit
0
1
mit
d0ed663ef1374776e25216b01450f0529bd9e5c2
gdi2290/cosmos,skidding/cosmos,kwangkim/cosmos,pekala/cosmos,react-cosmos/react-cosmos,react-cosmos/react-cosmos,kwangkim/cosmos,Patreon/cosmos,pekala/cosmos,rrarunan/cosmos,kidaa/cosmos,skidding/cosmos,Patreon/cosmos,teosz/cosmos,skidding/react-cosmos,skidding/react-cosmos,react-cosmos/react-cosmos,teosz/cosmos,rrarun...
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar gulp = require('gulp'),\n browserify = require('browserify'),\n transform = require('vinyl-transform'),\n uglify = require('gulp-uglify'),\n sourcemaps = require('gulp-sourcemaps'),\n jasmine = requir...
javascript
edit
0
1
mit
11901cd8635578f1eaf1c057c0c72f3de591b215
rowanoulton/bowler,rowanoulton/bowler
gulpfile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nglobal.simulatency = {}\n\nglobal.simulatency.timeout = 100\n\ninject(Meteor.server.stream_server.server._events, 'connection', function (args, done) {\n inject(args[0], 'write', function (args, done) {\n setTimeout(done, global.sim...
javascript
edit
0
2
mit
a8750422bca3faba4a3993cacb77fcd898b6ddee
Kriegslustig/meteor-simulatency
server/simulatency.js
rejected_duplicate
Near-duplicate of sample 67963
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport mongoose from 'mongoose';\nconst Schema = mongoose.Schema;\n\nconst todoSchema = new Schema({\n text: { type: 'String', required: true },\n completed: { type: 'Boolean', required: true },\n cuid: { type: 'String', required: tr...
javascript
edit
0
0
mit
47c8340f0a3f14e6a5d93817945a7191b194f64b
saltykovdg/mern-react-redux-nodejs-express-todo-list,saltykovdg/mern-react-redux-nodejs-express-todo-list
server/models/todo.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst assertJump = require('./helpers/assertJump');\n\nvar Ownable = artifacts.require('../contracts/ownership/Ownable.sol');\n\ncontract('Ownable', function(accounts) {\n let ownable;\n\n beforeEach(async function() {\...
javascript
edit
0
2
mit
58fdb956b582d0d6d28dc20d0c43b96b0e4bae27
OpenZeppelin/zep-solidity,pash7ka/zeppelin-solidity,OpenZeppelin/zeppelin-solidity,dmx374/zeppelin-solidity,pash7ka/zeppelin-solidity,OpenZeppelin/zeppelin-solidity,OpenZeppelin/openzeppelin-contracts,OpenZeppelin/zep-solidity,dmx374/zeppelin-solidity,OpenZeppelin/openzeppelin-contracts,OpenZeppelin/openzeppelin-contra...
test/Ownable.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar darkColor;\nvar lightColor;\n\nself.port.on(\"colors\", function(colors) {\n darkColor = colors[0];\n lightColor = colors[1];\n checkElementContrast(document.all[0]);\n});\n\nfunction checkElementContrast(element)\n{\n v...
javascript
edit
0
3
mit
632f88c0b097d18be7d5bf76e0817a8ad836c39b
DmitriK/darkContrast,DmitriK/darkContrast,DmitriK/darkContrast
data/checkContrast.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar Schema = mongoose.Schema;\n\nvar Objectid = mongoose.Schema.Types.ObjectId;\n\nvar ProductTypeSchema = new Schema({\n\tname: { type: String, required: true, index: true },\n\tfire_act...
javascript
edit
0
0
mit
1fdcb28a71e383e42d64abac2ffb508fe3bd97c7
10layer/jexpress,10layer/jexpress
models/producttype_model.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar $ = require('jquery');\n\n$(document).ready(function() {\n var $body = $('body');\n\n // Allow links to specify a HTTP method using `data-method`\n $('[data-method]').on('click', function(event) {\n event.preventDefault();\n\n...
javascript
edit
0
4
mit
bfbb23d250df64f6864568a585cec6f39c70d790
axton21/voting-app,DoSomething/voting-app,DoSomething/voting-app,axton21/voting-app,axton21/voting-app,DoSomething/voting-app,DoSomething/voting-app
resources/assets/js/method-link.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(document).foundation();\n\n$('#all_username').keydown(function(event) {\n if (event.keyCode == 13) {\n var reportAPI = \"http://localhost:5000/v1/api/watson/data/\"+$(\"#all_username\").val()+\"/reports\";\n\n $('#all_ent...
javascript
edit
0
2
mit
9d27cecdd7a4a8c5f2094c3f02dcba2a1a301e0b
martialblog/watson-diary,martialblog/watson-diary,martialblog/watson-diary
watson-connector/static/js/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Register ContentNode types (including meta information).\n\nContentNode.types = {\n \"document\": {\n name: \"Document\",\n allowedChildren: [\"section\"],\n properties: [\n {\n \"key\": \"title\",\n \"na...
javascript
edit
0
0
bsd-2-clause
dd39ef99be18aab0e3a1f8bd3f8d7f32c049719a
substance/legacy-composer,substance/legacy-composer
src/backend/content_node_types.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jslint*/\n\n(function(){\n\n var testElement = '<div id=\"testElement\">'+\n '<a class=\"link\"><a class=\"sub-link\"></a></a>'+\n '</div>';\n \n function teardown() {\n $('#...
javascript
edit
0
1
mit
3d11a025d0f20a214f9165da40c954c3be937288
AdamCraven/Capture,AdamCraven/Capture
test/context.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global describe, it */\n'use strict';\n\nvar assert = require('assert'),\n fs = require('fs'),\n wayback = require('../lib/wayback');\n\ndescribe('wayback', function() {\n it('should throw an error on timeout', function(done) {...
javascript
edit
0
1
mit
fa4884c62778cd5631b84e0efbd32361b927fd79
macbre/wayback-machine
test/wayback.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*jslint browser: true*/\n/*global require, define */\n\n/**\n * @module app\n */\ndefine('app', ['yaga'], function (Yaga) {\n 'use strict';\n window.Yaga = Yaga;\n});\n\nrequire(['app']);\n```\n\nApply this change: Add some hooks...
javascript
edit
0
1
isc
2de34048abb2ba42d2716909bc3f57ba72bf21e6
atd-schubert/yaga,atd-schubert/yaga
client/scripts/app.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar crypto = require('crypto')\n , qs = require('querystring')\n ;\n\nfunction sha1 (key, body) {\n return crypto.createHmac('sha1', key).update(body).digest('base64')\n}\n\nfunction hmacsign (httpMethod, base_uri, params, consumer_s...
javascript
edit
0
2
apache-2.0
a3be5ad5ea112422ed00da632530b93bcf54727c
MofeLee/request,lalitkapoor/request,cvibhagool/request,whembed197923/request,h1bomb/request,Codelegant92/request,kevinburke/request,manishnakar/request,rbramwell/request,MofeLee/request,IveWong/request,paulomcnally/request,udp/request,NewGyu/request,blabno/request,robu3/request,lalitkapoor/request,pablobrady/request,li...
oauth.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ngAudio = (function(context) {\r\n AudioChannel = function() {\r\n this.gain = context.createGain();\r\n this.gain.gain.value = 0;\r\n this.gain.connect(context.destination);\r\n\r\n return this;\r\n }\r\n AudioChannel.pro...
javascript
edit
0
3
mit
c2344572b1911f89046b5d3c5078984a80382259
peternatewood/shmup,peternatewood/shmup,peternatewood/shmup
audio.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// Protractor configuration file, see link for more information\n// https://github.com/angular/protractor/blob/master/docs/referenceConf.js\n\n/*global jasmine */\nvar SpecReporter = require('jasmine-spec-reporter');\n\nexports.config =...
javascript
edit
0
1
mit
d5b63e0b784928696c6bb9e77776e93200272818
kendaleiv/angular-testing,kendaleiv/angular2-testing,kendaleiv/angular2-testing,kendaleiv/angular-testing,kendaleiv/angular-testing,kendaleiv/angular2-testing
protractor.conf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { BrowserRouter as Router, Route, Switch } from 'react-router-dom';\n\n// =========== Components ===========\nimport App from '../components/app';\nimport NotFound from '../components/public-pages/not-...
javascript
edit
0
0
mit
32a18697971c96673ff0ba1c331d3ff9e70092ec
GiancarlosIO/ecommerce-book-app,GiancarlosIO/ecommerce-book-app,GiancarlosIO/ecommerce-book-app
app/javascript/app/routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* globals $, symbols */\n\n// Disable form submission (eg. via Enter key)\n$('form').submit(false)\n\n$('textarea, input, select').on('change keyup', function () {\n updateQrCode()\n})\n\nconst updateQrCode = function () {\n const si...
javascript
edit
0
4
mit
44492c18bec0c24457ee174218b15941fae33719
olliebennett/qrupted,olliebennett/qrupted
assets/script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\n\nimport VideoPreview from './VideoPreview';\n\n\nclass VideoPreviewsList extends Component {\n render() {\n return (\n <div></div>\n );\n }\n}\n\nVideoPreviewsList.propTypes = {\n...
javascript
edit
null
null
mit
58d6666e254c87ace1be21f6b759dd67e17377ae
mg4tv/mg4tv-web,mg4tv/mg4tv-web
src/components/VideoPreviewsList.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Vue from 'vue';\nimport Router from 'vue-router';\nimport FileManager from 'components/file-manager/FileManager';\nimport Content from 'components/editor-viewer/Content';\n\nVue.use(Router);\n\nexport default new Router({\n rout...
javascript
edit
0
2
mit
546e077d06a1f2633ee320309ea335ad425ed2e9
nus-mtp/sashimi-note,nus-mtp/sashimi-note,nus-mtp/sashimi-note
sashimi-webapp/src/router/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n extends: [\n 'plugin:ember/recommended',\n require.resolve('./base.js')\n ],\n env: {\n 'browser': true\n },\n rules: {\n 'new-cap': [ 'error', { 'capIsNewExceptions': [ 'A' ] } ],\n\n // Custom ...
javascript
edit
0
0
mit
95ac93c4fe043b66f328be1262c3e56977a56053
PatentNavigation/eslint-plugin-turbopatent
config/ember.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\n\nimport angular from 'angular'\nimport ngMockE2E from 'angular-mocks/ngMockE2E'\n\nlet status\n\nexport default angular.module('payment.backend', [\n ngMockE2E\n])\n.value('backend', {\n succeeds () {\n status = 200\...
javascript
edit
0
1
mit
b6e4688e9888f192920ab910bead380af72f9d1c
bendrucker/angular-payment,bendrucker/angular-payment
backend/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\n\n/* Note: this is boilerplate and has NOT been implemented yet */\nrouter.get('/', function(req,res,next){\n res.render('contacts_list')\n})\n\n/* Note: this is boiler...
javascript
edit
0
2
mit
877843a53ded3e038445dd1c6e20dbeeb49f29ae
calmcl1/voluble,calmcl1/voluble
routes/contacts.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport commands from './commands';\nimport { client as slackClient } from './slack';\n\nconst TEAM_DOMAIN = process.env.SLACK_TEAM_DOMAIN;\nconst TOKEN = process.env.SLACK_COMMAND_TOKEN;\nconst CHANNEL = process.env.SLACK_COMMAND_CHANNE...
javascript
edit
0
4
mit
89627b33ec054d1690415904f201775f7551e0b1
Mumakil/slack-gh-extras
lib/hook.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { expect } from 'chai';\n\nimport {\n setTheme,\n setStoredThemeObservable,\n} from '../../../src/notebook/epics/theming';\n\ndescribe('setTheme', () => {\n it('creates an action of type SET_THEME with a theme', () => {\n e...
javascript
edit
0
1
bsd-3-clause
ab6cf9ec0c75acecd2ced9c1558a6e93536e6957
jdetle/nteract,rgbkrk/nteract,jdfreder/nteract,jdetle/nteract,nteract/composition,captainsafia/nteract,0u812/nteract,nteract/nteract,captainsafia/nteract,jdfreder/nteract,rgbkrk/nteract,nteract/nteract,jdetle/nteract,nteract/nteract,rgbkrk/nteract,rgbkrk/nteract,nteract/composition,jdetle/nteract,jdfreder/nteract,capta...
test/renderer/epics/theming-spec.js
rejected_duplicate
Near-duplicate of sample 87950
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const CLASSNAME = 'list-graph';\n\nexport const SCROLLBAR_WIDTH = 6;\nexport const COLUMNS = 5;\nexport const ROWS = 5;\n\n// An empty path is equal to inline SVG.\nexport const ICON_PATH = '';\n\n// -1 = desc, 1 = asc\nexport co...
javascript
edit
0
0
mit
29384297a1926e4d9335602e6a43cec36de3932c
flekschas/d3-list-graph,flekschas/d3-list-graph
src/scripts/composition/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// models/shift.js\n\nstart();\nfunction start () {\n 'use strict';\n\n const mongoose = require('mongoose');\n \n const ItemSchema = new mongoose.Schema({\n username: { type: String, required: true, unique: true },\n password...
javascript
edit
0
0
apache-2.0
9621b269deddef4cb138709b1d7ef8a0e61b73ce
ailijic/era-floor-time,ailijic/era-floor-time
database/models/user.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @file stat.js\n * @license MIT\n * @copyright 2017 Karim Alibhai.\n */\n\nconst fs = require('fs')\nconst chalk = require('chalk')\nconst solver = require('solver')\n\nconst tools = process.env.TOOLS.split(',')\nconst results = ...
javascript
edit
0
2
mit
db119a7e04a3719c1b0c0ef295de8d011bdffd0f
karimsa/buildjs-benchmarks,karimsa/buildjs-benchmarks
stats.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('ngCordova.plugins.deviceOrientation', [])\n\n.factory('$cordovaDeviceOrientation', ['$q', function($q) {\n\n return {\n watchHeading: function(options) {\n var q = $q.defer();\n\n navigator.compass.watchHea...
javascript
edit
null
null
mit
741eb308d2013293418fdfd42fc0c6a001b40bb1
CodingSans/ng-cordova,justinwp/ng-cordova,andreground/ng-cordova,calendee/ng-cordova,Freundschaft/ng-cordova,andreground/ng-cordova,dangerfarms/ng-cordova,lulee007/ng-cordova,inovia-team/ng-cordova,omefire/ng-cordova,saimon24/ng-cordova,brunogonncalves/ng-cordova,sanoop-hashedin/ng-cordova,Dharmoslap/ng-cordova,edewit/...
src/plugins/deviceOrientation.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nYUI.add('dp-dashboardblockrandomgifplugin', function (Y) {\n\n Y.namespace('DP');\n\n Y.DP.DashboardBlockRandomGifPlugin = Y.Base.create('dpDashboardBlockRandomGifPlugin', Y.Plugin.Base, [], {\n initializer: function () {\n...
javascript
edit
0
1
mit
a6a76f95e2db94e9644c0eeff44d67c354e79a99
dpobel/PlatformUIExtensionSkeletonBundle,dpobel/PlatformUIExtensionSkeletonBundle,dpobel/PlatformUIExtensionSkeletonBundle
Resources/public/js/views/plugins/dp-dashboardblockrandomgifplugin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2020\n */\n\nimport Realm from 'realm';\n\nexport class Sensor extends Realm.Object {}\n\nSensor.schema = {\n name: 'Sensor',\n primaryKey: 'id',\n properties: {\n id: 'st...
javascript
edit
0
1
mit
08d845f5353f8e6688c97702bc11c756b3719d50
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/database/DataTypes/Sensor.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Ripple = require('ripple-lib')\nvar request = require('request')\n\nvar address = process.env.RIPPLE_ADDRESS || 'rwqhRo41zXZKooNbDNUqQ5dTRrQPQ1BDF7'\nvar lastTxId = process.env.LAST_TX_ID || 'E0785E2C6F7A7F84E03B05635A15C4992EA65532...
javascript
edit
0
2
isc
4378d25b3aa5daa21750ee150213e5118c8f8633
crazyquark/gatewayd,xdv/gatewayd,xdv/gatewayd,crazyquark/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,whotooktwarden/gatewayd,Parkjeahwan/awegeeks,zealord/gatewayd,whotooktwarden/gatewayd
listener.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const sizing = (textSize, align) => ({\n p: {\n props: {\n size: textSize,\n margin: 'small',\n align,\n style: {\n marginTop: 0,\n },\n },\n },\n h1: {\n props: {\n margin: 'small...
javascript
edit
0
1
apache-2.0
6965b58949355c234af605b6b63fdee531845ebc
grommet/grommet-cms-content-blocks,grommet/grommet-cms-content-blocks
src/ContentBlocks/BlockParagraph/sizing.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport MSinglex from '../m-singlex.vue';\n\nexport const UMenu = {\n name: 'u-menu',\n groupName: 'u-menu-group',\n childName: 'u-menu-item',\n extends: MSinglex,\n props: {\n router: { type: Boolean, default: true...
javascript
edit
0
4
mit
90004ee5842cbca74fe9fd55b3abc6c6eac8c72c
vusion/proto-ui,vusion/proto-ui
src/components/u-menu.vue/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nPackage.describe({\n summary: \"JavaScript.next-to-JavaScript-of-today compiler\",\n version: \"0.0.42\"\n});\n\nPackage._transitional_registerBuildPlugin({\n name: \"harmony-compiler\",\n use: [],\n sources: [\n \"plugin/compil...
javascript
edit
0
2
mit
9c549c9d16869c3ed280e7a2f4c57c10f701a1d5
mquandalle/meteor-harmony
package.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n//smooth-scroller.js\n\n(function($) {\n $.fn.smoothScroller = function(options) {\n options = $.extend({}, $.fn.smoothScroller.defaults, options);\n var el = $(this);\n\n $(options.scrollEl).animate({\n scrollTop: el.off...
javascript
edit
0
3
mit
50199118519cd8efffb3f2d04370d19460e2bac7
firstandthird/smooth-scroller,firstandthird/smooth-scroller
lib/smooth-scroller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst jpegThumbnail = dataUrl => new Promise((resolve, reject) => {\n const image = new Image();\n image.onload = () => {\n const canvas = document.createElement('canvas');\n const ctx = canvas.getContext('2d');\n\n ...
javascript
edit
0
4
bsd-3-clause
18451a5998564b653651700981a6d3d9720cfa9a
LLK/scratch-gui,LLK/scratch-gui
src/lib/backpack/jpeg-thumbnail.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(){\n var tilingEl = document.getElementById('penrose-tiling')\n , outerRadius = 0.9\n , innerRadius = outerRadius * Math.sin(18 * Math.PI / 180)\n , top = innerRadius\n , bottom = -innerRadius\n , left = -outer...
javascript
edit
0
1
mit
2a2b71f08c6c0d22847ba90eb0bc597c30cffae9
stevecj/penrose.js,stevecj/penrose.js
penrose.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n EmberENV: {\n FEATURES: {\n // ...
javascript
edit
0
4
mit
1d4a92046b471061afe6b8cdef284927ffeab401
knownasilya/ember-toggle,paulkogel/ember-cli-toggle,paulkogel/ember-cli-toggle,knownasilya/ember-cli-toggle,lifegadget/ember-cli-toggle,lifegadget/ember-cli-toggle,knownasilya/ember-cli-toggle,knownasilya/ember-toggle
tests/dummy/config/environment.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict'\nconst config = require(__dirname + '/config.js');\nconst Twit = require('twit');\nconst HC = require('node-hipchat');\n\nlet twitter = new Twit({\n consumer_key: config['twitter_consumer_key'],\n consumer_secret: config[...
javascript
edit
0
1
mit
ed59fe7c1090f6bc489c04d69f13ffb5b2a2bcc2
johanpoirier/teabots,johanpoirier/teabots,johanpoirier/teabots,johanpoirier/teabots
lucile-marbot/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport ACTIVITIY_STATUS from './activityStatus'\nconst IPCAdapter = require('electron-ipc-adapter')\n\nconst ipcRenderer = window.require('electron').ipcRenderer\n\nclass ClientIPCAdapter extends IPCAdapter {\n constructor (ipcRenderer...
javascript
edit
0
3
mit
eb36c85f3d5703ad20dc6f4dc523aa324842d416
swissmanu/orchestra-client,swissmanu/orchestra,swissmanu/orchestra-client,swissmanu/orchestra
src/client/utils/ipcAdapter.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst parseTime = (s) => {\n const re = /(\\d{2}):(\\d{2}):(\\d{2}),(\\d{3})/;\n const [, hours, mins, seconds, ms] = re.exec(s);\n return 3600*(+hours) + 60*(+mins) + (+seconds) + 0.001*(+ms);\n};\n\nexport const parseSRT = (text) =...
javascript
edit
0
4
mit
a056d3ef885293a74e1a1ca227af3b5653e31511
rsimmons/voracious,rsimmons/immersion-player,rsimmons/voracious,rsimmons/voracious,rsimmons/immersion-player
src/util/subtitles.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport styled from 'styled-components'\nimport { Link } from 'gatsby'\n\nexport const PostItemTitle = styled.h1`\n ${props => props.theme.Home_PostTitle}\n margin-bottom: 0.8rem;\n color: var(--text);\n transition: color 0.3s;\n`\n\...
javascript
edit
0
0
mit
4f8d1ba721fedc3ea88bf1caa8bd4d26065dde9c
evandromacedo/evandromacedo.com
src/components/PostItem/styled.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar onReady = require('kwf/on-ready');\n\nif (window.devicePixelRatio && window.devicePixelRatio > 1) {\n onReady.onRender('.kwfReplaceImageDpr2', function(el) {\n if (el.get(0).tagName.toLowerCase() == 'img') {\n i...
javascript
edit
0
2
bsd-2-clause
542414b4cdc4b10b8ae5533bcf0338933938891a
koala-framework/koala-framework,koala-framework/koala-framework
commonjs/replace-image-dpr.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndescribe('Users', function() {\n\n describe('Creation', function () {\n\n context('When creating a new user', function() {\n it('Should have an id', function() {\n some_guy = new mocks.user();\n });\n });\n });\...
javascript
edit
0
1
mit
7aaddd2dac63e5e141488c9fcb5db44081afd038
facundovictor/mocha-testing
test/unit/users.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { load as configLoader } from '../config';\n\n\nconst config = configLoader();\n\nexport const originMiddleware = async (ctx, next) => {\n ctx.response.set('Access-Control-Allow-Origin', config.origin);\n ctx.response.set('Acce...
javascript
edit
0
1
mit
39b8035987952cb98c1d89eab8b405f7a141ed2b
FreeFeed/freefeed-server,FreeFeed/freefeed-server
config/initializers/origin.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst { authenticate } = require('@feathersjs/authentication').hooks;\n\nconst { hashPassword, protect } = require('@feathersjs/authentication-local').hooks;\n\nconst gravatar = require('../../hooks/gravatar');\n\nmodule.exports = {\n ...
javascript
edit
0
0
mit
b5d25ec7f4b7c45c4905bec87f70d50ee38630cf
feathersjs/feathers-chat,feathersjs/feathers-chat,feathersjs/feathers-chat
src/services/users/users.hooks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * @class SMITHY/DojoBorderView\n * View implementation for Dojo Tab Container to support smithy \"tabs\"\n * layout mode.\n */\ndefine([\n \"../declare\",\n \"dijit/layout/TabContainer\"\n], function (\n declare,\n Tab...
javascript
edit
0
1
apache-2.0
c562b49e20719c9fbec8dfbdd3c9c1a8a5beb825
atsid/smithy-js,atsid/smithy-js
src/main/dojoviews/DojoTabView.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n stylePrefix: 'comp-',\n\n wrapperId: 'wrapper',\n\n wrapperName: 'Body',\n\n // Default wrapper configuration\n wrapper: {\n removable: false,\n copyable: false,\n draggable: false,\n components: []...
javascript
edit
0
0
bsd-3-clause
f5f849f1d8a01b37e0094e84f757de0b26ecb018
artf/grapesjs,artf/grapesjs,QuorumDMS/grapesjs,artf/grapesjs,QuorumDMS/grapesjs
src/dom_components/config/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { combineReducers } from 'redux';\n\nimport { TemperatureBreachConfigReducer } from './TemperatureBreachConfigReducer';\nimport { SensorReducer } from './SensorReducer';\n\nexport const EntitiesReducer = combineReducers({\n temp...
javascript
edit
0
0
mit
7b00d8d0ddf7f2346169880b2e9eb8ed35298767
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/reducers/Entities/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*global $, assert, trigger*/\n\n'use strict';\n\ndescribe('Albums create dialog', function () {\n this.timeout(20000);\n\n it('should create new album', function (done) {\n var user;\n\n TEST.browser\n // Authorize\n ...
javascript
edit
0
1
mit
a586cd584fc255e113fffd29fef4275d0a480ea7
nodeca/nodeca.users
test/client/users/album/create.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst { yup } = require('strapi-utils');\n\nconst strapiID = yup.lazy(value =>\n typeof value === 'number' ? yup.number().integer() : yup.string()\n); // https://github.com/jquense/yup/issues/665\n\nconst email = yup\n...
javascript
edit
0
1
mit
ede7fd0b90e5e6f8d4da802c6b2dcf2a184d3235
wistityhq/strapi,wistityhq/strapi
packages/strapi-admin/validation/common-validators.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar media = document.querySelectorAll('video, audio');\nvar rate = prompt('Speed?','');\nArray.prototype.forEach.call(media, function(player) {\n player.playbackRate = rate;\n});\n\n```\n\nApply this change: Include current playback r...
javascript
edit
0
2
cc0-1.0
d6f9d5bdd737c183546ed8aef159db165502c2f6
jachinn/html5-video-playback-rate
script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst winston = require('../');\n\n//\n// TODO: THIS IS BROKEN & MUST BE FIXED BEFORE 3.0\n// This should output what was previously referred to\n// as \"humanReadableUncaughtExceptions\" by default.\n//\nconst logger =...
javascript
edit
0
0
mit
d9d08ece842966daeea2ee227e240c4fc9264f1b
winstonjs/winston,winstonjs/winston
examples/exception.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar gRex = require('../../index.js'),\n Transaction = require(\"../../src/transaction/transaction\"),\n handlers = require(\"../../src/transaction/actionhandler\"),\n Element = require(\"../../src/element\");\n\nvar vertexHandl...
javascript
edit
0
1
mit
c0388ba9b5641dc2a82d97edb5e17211617c1117
jbmusso/grex
test/transaction/actionhandler.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar http = require('http');\n\n\nhttp.createServer(function (req, res) {\n var proxyRequest = http.request({\n 'hostname': 'www.google.com'\n\n }, function(proxyResponse) {\n\n delete proxyResponse.headers['content-length'];\n ...
javascript
edit
0
1
mit
22cc1ec354d2d7776d6e6103aad60bf118abdf14
leibowitz/cacheweb
server.js
accepted
null
true