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\nconst indentRegex = /^\\s+/\n\nconst getIndent = (plain, cursorPos) => {\n const startSlice = plain.slice(0, cursorPos)\n const lastNewline = startSlice.lastIndexOf('\\n') + 1\n const lineSlice = startSlice.slice(lastNewline)\n cons...
javascript
edit
0
3
cc0-1.0
88d5df8a1f4bf74c884e5d61a5c74b2421b3d3e0
philpl/react-live
src/utils/getIndent.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { loadConversation } from 'redux/modules/conversationModule';\n// COMPONENTS\nimport CommentsList from './CommentsList';\nimport { Load...
javascript
edit
0
1
mit
4b8a983680a03d6f7939fa8d29d1bd445d497ec2
ReactPoland/react-community
src/containers/Conversation/Conversation.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst Sequelize = require('sequelize');\n\nconst database = process.env.DATABASE_URL;\n\nconst db = new Sequelize(database, {\n logging: false\n});\n\nmodule.exports = {\n Sequelize,\n db\n};\n```\n\nApply this change: Throw a descri...
javascript
edit
0
0
mit
c2617bdb2326f1a236c34de00b91f69fe7ee7666
MustardTigers/MustardTigers,iMobs/MustardTigers
database/connection.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default class EventService {\r\n constructor($http) {\r\n this.$inject = ['$http'];\r\n this.$http = $http;\r\n this.events = [];\r\n }\r\n\r\n loadEventsByPlanId(planId) {\r\n return this.$http.get(`/api/events/${...
javascript
edit
0
3
mit
f784fb2657f23ec1b53c9070a043eaf81c2e4306
awaywego/awaywego,awaywego/awaywego
client/src/services/event/event.service.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst path = require(\"path\");\nconst fs = require(\"fs-extra\");\nconst should = require(\"should\");\n\nconst LATEST = \"2\";\n\nfunction generateScript() {\n return new Promise((resolve, reject) => {\n ...
javascript
edit
0
1
apache-2.0
5a012182d9f05e155f8b6505b6cee20e9594bfed
mw75/node-red,node-red/node-red,node-red/node-red,mw75/node-red,mw75/node-red,mw75/node-red,node-red/node-red
scripts/generate-publish-script.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { observable, action } from 'mobx';\n\nclass CrowdsalePageStore {\n\n @observable maximumSellableTokens;\n @observable maximumSellableTokensInWei;\n @observable investors;\n @observable ethRaised;\n @observable weiRaised;\n ...
javascript
edit
0
2
mit
2f15f0e751c8e603c4a91c963eee93eb8b022640
oraclesorg/ico-wizard,oraclesorg/ico-wizard,oraclesorg/ico-wizard
src/stores/CrowdsalePageStore.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\ntogglbutton.render('#headerContainer:not(.toggl)',\n { observe: true },\n function (elem) {\n const getDescription = function () {\n // entity: incident\n const ticketnumber = $('input[data-id=\"ticketnum...
javascript
edit
0
8
bsd-3-clause
15fe50c05b166c6f05e3889e9beaf14483a1a6df
glensc/toggl-button,glensc/toggl-button,glensc/toggl-button
src/scripts/content/dynamics-365.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport graphqlShorthandParser from 'graphql-shorthand-parser';\n\n// we wrap the parser to get useful error messages\n// see: https://github.com/pegjs/pegjs/issues/314\n\n// @p shorthand parser\n// @data string for parsing\nconst parse ...
javascript
edit
0
3
mit
d3ae6235a9a5f7c1a3c79ee903eb10f9873e04a8
nerdmed/graphql-tools
src/shorthandParser.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n\nimport promisify from '..'\n\ndescribe('Promisify', function() {\n it('succeeds properly', function() {\n const callback = function(arg1, arg2) {\n expect(arg1).toBe('something')\n arg2(null, 'wow')\n }\n...
javascript
edit
0
1
mit
55bb85f7fdb619138c0a9d0bc3234bcf4bf20037
steelbrain/promisify
spec/main-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar FOAM_SOURCES = [\n 'core/i18n.js',\n 'core/stdlib.js',\n 'core/io.js',\n 'core/writer.js',\n 'core/socket.js',\n 'core/base64.js',\n 'core/encodings.js',\n 'core/utf8.js',\n 'core/async.js',\n 'core/parse.js',\n 'core/eve...
javascript
edit
0
2
apache-2.0
3328334fcb3f89e763a1c7466935bff67c67aef7
mdittmer/foam,foam-framework/foam,osric-the-knight/foam,jacksonic/foam,jacksonic/foam,foam-framework/foam,jlhughes/foam,osric-the-knight/foam,foam-framework/foam,mdittmer/foam,foam-framework/foam,jacksonic/foam,jlhughes/foam,mdittmer/foam,jlhughes/foam,osric-the-knight/foam,osric-the-knight/foam,foam-framework/foam,mdi...
apps/bootstrap/foamSources.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst { emitEvent } = require('../../events');\nconst { mapValues, omit } = require('../../utilities');\n\n// Create event when all protocol-specific servers have started\nconst emitStartEvent = async function ({ server...
javascript
edit
0
1
apache-2.0
3f152bf6f412b18565a4c5608f0e510cf86ea08f
autoserver-org/autoserver,autoserver-org/autoserver
src/run/start/event.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n // Courses controller\n angular\n .module('courses')\n .controller('CoursesController', CoursesController);\n\n CoursesController.$inject = ['$scope', '$state', '$window', 'Authentication', '...
javascript
edit
0
5
mit
201728d0dd0c43a6435ceef4115152057c2d4012
shahthepro/arunai,shahthepro/arunai,shahthepro/arunai
modules/courses/client/controllers/courses.client.controller.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = function(localStorageService) {\n var configManager = {};\n\n configManager.getPrivateToken = function() {\n return localStorageService.get('private_token');\n }\n\n configManager.setPrivateToken = function(priva...
javascript
edit
0
2
mit
5feb55d9d853df4b2236c4e75d80b973ca47e5e7
Hexanet/MergeRequestsCI,Hexanet/MergeRequestsCI
app/js/services/config_manager.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport PersonGroup from '../../../../components/person-group'\nimport {sortPeople} from '../../../../../shared/utils'\n\n\nexport default Episode\n\nfunction Episode({episodeData}) {\n const {\n date,\n ...
javascript
edit
0
1
mit
597a943d351de1d446229e1fdb0315a5fba4e70a
javascriptair/site,javascriptair/site,javascriptair/site
src/pages/home/sections/episodes/episode.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport config from '../config/environment';\nimport Ember from 'ember';\nimport ajax from 'ember-ajax';\n\nconst { inject } = Ember;\n\nexport default Ember.Object.extend({ /**\n * Resolve the user over the Github API using the token...
javascript
edit
0
2
mit
9c09bba13841ddd2ee4ceece64be462a7398b1fd
ember-cli/ember-twiddle,knownasilya/ember-twiddle,pangratz/ember-twiddle,knownasilya/ember-twiddle,pangratz/ember-twiddle,pangratz/ember-twiddle,ember-cli/ember-twiddle,Gaurav0/ember-twiddle,ember-cli/ember-twiddle,Gaurav0/ember-twiddle,Gaurav0/ember-twiddle,knownasilya/ember-twiddle
app/torii-adapters/application.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { moduleForComponent, test } from 'ember-qunit';\n\nmoduleForComponent('flexberry-layers-attributes-panel', 'Integration | Component | flexberry layers attributes panel', {\n integration: true\n});\n\ntest('temporary test', func...
javascript
edit
0
1
mit
90db5f79267c0f0cbcc2fc02f5536eff85fff7fa
Flexberry/ember-flexberry-gis,Flexberry/ember-flexberry-gis,Flexberry/ember-flexberry-gis
tests/integration/components/flexberry-layers-attributes-panel-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\napp.directive('emoticonMenu', function($rootScope, $filter, $document) {\n\treturn {\n\t\ttemplateUrl: '/assets/app/header/emoticonMenu.html',\n\t\tscope: {\n\t\t\temoticons: '=emoticonMenu',\n\t\t\tvisible: '=ngShow'\n\t\t},\n\t\tlink:...
javascript
edit
0
2
mit
986ba92188c3dce5952c25eff94238b284760836
depinav/bunker,depinav/bunker,johnculviner/bunker,DigitalZebra/bunker,djbielejeski/bunker,weegeekps/bunker,bunkerchat/bunker,bunkerchat/bunker,JoshHarris/bunker,JoshHarris/bunker,weegeekps/bunker,pbrejcha/bunker,DigitalZebra/bunker,alexandergmann/bunker,pbrejcha/bunker,alexandergmann/bunker,johnculviner/bunker,djbielej...
assets/app/header/emoticonMenu.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst mainReducer = (state , action) => {\n\tswitch (action.type) {\n\t\tcase 'REQUEST_LOCATION':\n\t\t\treturn Object.assign({}, state, {\n\t\t\t\tloading: true\n\t\t\t})\n\t\tcase 'RECEIVE_LOCATION':\n\t\t\treturn Object.assign({}, st...
javascript
edit
0
7
mit
e9059fcedccc857bcaeaaa13fd2949862e0864a4
maximgatilin/weathernow,maximgatilin/weathernow
src/reducers/main.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global Showdown, Handlebars, html_sanitize*/\nimport cajaSanitizers from 'ghost/utils/caja-sanitizers';\n\nvar showdown = new Showdown.converter({extensions: ['ghostimagepreview', 'ghostgfm']});\n\nvar formatMarkdown = Ember.Handleba...
javascript
edit
0
6
mit
9997d3aaf1cd1989a6316a33cb7b2f708f643673
TryGhost/Ghost,TryGhost/Ghost,TryGhost/Ghost
ghost/admin/helpers/gh-format-markdown.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { StyleSheet } from 'react-native';\nimport { flatten } from 'lodash';\n\nexport const cachedStyles = {};\nexport const styleHasher = JSON.stringify; // todo: how bad is this?\n\n// Uses cached or generates a new StyleSheet for a...
javascript
edit
0
4
mit
4071783093461218c475b050cd03e494aecbaa6b
NewSpring/Apollos,NewSpring/Apollos,NewSpring/Apollos,NewSpring/Apollos,NewSpring/Apollos,NewSpring/Apollos
src/@ui/styled/createStyleSheet.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst chai = require('chai')\nconst expect = chai.expect\nconst calculateScore = require('../../lib/calculateScore')\n\ndescribe('Score', () => {\n it('should be 100 points for a * challenge', () => {\n expect(calculateScore(1)).to....
javascript
edit
0
1
mit
d005cf503d694fe27dca4fa95b1cdc97deeee44f
bkimminich/juice-shop-ctf,bkimminich/juice-shop-ctf
test/unit/calculateScore-spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { getAppIdFallback } from './appId';\nimport AppIdMap from './appIdResolver';\nimport { getTokenList } from './utils/storageManager';\n\nconst GTM = (() => {\n const isGtmApplicable = () => Object.values(AppIdMap).includes(`${...
javascript
edit
0
2
mit
32aafa4acf822f3ce839b65f66fab3789a21669d
binary-com/binary-bot,aminmarashi/binary-bot,aminmarashi/binary-bot,binary-com/binary-bot
src/common/gtm.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fs = require('fs');\nconst _ = require('lodash');\n_.mixin(require('lodash-inflection'));\n\nconst IMAGE_PATH = process.argv[2];\n\nconst images = fs.readdirSync(IMAGE_PATH, 'utf8');\n\nlet baseStructure = { wrestlers: {} };\n\nim...
javascript
edit
0
2
mit
bf2141fffe3a21c8fe61f824820d8543e229266c
Xabadu/LuchaPlayground
blassie.js
rejected_duplicate
Near-duplicate of sample 87838
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('app.sidebar').controller('SidebarCtrl', ['$scope', 'organizationService', 'spaceService', function ($scope, organizationService, spaceService) {\n $scope.organizations = [];\n\n // get all spaces\n var getSpacesPromis...
javascript
edit
0
3
apache-2.0
786ef12c5b9e94028a45d929f999531eec4e4182
icclab/cf-webui,icclab/cf-webui
app/shared/sidebar/sidebarCtrl.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar userData = require('./mockdata/exampleUsers');\nvar templateData = require('./mockdata/exampleTemplate');\nvar activityData = require('./mockdata/exampleActivity');\nvar historyData = require('./mockdata/exampleHistory');\nconst { U...
javascript
edit
0
2
mit
b95e34f515ec1032431823879742749771769d3f
TeamSparrows/sparrow,Ankit09osr/sparrow,Ankit09osr/sparrow,TeamSparrows/sparrow
seed.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nfunction traffic_data(traffic_levels) {\n var ctx = document.getElementById(\"traffic-chart\");\n var timeFormat = 'DD/MM/YYYY';\n var myChart = new Chart(ctx, {\n type: 'line',\n data: {\n datasets: [{...
javascript
edit
0
1
mit
4264a8db1c3d4061c8c13ad0435ad2ee2cc18e62
jloh/geojs-io,jloh/geojs-io
src/js/traffic.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar ExtractTextPlugin = require('extract-text-webpack-plugin');\nvar path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n context: path.join(__dirname, 'public'),\n entry: './index.js',\n...
javascript
edit
0
0
mit
bd488db643148a270cc567b47afa9180e6f7b22e
osumb/challenges,osumb/challenges,osumb/challenges,osumb/challenges
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Write javascript code for the following: Correct output of shell errors for CI detection" }, { "role": "assistant", "content": "var shell = require('shelljs')\n\nif(process.env.CI !== 'true' && shell.exec('npm run build').code != 0){\n shell.echo('Error: Project fa...
javascript
new_file
0
0
mit
369918921eec7f4621b5ef7d1b918158d4154c64
appology/resp-parser
test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* global require, module, __dirname */\n\nconst path = require( 'path' );\n\nmodule.exports = {\n\tentry: {\n\t\t'./assets/js/amp-blocks-compiled': './blocks/index.js',\n\t\t'./assets/js/amp-block-editor-toggle-compiled': './assets/src...
javascript
edit
0
0
apache-2.0
50ce781cece6790ab6197ae34b4b3f9873263633
GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp,GoogleForCreators/web-stories-wp
webpack.config.js
rejected_duplicate
Near-duplicate of sample 93616
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar _ = require('underscore')\n , fs = require('fs');\n\nfunction loadConfiguration() {\n var default_config = {\n default: {\n s3: {\n region: null,\n bucket: null,\n ...
javascript
edit
0
4
apache-2.0
0373ff12aa87e4e485f291141e7293af31065755
aliak00/kosmo,aliak00/kosmo,comoyo/nova,comoyo/nova
nova/lib/configuration.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar through = require(\"through\");\nvar path = require(\"path\");\n\nconsole.warn(\"Injecting Rewireify into modules\");\n\nmodule.exports = function rewireify(file, options) {\n options = {\n ignore: options.ignore || \"\"\n };\n...
javascript
edit
0
4
mit
adb93285168d6abd0e7cb09fbf1f004c97a79627
TheSavior/rewireify
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* eslint-disable react/forbid-prop-types */\n/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2021\n */\nimport React from 'react';\nimport { Wizard } from '../widgets';\nimport { PatientSelect } from '../widgets/Tabs/Patient...
javascript
edit
0
1
mit
47ba426bf34c304060c400eb365a518e8d5a3fc1
sussol/mobile,sussol/mobile,sussol/mobile,sussol/mobile
src/pages/VaccineDispensingPage.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar BinBuild = require('./');\nvar fs = require('fs');\nvar path = require('path');\nvar test = require('ava');\n\ntest('expose a constructor', function (t) {\n t.plan(1);\n t.assert(typeof BinBuild === 'function'...
javascript
edit
0
1
mit
112d66f9a1f8425797ed8b15d283862a8c281079
kevva/bin-build
test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport history from '!json!../assets/data/history.json'\nimport metadata from '!json!../assets/data/metadata.json'\n// Loading latest season in the main bundle itself\nimport latestSeasonData from '!json!../assets/data/season-latest.jso...
javascript
edit
0
2
mit
67d466132736a412badc5edb5b33375f7c314f68
reichlab/flusight,reichlab/flusight,reichlab/flusight
src/store/data.js
rejected_duplicate
Near-duplicate of sample 76328
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst cache = require('memory-cache')\nconst websockets = require('../websockets')()\n\n/**\n * Class representing the displayed data for XSplit\n */\nclass XSplit {\n constructor () {\n \"use strict\";\n let data = cache.get('xs...
javascript
edit
0
2
mit
9a1ccf6abceb88443c64e8d66e54046bfbcf31c8
chriscamicas/girr,chriscamicas/girr
server/src/models/xsplit.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar wmf = {}\n\nwmf.compatibility = require('wikimedia-page-library').CompatibilityTransform\nwmf.elementLocation = require('./js/elementLocation')\nwmf.utilities = require('./js/utilities')\nwmf.findInPage = require('./js/findInPage')\...
javascript
edit
0
0
mit
f83c08383b9e3b886a9b75d61dc7b9d7bf4d0fec
julienbodet/wikipedia-ios,josve05a/wikipedia-ios,julienbodet/wikipedia-ios,josve05a/wikipedia-ios,wikimedia/wikipedia-ios,wikimedia/apps-ios-wikipedia,julienbodet/wikipedia-ios,wikimedia/apps-ios-wikipedia,josve05a/wikipedia-ios,julienbodet/wikipedia-ios,wikimedia/apps-ios-wikipedia,montehurd/apps-ios-wikipedia,josve05...
www/index-main.js
rejected_duplicate
Near-duplicate of sample 79876
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Listeners for header\n */\n\nimport $ from 'jquery'\nimport { version } from '../../../package.json'\nimport { reload, erase } from '../game-util'\n\nconst deleteFriendo = (friendo) => {\n console.log('called')\n if (!friendo)...
javascript
edit
0
5
mit
e2ac8f7bf8307a509304c31eb4d05805b54e9602
mattdelsordo/friendo,mattdelsordo/friendo,mattdelsordo/friendo
src/game/setup/header-listeners.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport const ActionType = {\n INCREMENT: 'INCREMENT',\n DECREMENT: 'DECREMENT'\n};\n\nexport function incrementAsync() {\n return (dispatch) => {\n return new Promise((resolve, reject) => {\n setTimeout(() => ...
javascript
edit
0
1
mit
ce8d09f2fe89f9e59f5b53612377f541375f7d26
ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox,ohtomi/sandbox
sandbox-react-redux/src/Actions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n* Cepat Sembuh v1.0\n* Copyright 2016 Cepat Sembuh\n*/\n\n// Firebase go online whenever the application is open\ndocument.addEventListener(\"deviceready\", function () {\n Firebase.goOnline();\n});\n\n// Not available faskes\n$(...
javascript
edit
0
1
mit
174268c5dd4e521111de7c3f5a74a1828e24ae7b
mercysmart/cepatsembuh,cepatsembuh/cordova,mercysmart/cepatsembuh,cepatsembuh/cordova,cepatsembuh/cordova,mercysmart/cepatsembuh,mercysmart/cepatsembuh,cepatsembuh/cordova,mercysmart/cepatsembuh,cepatsembuh/cordova
www/js/profile.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nexport default function getCalendarMonthWeeks(month, enableOutsideDays) {\n const baseDate = month.clone().utcOffset(month.utcOffset());\n const firstOfMonth = baseDate.clone().startOf('month');\n const lastOfMonth = baseDate.clone()...
javascript
edit
0
7
mit
f30f5817ee36c2b9f28ff1561de177c84108c5af
agupta93/react-dates,arthurvi/react-dates,intwarehq/react-dates,intwarehq/react-dates,arthurvi/react-dates,acp31/react-dates,rocketrip/react-dates,acp31/react-dates,allanpope/react-dates,tombatossals/react-dates,rocketrip/react-dates,intwarehq/react-dates,allanpope/react-dates,agupta93/react-dates,tombatossals/react-da...
src/utils/getCalendarMonthWeeks.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/**\n * Listens for the app launching then creates the window\n *\n */\nchrome.app.runtime.onLaunched.addListener(function() {\n var screenWidth = screen.availWidth;\n var screenHeight = screen.availHeight;\n var width = screen...
javascript
edit
0
1
mit
fb66334d59bf7a8fe84c526afbdf5f1705aee30f
powpowshen/Monocle,powpowshen/Monocle,Powpow-Shen/Monocle
start.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { ListItem, Radio, Left, Right, Text } from 'native-base';\n\n// Radio button list item with title and note.\nexport default class RadioWithNote extends Component {\n\n constructor(prop...
javascript
edit
0
1
mit
28a86a6df92943a5fe709a26b031cf716e0970ec
justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client,justarrived/p2p-client
js/components/developer/create-job-screen/radioWithNote.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine(['sail',\n 'anchor/events',\n 'anchor/class'],\nfunction(sail, events, clazz) {\n \n function View(el, options) {\n View.super_.call(this);\n // TODO: Pass options (locals) to render\n this.el = typeof el...
javascript
edit
0
4
mit
d2a1c66bacfb8be412ad2178a3124eda1f9cba91
sailjs/view
view.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { call, fork, put, select, take, takeEvery } from 'redux-saga/effects';\n\nimport {\n types,\n syncTodos,\n} from '../reducer/todos.actions';\n\nimport rsf from '../rsf';\n\nfunction* syncTodosSaga() {\n const channel = yield ...
javascript
edit
0
2
mit
e92ee6744e6414d1a69cdb78999b1ab5bf86546d
n6g7/redux-saga-firebase
example/src/redux/sagas/todos.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport KataUrl from './kata-url.js'\n\nexport default class StartUp {\n constructor(xhrGet, xhrGetDefaultKata) {\n this.xhrGet = xhrGet;\n this.xhrGetDefaultKata = xhrGetDefaultKata;\n }\n\n loadSourceCode(withSourceCode) {\n\n...
javascript
edit
0
1
mit
81e3d5127e6683aab7338743cefe0f602c706ec1
tddbin/tddbin-frontend,tddbin/tddbin-frontend,tddbin/tddbin-frontend
src/startup/startup.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n *\n * ToolPage\n *\n */\n\nimport React, { PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { createStructuredSelector } from 'reselect';\nimport Markdown from 'react-remarkable';\nimport ContentBlock from ...
javascript
edit
0
3
mit
fb4d581b01b538db54ce5059343f5ca4ceaeaf98
BeautifulTrouble/beautifulrising-client,BeautifulTrouble/beautifulrising-client
app/containers/ToolPage/ToolLearnMoreItem.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nangular.module('materialscommons').component('mcExperimentTaskDetails', {\n templateUrl: 'app/project/experiments/experiment/components/tasks/mc-experiment-task-details.html',\n controller: MCExperimentTaskDetailsComponentControll...
javascript
edit
0
2
mit
c5edf95bb48b0e8ff3f0e255f719a89baa85b271
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
website/src/app/project/experiments/experiment/components/tasks/mc-experiment-task-details.component.js
rejected_duplicate
Near-duplicate of sample 78518
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Copyright 2017, Emanuel Rabina (http://www.ultraq.net.nz/)\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 o...
javascript
edit
0
1
apache-2.0
6d00964484d930138c1da1159fcf45b3b4a5628a
ultraq/thymeleaf-js,ultraq/thymeleaf-js
test/thymeleaf.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport assert from 'power-assert';\nimport test from '../../helper/test';\nimport fontSize, {PX, PT} from '../../../lib/utility/css/font-size';\n\ndescribe('fontSize', () => {\n it('returns the font size of an element in pixels', async...
javascript
edit
0
1
mit
7f811495c19935e80027d0314851ae9ade681a30
kasperisager/allie
test/utility/css/font-size.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar socket = io();\nvar nameInfo = {\"name\":\"\", \"accepted\":\"\"};\n\n// Get the name from the server and put on the form for\n// the moderator to approve\nsocket.on('moderate name', function(msg){\n $('#currentName').text(msg);\n\...
javascript
edit
0
1
mit
6d41a0a4afd1c95c12aa454e6608bc7d9f371c57
2016-ksu-cis-open-house/tree-display,2016-ksu-cis-open-house/tree-display,2016-ksu-cis-open-house/tree-display
static/js/moderator.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function(angular, window) {\n\n 'use strict';\n\n angular\n .module('mwl.bluebird', [])\n .constant('Bluebird', window.P.noConflict())\n .config(function($provide, Bluebird) {\n\n //Make bluebird API compatible with ang...
javascript
edit
0
3
mit
af7b6e15e9b52e0297998c03bd4e873966a5eb93
lucastschmidt/angular-bluebird-promises,lucastschmidt/angular-bluebird-promises,mattlewis92/angular-bluebird-promises,mattlewis92/angular-bluebird-promises
dist/angular-bluebird-promises.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\n// MODULES //\n\nvar merge = require( '@stdlib/utils/merge' );\nvar unique = require( './unique.js' );\n\n\n// MAIN //\n\n/**\n* Combines two lunr indices into a single one.\n*\n* @private\n* @param {Object} a - first l...
javascript
edit
0
1
apache-2.0
e9c774594e5db8503b83db4b8d307d81c00aba95
stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib
tools/search/create/lib/combine.js
rejected_duplicate
Near-duplicate of sample 80282
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n 'use strict';\n\n angular\n .module('app.core')\n .run(function($rootScope, $state) {\n return $rootScope.$on('$stateChangeStart', function() {\n return $rootScope.$state = ...
javascript
edit
0
1
mit
f48143b3d7479643532355e625b63ddbfe28cffe
MAustinMMDP/web-brownie,MAustinMMDP/web-brownie
src/client/app/core/core.routes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/*\n * Wegas\n * http://wegas.albasim.ch\n *\n * Copyright (c) 2013-2018 School of Business and Engineering Vaud, Comem, MEI\n * Licensed under the MIT License\n */\n/**\n * @fileOverview\n * @author Cyril Junod <cyril.junod at gmail.c...
javascript
edit
0
1
mit
b568a12a6414b92ae3ccc615a9ceb04d50542285
Heigvd/Wegas,Heigvd/Wegas,Heigvd/Wegas,Heigvd/Wegas,Heigvd/Wegas
wegas-app/src/main/webapp/wegas-app/js/widget/wegas-box.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst globalSetup = require(\"../global-setup\");\nconst app = globalSetup.app;\nconst chai = require(\"chai\");\nconst expect = chai.expect;\n\ndescribe(\"Newsfeed module\", function () {\n\n\tthis.timeout(20000);\n\n\tbeforeEach(funct...
javascript
edit
0
1
mit
2a94ee55ccb8fa06f4d07c2a67307b5ed0a659a3
heyheyhexi/MagicMirror,mbalfour/MagicMirror,n8many/MagicMirror,MichMich/MagicMirror,Leniox/MagicMirror,morozgrafix/MagicMirror,thobach/MagicMirror,Devan0369/AI-Project,thobach/MagicMirror,marc-86/MagicMirror,morozgrafix/MagicMirror,morozgrafix/MagicMirror,thobach/MagicMirror,vyazadji/MagicMirror,thobach/MagicMirror,Mic...
tests/e2e/modules/newsfeed_spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n intl: {\n defaultMessage: 'Intl',\n id: 'app.links.intl'\n },\n fields: {\n defaultMessage: 'redux-fields',\n id: 'app.links.fields'\n },\...
javascript
edit
0
0
mit
2b28a6e84c7c6786744bb47b8a5e1e300eb6f9bb
christophediprima/este,skallet/este,abelaska/este,skallet/este,abelaska/este,TheoMer/Gyms-Of-The-World,TheoMer/Gyms-Of-The-World,robinpokorny/este,TheoMer/Gyms-Of-The-World,amrsekilly/updatedEste,steida/este,amrsekilly/updatedEste,este/este,este/este,christophediprima/este,sikhote/davidsinclair,cjk/smart-home-app,este/...
src/common/app/linksMessages.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport PropTypes from 'prop-types'\nimport TableRow from './TableRow/index.js'\nimport Button from '../../Components/Button/index.js'\n\nexport default class Table extends Component {\n\n stati...
javascript
edit
0
2
mit
a26c93b50b3a50e3245420a92ca465111244fcb6
severnsc/brewing-app,severnsc/brewing-app
src/Components/Table/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* @flow */\n/* eslint-disable no-param-reassign, no-console */\n\nimport mongoose, { Schema } from 'mongoose';\nimport MongodbMemoryServer from 'mongodb-memory-server';\n\nmongoose.Promise = Promise;\n\njasmine.DEFAULT_TIMEOUT_INTERVAL...
javascript
edit
0
2
mit
35a9a703643c01d7eda90662c0ca094b0e33345e
nodkz/graphql-compose-mongoose
src/__mocks__/mongooseCommon.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst env = require('yargs').argv.mode;\nconst webpack = require('webpack');\n\nconst { UglifyJsPlugin } = webpack.optimize;\n\nconst libraryName = 'wix';\n\nconst plugins = [];\nlet outputFile;\n\n...
javascript
edit
0
0
mit
80941ffcc8a7fe5c8995bf4122f3908a38ca5945
eliagrady/wix-sdk
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n entry: {\n host: [\"babel-polyfill\", \"./host/index.js\"],\n participant: [\"babel-polyfill\", \"./participant/index.js\"],\n },\n output: {\n path: \"./\",\n filename: \"[name].js\"\n },\n module:...
javascript
edit
0
0
mit
f335d377436ff1fe48c7291117ae70b03c707deb
xeejp/prisoners-dilemma,xeejp/xee_secretary_problem
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar path = require('path')\nvar pkg = require('./package.json')\nvar UglifyjsPlugin = require('uglifyjs-webpack-plugin')\nvar BannerPlugin = require('webpack').BannerPlugin\n\nmodule.exports = {\n entry: {\n 'extenso': './index.js',...
javascript
edit
0
0
mit
7df6084518076e5d7e0ed6d58a740488fc55c5fb
theuves/extenso
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function () {\n var cogClass = function () {};\n cogClass.prototype.exec = function (params, request, response) {\n var oops = this.utils.apiError;\n var sys = this.sys;\n var eventID = params.eventid;\n\n ...
javascript
edit
0
2
unlicense
ef7590673b4acd89cc24ee43551bcf1c294cf6f3
fbennett/newswriter
api/admin/top/readevent/matchExec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst chai = require('chai')\nconst assert = chai.assert;\nconst sinon = require('sinon/pkg/sinon');\nconst Ball = require(\"../lib/ball\")\n\ndescribe(\"Ball\", function(){\n context(\"with assigned attributes\", function(){\n var ...
javascript
edit
null
null
mit
1b1304d2ba5557648ed7587a66365ac29e65eb12
brennanholtzclaw/game_time,brennanholtzclaw/game_time
test/ball_test.js
rejected_syntax
Syntax error detected by tree-sitter
false
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Inferno from 'inferno'\nimport Component from 'inferno-component'\nimport styled from 'styled-components'\nimport { bind, debounce } from 'decko'\n\nimport { RaisedButton } from '@slup/buttons'\nimport { Slider } from '@slup/slid...
javascript
edit
0
1
mit
81325bc686351ec5df5e38bf3ad04dfc71f16712
slupjs/slup,slupjs/slup
src/pages/home.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Vue from 'vue';\nimport Girder, { RestClient } from '@girder/components/src';\n\n// Install the Vue plugin that lets us use the components\nVue.use(Girder);\n\nconst girderRest = new RestClient({\n apiRoot: process.env.VUE_APP_I...
javascript
edit
0
1
apache-2.0
a63814984cf77d77e46a2c9566d7b5a3a8d69d38
ImageMarkup/discourse_sso,ImageMarkup/discourse_sso,ImageMarkup/discourse_sso
isic-discourse-sso-gui/src/plugins/girder.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar expect = require('chai').expect;\nvar angular = require('angular');\n\nvar helloWorldModule = require('./helloWorld.controller');\nvar calculatorModule = require('../services/calculator/calculator.service');\n\ndesc...
javascript
edit
0
1
mit
c1c6fb9f56d2f70425a5fca93ddd0b7e2826d2c7
SonofNun15/explore-angular,SonofNun15/explore-angular
js/helloWorld/helloWorld.controller.tests.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar oembed = module.exports = {\n name: 'oembed'\n};\n\n// oEmbed endpoint with JSONP support.\noembed.embed = function(req, res) {\n var url = req.query.url;\n\n if (!url || !url.match(/https?:\\/\\/jsbin.com/)) ret...
javascript
edit
0
7
mit
b1c1417dd41841385882bdf7aa23a8ca292868a0
IvanSanchez/jsbin,mlucool/jsbin,jasonsanjose/jsbin-app,thsunmy/jsbin,eggheadio/jsbin,dedalik/jsbin,jwdallas/jsbin,ctide/jsbin,knpwrs/jsbin,martinvd/jsbin,Freeformers/jsbin,dedalik/jsbin,eggheadio/jsbin,filamentgroup/jsbin,pandoraui/jsbin,yize/jsbin,saikota/jsbin,svacha/jsbin,johnmichel/jsbin,juliankrispel/jsbin,carolin...
lib/handlers/oembed.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nconst {\n get,\n inject: { service },\n Route,\n RSVP\n } = Ember;\n\nexport default Route.extend({\n projectTaskBoard: service(),\n\n model() {\n let project = this.modelFor('project');\n let m...
javascript
edit
0
1
mit
caa57fece04ee48a29697495a2a5441c50104a91
code-corps/code-corps-ember,jderr-mx/code-corps-ember,jderr-mx/code-corps-ember,code-corps/code-corps-ember
app/routes/project/tasks/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\ndefine([\n\t'jquery'\n], function (\n\t\t$\n\t\t) {\n\t$.fn.activateYoutube = function(trigger) {\n\t\tif (trigger === undefined) {\n\t\t\ttrigger = true;\n\t\t}\n\t\t$('.youtube', this).empty().each(function(index, element) {\n\t\t\t$y...
javascript
edit
0
2
bsd-2-clause
fcf63325d07df3a73e92d74c09adf7327806329e
ntucker/django-aloha-edit,ntucker/django-aloha-edit,ntucker/django-aloha-edit
aloha/static/js/jquery-youtube.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nHummingbird.QuickUpdateComponent = Ember.Component.extend({\n loading: true,\n page: 1,\n libraryEntries: [],\n canGoBack: Em.computed.gt('page', 1),\n canGoForward: true,\n\n fetchPage: function(page) {\n var store = this.get(...
javascript
edit
0
2
apache-2.0
90298cc0c607c24d040facd6a3d7904d263f3c4a
synthtech/hummingbird,astraldragon/hummingbird,erengy/hummingbird,Snitzle/hummingbird,wlads/hummingbird,Snitzle/hummingbird,qgustavor/hummingbird,sidaga/hummingbird,vevix/hummingbird,xhocquet/hummingbird,paladique/hummingbird,MiLk/hummingbird,NuckChorris/hummingbird,xhocquet/hummingbird,MiLk/hummingbird,jcoady9/humming...
app/assets/javascripts/components/quick-update.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst SUPPORTS_STACK_TRACE = Boolean(new Error().stack);\n\nexport function backtrackingMessageFor(key, obj, { renderTree } = {}) {\n // Start off with standard backtracking assertion\n let regex = [`You attempted to update \\`${key}\...
javascript
edit
0
2
mit
b0528c648163fcbea21ff4f7922656344caf6e9a
GavinJoyce/ember.js,asakusuma/ember.js,elwayman02/ember.js,sandstrom/ember.js,asakusuma/ember.js,emberjs/ember.js,givanse/ember.js,knownasilya/ember.js,GavinJoyce/ember.js,tildeio/ember.js,sly7-7/ember.js,sly7-7/ember.js,mfeckie/ember.js,GavinJoyce/ember.js,givanse/ember.js,stefanpenner/ember.js,tildeio/ember.js,mfecki...
packages/@ember/-internals/glimmer/tests/utils/backtracking-rerender.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// https://dev.twitter.com/web/javascript/loading\nwindow.twttr = (function (d, s, id) {\n var js, fjs = d.getElementsByTagName(s)[0],\n t = window.twttr || {};\n if (d.getElementById(id)) return t;\n js = d.createElement(s);\n ...
javascript
edit
0
3
mit
3df6a81ad51db42032a4b22099d7ca32d3f1298b
DeveloperDavo/learnitmyway,DeveloperDavo/learnitmyway
static/dist/js/social-buttons.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require(\"webpack\");\nvar nodeExternals = require(\"webpack-node-externals\");\n\nmodule.exports = {\n target: \"node\",\n externals: [nodeExternals()],\n entry: './test/start.js',\n module: {\n preLoaders: [\n ...
javascript
edit
0
0
mit
b8b434e2b8fee47cb1bd61d5cfc22ffd28b89e74
dossier/html-highlighter,dossier/html-highlighter,dossier/html-highlighter
webpack.config-test.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport $ from 'jquery';\nimport _ from 'underscore';\n\nimport AlertDialogTemplate from './alertDialog.pug';\n\n/**\n * Miscellaneous utility functions.\n */\n\n/**\n * Show an alert dialog with a single button.\n * @param [text] The te...
javascript
edit
0
2
apache-2.0
1e24ff34d8dea8c691fd3860260ffecc5f61f558
ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive,ImageMarkup/isic-archive
web_external/common/utilities.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nvar express = require('express');\n\nmodule.exports = function () {\n\n var router = express.Router();\n\n return router;\n};\n\n```\n\nApply this change: Add routes to the router middleware." }, { "role": "as...
javascript
edit
0
1
mit
e02a2aa56b3e6de86e7329375d9fcb71869e379b
andela-ioraelosi/hackshub-file-service
app/routes/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\n\nconst production = process.env.NODE_ENV === 'production';\nconst oneDay = 24 * 60 * 60;\n\nfunction get(name, fallback, options = {}) {\n if (process.env[name]) {\n return process.env[name];\n }\n if (fa...
javascript
edit
0
5
mit
3c46e24c7a305873b3604066f32a2c60a00078a0
noms-digital-studio/licences,noms-digital-studio/licences,noms-digital-studio/licences
server/config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\nvar Answer = require(config.root.MODEL_ROOT).answer;\nvar scoreMod = require(config.root.MODULE_ROOT).score;\n\nfunction saveAnswer(ua, answers) {\n\tvar answer = new An...
javascript
edit
0
2
mit
80f708bc1ec1f56966464c1730050332226df816
WooJaeWoo/Project0,WooJaeWoo/Project0
webapp/routes/score.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n/* ************************************************************************\n\n ${Name}\n\n Copyright:\n 2010 Deutsche Telekom AG, Germany, http://telekom.com\n\n *****************************************************************...
javascript
edit
null
null
mit
ab2395c0cb70a4b9e86aa71e6a541a72ebf52bbf
unify/unify,unify/unify,unify/unify,unify/unify,unify/unify,unify/unify
unify/application/skeleton/unify/source/class/custom/Application.tmpl.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 setPrototypeOf = require('es5-ext/object/set-prototype-of')\n , contains = require('es5-ext/string/#/contains')\n , startsWith = require('es5-ext/string/#/starts-with')\n , d = require('d')...
javascript
edit
0
5
mit
e54d4f78eda2347d438762c8c4969c6a404cf594
medikoo/es6-iterator
array.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst fetch = require('isomorphic-fetch');\n\nmodule.exports = (packageNames, startDate, endDate) => {\n const packageNamesParam = packageNames.join(',');\n const url = `/api/downloads/range/${startDate}:${endDate}/${packageNamesParam...
javascript
edit
0
2
mit
bc208b94f6fee82ab1d5c794bee95e8dfc4413d3
cheapsteak/npmcharts.com,cheapsteak/npmcharts.com
packages/utils/stats/fetchPackagesStats.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst flatten = require('lodash.flatten');\n\n/**\n * Filter dependencies by name pattern\n * @param {String} dependency Name of the dependency\n * @return {Boolean} If dependency is a rnpm plug...
javascript
edit
0
3
mit
fd8be78c7f9b531182a1cbeca3a0af433720d718
rnpm/rnpm
src/getActions.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n$(function() {\n var fileText;\n\n var maxFileSizeInBytes = 100000; // 100kB\n $('#inputFile').change(function () {\n fileText = null;\n $('#inputFileResult').hide();\n\n var file = this.files[0];\n\n ...
javascript
edit
0
4
mit
366fd0d352684e96b2fb04520206933ab75fea42
APMD/PMD,APMD/PMD,jchmura/PMD,APMD/PMD,jchmura/PMD,APMD/PMD,jchmura/PMD,jchmura/PMD
PMD/static/js/file-upload-helper.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport { task } from 'ember-concurrency';\nimport { tracked } from '@glimmer/tracking';\nimport BaseIsolatedLayoutComponent from '../base-isolated-layout';\n\nexport default class PhotoCardIsolatedComponent extends BaseIsolatedLayoutCom...
javascript
edit
0
2
mit
0268e7bd62a74b19bd05494adb5832d76519621b
cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack
packages/cardhost/app/components/scaffolding/photo-card/isolated-layout.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar get = Ember.get;\n\nDS.Serializer = Ember.Object.extend({\n toJSON: function(record, options) {\n options = options || {};\n\n var hash = {};\n\n this.addAttributes(hash, record);\n\n if (options.includeId) {\n thi...
javascript
edit
0
3
mit
ffdfad7af6a8728e11c106c040c66427cc9d4653
trisrael/em-data,Kuzirashi/data,bcardarella/data,faizaanshamsi/data,webPapaya/data,rtablada/data,seanpdoyle/data,Kuzirashi/data,H1D/data,ryanpatrickcook/data,nickiaconis/data,martndemus/data,whatthewhat/data,Eric-Guo/data,PrecisionNutrition/data,tarzan/data,fpauser/data,k-fish/data,XrXr/data,basho/ember-data,swarmbox/d...
packages/ember-data/lib/system/serializer.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\norion.addEntity('activities', _.extend(_.clone(commonSchema), {\n location: {\n type: Object,\n label: 'Location',\n optional: true,\n autoform: {\n type: 'map',\n afFieldInput: {\n searchBox: true\n }...
javascript
edit
0
0
apache-2.0
e4ea2deaa5e1fd122b941395313bb3554ed690b6
GeoMakers/geomakers.org,GeoMakers/geomakers.org
lib/orion/entities/activities.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst UrlQueryParamTypes = {\n number: 'number',\n string: 'string',\n object: 'object',\n array: 'array',\n json: 'json',\n date: 'date',\n boolean: 'boolean',\n custom: 'custom',\n};\n\nexport default UrlQueryParamTypes;\n\n``...
javascript
edit
0
0
mit
4e86415c6510433d7161971c932dd35b637d93ca
pbeshai/react-url-query
src/UrlQueryParamTypes.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n extends: ['usecases/usecase/lib/common',\n 'usecases/usecase/lib/es2015', 'usecases/usecase/lib/es2017'],\n parserOptions: {\n ecmaVersion: 2017,\n sourceType: 'script'\n },\n env: {...
javascript
edit
0
0
mit
31696cc9c1d9fe887802a1b492f1b8461043c224
madarche/eslint-config-usecases
usecase/nodejs.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use babel'\n/** @jsx etch.dom */\n\nimport etch from 'etch'\nimport stateless from 'etch-stateless'\n\nconst IndicatorAnchor = stateless(etch, ({wrapped}) => {\n let light = ''\n if (wrapped) {\n light = 'lit'\n } else {\n lig...
javascript
edit
0
2
mit
aae15b2253877e8ebaca674243bbf4a9cc855a8f
lee-dohm/soft-wrap-indicator
lib/soft-wrap-status-component.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar ExtractText = require('extract-text-webpack-plugin');\nvar LessClean = require('less-plugin-clean-css');\nvar HtmlFile = require('html-webpack-plugin');\nvar webpack = require('webpack');\n\nvar config = {\n cache: true,\n entry: ...
javascript
edit
0
0
mit
2b22dd2fe481e0d839251ef191475fd47fc85196
dmitrykuzmenkov/mob-app-ui,dmitrykuzmenkov/mob-app-ui
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Acronyms from './acronym';\n\ndescribe('Acronyms are produced from', ()=>{\n it('title cased phrases', () => {\n expect(Acronyms.parse('Portable Network Graphics')).toEqual('PNG');\n });\n\n it('other title cased phrases', ...
javascript
edit
0
1
mit
53bd6196cb7c39c918b527ff349b53a590b7192e
exercism/xecmascript,tejasbubane/xecmascript,tejasbubane/xecmascript,arthurchipdean/xecmascript,MattH-be/ecmascript,exercism/xecmascript,arthurchipdean/xecmascript,MattH-be/ecmascript
exercises/acronym/acronym.spec.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst nodeExternals = require('webpack-node-externals');\nconst NodemonPlugin = require('nodemon-webpack-plugin');\n\nmodule.exports = {\n\tmode: process.env.NODE_ENV || 'production',\n\ttarget: 'node',\n\tnode: {\n\t\t__filename: true,...
javascript
edit
0
0
mit
d07b4d4d295e3b8b749213a314a3302df086f834
bodhisattva082915/chimera,bodhisattva082915/chimera
webpack.config.js
rejected_duplicate
Near-duplicate of sample 74777
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar webpack = require('webpack');\nvar development = process.env.NODE_ENV !== \"production\";\n\nvar PATHS = {\n BUILD: __dirname + '/dist',\n APP: __dirname + '/src'\n}\n\nmodule.exports = {\n context: __dirname,\n devtool: develop...
javascript
edit
0
0
bsd-3-clause
5ee8a08d0e6d411ae6a88935555486ccad959ff7
minimalchat/mnml-client,minimalchat/mnml-client
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nimport Vue from \"vue\";\nimport Vuex from \"vuex\";\n\nVue.use(Vuex);\n\nconst store = new Vuex.Store({\n state: {\n messages: [],\n playerName: \"\",\n inputText: \"\"\n },\n\n getters: {\n playerName: (state) => state....
javascript
edit
0
1
mit
794f4a7dd02aa68760d25ba382d246baaf462e2c
Trymunx/Dragon-Slayer,Trymunx/Dragon-Slayer
src/vuex/store.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// --------------------\n// Sequelize extra\n// --------------------\n\n// modules\nvar Sequelize = require('sequelize'),\n\tsequelizeDefiner = require('sequelize-definer'),\n\tsequelizeHierarchy = require('sequelize-hierarchy'),\n\tseq...
javascript
edit
0
0
mit
066851995714c6a59da1e330c4ff3452fca81af2
overlookmotel/sequelize-extra
lib/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n(function() {\n \"use strict\";\n GOVUK.analyticsPlugins = GOVUK.analyticsPlugins || {};\n GOVUK.analyticsPlugins.externalLinkTracker = function () {\n\n var currentHost = GOVUK.analyticsPlugins.externalLinkTracker.getHostname(),\...
javascript
edit
0
2
mit
48ddb27c81134e93aaef436580776454871ebc6c
alphagov/govuk_frontend_toolkit,TFOH/govuk_frontend_toolkit,alphagov/govuk_frontend_toolkit,TFOH/govuk_frontend_toolkit,quis/govuk_frontend_toolkit,quis/govuk_frontend_toolkit,alphagov/govuk_frontend_toolkit,quis/govuk_frontend_toolkit,quis/govuk_frontend_toolkit,TFOH/govuk_frontend_toolkit,TFOH/govuk_frontend_toolkit,...
javascripts/govuk/analytics/external-link-tracker.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nconst CleanWebpackPlugin = require('clean-webpack-plugin');\nconst path = require('path');\n\nmodule.exports = {\n\tmode: 'production',\n\tentry: {\n\t\tmain: './src/js/main.js',\n\t\tportfolio: './src/js/portfolio.js'\n\t},\n\tplugins:...
javascript
edit
0
0
mit
cd821db9abd6e084104b9c83fb9105b897741c1a
stevecochrane/stevecochrane.com,stevecochrane/stevecochrane.com
webpack.config.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n// @flow\nimport React from 'react';\nimport { compose } from 'redux';\nimport prepare from 'app/utils/prepare';\nimport { fetchRandomQuote } from 'app/actions/QuoteActions';\nimport { connect } from 'react-redux';\nimport RandomQuote f...
javascript
edit
0
2
mit
1e4c84df3c72bb603bd5bf5140356900b73449e2
webkom/lego-webapp,webkom/lego-webapp,webkom/lego-webapp
app/components/RandomQuote/index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\n'use strict';\nconst execBuffer = require('exec-buffer');\nconst gifsicle = require('gifsicle');\nconst isGif = require('is-gif');\n\nmodule.exports = opts => buf => {\n\topts = Object.assign({}, opts);\n\n\tif (!Buffer.isBuffer(buf)) {...
javascript
edit
0
7
mit
d79b9c8a02f7a241c55705cfe2ce8d94dd9405e6
imagemin/imagemin-gifsicle
index.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nmodule.exports = {\n isOneToOneRelation: function (relation) {\n return relation instanceof relation.ownerModelClass.OneToOneRelation;\n },\n\n throwError: function (message) {\n var error = new Error(message);\n error.statu...
javascript
edit
0
1
mit
38b7eea3ec92d01ad10906c7894320d30b1b4755
Vincit/objection-find,Vincit/objection-find
lib/utils.js
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```javascript\nvar Obstruct = require('obstruct');\nvar minivents = require('minivents');\nvar createGetter = require('./lib/createGet');\nvar createSetter = require('./lib/createSet');\nvar merge = require('./lib/merge');\nvar noop = function () {};\...
javascript
edit
0
4
mit
5d53a71a73777085e615aeb7588973b54968f234
allouis/model
index.js
accepted
null
true