messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * @copyright Copyright (c) 2012-2015 2amigOS! Consulting Group LLC\n * @link http://2amigos.us\n * @license http://www.opensource.org/licenses/bsd-license.php New BSD License\n */\nif (typeof dosamigos == \"undefined\" || !dosamig... | javascript | edit | 0 | 3 | bsd-3-clause | 6d5ba4db94939c5f29451df363c9f6afd9740779 | yangtoude/yii2-ckeditor-widget,richardfan1126/yii2-ckeditor-widget,alexdin/yii2-ckeditor-widget,richardfan1126/yii2-ckeditor-widget,richardfan1126/yii2-ckeditor-widget,yangtoude/yii2-ckeditor-widget,alexdin/yii2-ckeditor-widget,yangtoude/yii2-ckeditor-widget | src/assets/dosamigos-ckeditor.widget.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet chai = require('chai')\nlet chaiHttp = require('chai-http')\nlet server = require('../src/main.js')\nimport {expect} from 'chai'\nchai.use(chaiHttp)\n\ndescribe('server', () => {\n before( () => {\n server.listen();\n })\n\n a... | javascript | edit | 0 | 1 | mit | 28948b82be7d6da510d0afce5aa8d839df0ab1b0 | GLNRO/react-redux-threejs,GLNRO/react-redux-threejs | test/main_spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport * as Backbone from 'backbone';\nimport Items from '../collections/items';\nimport SearchBoxView from '../views/searchBox-view';\nimport SearchResultsView from '../views/searchResults-view';\nimport AppView from '../views/app-view... | javascript | edit | 0 | 1 | mit | 68eceecffb4ea457fe92d623f5722fd25c09e718 | trevormunoz/katherine-anne,trevormunoz/katherine-anne,trevormunoz/katherine-anne | src/js/routers/app-router.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction MatchHighlighter() {\n 'use strict';\n\n const mergeRanges = function(indexes) {\n return indexes.reduce(function(obj, index, pos) {\n const prevIndex = indexes[pos - 1] || 0;\n const currentI... | javascript | edit | 0 | 8 | mit | 44200ed7deeb5ef12932b2f82f791643e16939a7 | YurySolovyov/fuzzymark,YurySolovyov/fuzzymark,YuriSolovyov/fuzzymark,YuriSolovyov/fuzzymark | match-highlighter.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Imports\nimport UserRoles from '../../core/auth/constants/userRoles';\nimport WorkshopController from './workshop.controller';\nimport WorkshopHeaderController from './workshop-header.controller';\nimport { workshop } from './worksho... | javascript | edit | 0 | 1 | mit | b4b22938c6feba84188859e522f1b44c274243db | ProtaconSolutions/Poc24h-January2017-FrontEnd,ProtaconSolutions/Poc24h-January2017-FrontEnd | src/modules/workshop/workshop.routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Add functionality to VideoList component"
},
{
"role": "assistant",
"content": "import React from 'react';\nimport VideoListItem from './video_list_item';\n\nconst VideoList = (props) => {\n const videoItems = props.videos.m... | javascript | new_file | 0 | 1 | mit | d213fa0c22440904b526a1793464dc3e5d69b980 | izabelka/redux-simple-starter,izabelka/redux-simple-starter | src/components/video_list.js | rejected_duplicate | Near-duplicate of sample 107559 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by farid on 8/16/2017.\n */\nimport React, {Component} from \"react\";\nimport Post from \"./Post\";\nimport PropTypes from 'prop-types';\n\n\nclass CategoryBody extends Component {\n\n render() {\n return (\n ... | javascript | edit | 0 | 1 | mit | f7dfb99616f47561d83f9609c8a32fd6275a053c | faridsaud/udacity-readable-project,faridsaud/udacity-readable-project | src/components/CategoryBody.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar UserList = React.createClass({\n componentDidMount: function() {\n socket.on('join', this._join);\n socket.on('part', this._part);\n },\n render: function() {\n return (\n <ul id='online-list... | javascript | edit | 0 | 2 | mit | 7afb5342fb92ed902b962a3324f731833a1cdb00 | mbalamat/ting,odyvarv/ting-1,gtklocker/ting,gtklocker/ting,mbalamat/ting,sirodoht/ting,dionyziz/ting,VitSalis/ting,gtklocker/ting,gtklocker/ting,odyvarv/ting-1,sirodoht/ting,sirodoht/ting,dionyziz/ting,dionyziz/ting,odyvarv/ting-1,mbalamat/ting,mbalamat/ting,dionyziz/ting,odyvarv/ting-1,VitSalis/ting,VitSalis/ting,VitS... | client/userlist.js | rejected_duplicate | Near-duplicate of sample 105821 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright 2017, Google, Inc.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http:... | javascript | edit | 0 | 0 | apache-2.0 | f26e7eb203948d7fff0d0c44a34a675d0631adcf | JustinBeckwith/nodejs-docs-samples,thesandlord/nodejs-docs-samples,thesandlord/nodejs-docs-samples,JustinBeckwith/nodejs-docs-samples,GoogleCloudPlatform/nodejs-docs-samples,GoogleCloudPlatform/nodejs-docs-samples,GoogleCloudPlatform/nodejs-docs-samples,JustinBeckwith/nodejs-docs-samples,GoogleCloudPlatform/nodejs-docs... | trace/snippets.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable no-console */\nimport { CONFIG } from '../constants';\nimport { Socket } from 'phoenix';\nimport { startPlugin } from '..';\nimport listenAuth from './listenAuth';\nimport handleNotifications from './handleNotification... | javascript | edit | 0 | 2 | mit | a783fbcd8bcff07672e64ada1f75c7290c9a765a | rainforestapp/tester-chrome-extension,rainforestapp/tester-chrome-extension,rainforestapp/tester-chrome-extension | src/chrome/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar istanbul = require('browserify-istanbul');\nvar isparta = require('isparta');\n\nmodule.exports = function (config) {\n 'use strict';\n\n config.set({\n\n browsers: [\n 'Chrome',\n 'Firefox',\n ... | javascript | edit | 0 | 2 | mit | 51cebb77df8d4eec12da134b765d5fe046eefeda | ekazakov/dumpjs | karma.conf.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// External\nconst mem = require('mem');\n\n// Ours\nconst { merge } = require('../utils/structures');\nconst { getProjectConfig } = require('./project');\n\nconst PROJECT_TYPES_CONFIG = {\n preact: {\n plugins: [\n [\n ... | javascript | edit | 0 | 4 | mit | 752c2c39790cf1ffb1e97850991d2f13c25f92b8 | abcnews/aunty,abcnews/aunty,abcnews/aunty | src/config/babel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndescribe('Satellite game', function () {\n beforeEach(function () {\n\n });\n\n it('should exists', function () {\n expect(s).to.be.an('object');\n expect(s).to.have.property('config');\n expect(s).to.have.property('in... | javascript | edit | 0 | 1 | bsd-2-clause | 1a07a7c7900cc14582fdaf41a96933d221a439e0 | satellite-game/Satellite,satellite-game/Satellite,satellite-game/Satellite | tests/client/unit/s.Spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default function userInterceptor($localStorage){\n function request(config){\n if(config.headers.Authorization){\n return config;\n }\n if($localStorage.token){\n config.headers.Authorization = 'bearer ' + $lo... | javascript | edit | 0 | 3 | mit | 4c141ac898f6a7bad42db55445bb5fecf99639bd | tamaracha/wbt-framework,tamaracha/wbt-framework,tamaracha/wbt-framework | src/user/user-interceptor.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport walkTree from '../../../src/util/walk-tree';\n\ndescribe('utils/walk-tree', function () {\n it('should walk parents before walking descendants', function () {\n var order = [];\n var one = document.createElement('one');\n\... | javascript | edit | 0 | 1 | mit | 2525fe4097ff124239ed56956209d4d0ffefac27 | skatejs/skatejs,antitoxic/skatejs,chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs | test/unit/util/walk-tree.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react';\nimport FormControl from 'react-bootstrap/lib/FormControl';\n\nclass Filter extends Component {\n\n constructor(props){\n super(props);\n this.state = {filterValue : ... | javascript | edit | 0 | 2 | mit | f75613d01d047cfbc5b8cc89154ad6eee64d6155 | eddyson-de/react-grid,eddyson-de/react-grid | lib/Filter.js | rejected_duplicate | Near-duplicate of sample 80596 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar webpack = require('webpack'),\n path = require('path'),\n CleanWebpackPlugin = require('clean-webpack-plugin');\n\nvar libraryName = 'webstompobs',\n dist = '/dist';\n\nmodule.exports = {\n entry: __dirname + '/src/index.t... | javascript | edit | 0 | 0 | apache-2.0 | 06e880b204d4b19edb42116d7a7fad85e8889de9 | fpozzobon/webstomp-obs,fpozzobon/webstomp-obs,fpozzobon/webstomp-obs | webpack.common.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$('.project-toggle-featured').on('click', function() {\n const projectId = $(this).data(\"project-id\"),\n featured = $(this).data(\"featured\") === \"True\";\n method = featured ? \"DELETE\" : \"POST\";\n $... | javascript | edit | 0 | 2 | bsd-3-clause | 3f934607b9404a5edca6b6a7f68c934d90c899ce | LibCrowds/libcrowds-bs4-pybossa-theme,LibCrowds/libcrowds-bs4-pybossa-theme | static/js/featured-projects.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Created by Tomasz Gabrysiak @ Infermedica on 08/02/2017.\n */\n\nimport html from '../../templates/helpers';\n\nconst template = (context) => {\n return new Promise((resolve) => {\n resolve(html`\n <h5 class=\"card-titl... | javascript | edit | 0 | 1 | mit | 5841cf3eb49b17d5c851d8e7e2f6b4573b8fe620 | infermedica/js-symptom-checker-example,infermedica/js-symptom-checker-example | src/components/nlp/template.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Used to run webpack dev server to test the demo in local\nconst webpack = require('webpack');\nconst path = require('path');\nconst HtmlWebpackPlugin = require('html-webpack-plugin');\n\nmodule.exports = (env, options) => ({\n mod... | javascript | edit | 0 | 3 | mit | 434fcc48ae69280d9295327ec6592c462ba55ab3 | springload/react-accessible-accordion,springload/react-accessible-accordion,springload/react-accessible-accordion | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\n\nmodule.exports = {\n entry: {\n 'acrolinx-sidebar-integration': './src/acrolinx-sidebar-integration.ts',\n 'tests': './test/index.ts'\n },\n module: {\n rules: [\n {\n test: /\\.t... | javascript | edit | 0 | 0 | apache-2.0 | 458790663023230f78c75753bb2619bd437c1117 | acrolinx/acrolinx-sidebar-demo | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar webpack = require('webpack')\n\nmodule.exports = {\n entry: {\n ui: './lib/ui/main.js',\n vendor: ['react', 'debug']\n },\n output: {\n path: 'dist',\n filename: '[name].js'\n },\n module: {\n loaders: [\n {... | javascript | edit | 0 | 0 | apache-2.0 | 3f2d406174bdeec38478bf1cb342266a0c1c6554 | SignalK/instrumentpanel,SignalK/instrumentpanel | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict'\n\nconst path = require('path')\nconst nconf = require('nconf')\n\nconst defaults = {\n\n port: 5000,\n\n mongo: {\n url: 'mongodb://localhost/link-analyzer',\n },\n\n redis: {\n host: 'localhost',\n port: 6379... | javascript | edit | 0 | 0 | mit | a6854e7f88a94b09a0f15400463af8693249de09 | inspireteam/link-analyzer | lib/config.js | rejected_duplicate | Near-duplicate of sample 89108 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar inherits = require('inherits');\n\nvar self = module.exports = {\n FieldValidationError: FieldValidationError,\n ModelValidationError: ModelValidationError,\n \n messages: {\n \"en-us\": {\n \"generic\": \"Failed to vali... | javascript | edit | 0 | 2 | mit | 68b7afc956bf0dc2802f266183abb08e9930b3e9 | mariocasciaro/minimodel,D4H/minimodel | lib/errors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction Translator(domain) {\n this.domain = domain;\n this.init();\n}\n\nTranslator.prototype = {\n TYPE_ADD: 'add',\n MAPPED_FIELDS: {\n 'id': '_key'\n },\n\n init: function() {\n this.table = this.getTableName(this.domai... | javascript | edit | 0 | 3 | mit | a752e6c1c2eadfaf2a278c7d5ee7f0494b8ed163 | groonga/gcs,groonga/gcs | lib/batch/translator.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { combineReducers } from 'redux'\nimport { RECEIVE_STOP_DATA } from '../actions'\n\nconst cardsReducer = () => {\n return {cards: [{name: 'Fruängen', stopId: '9260', updating: false, error: false},{name: 'Slussen', stopId: '9192... | javascript | edit | 0 | 3 | apache-2.0 | 0178ee1c94589270d78af013cf7ad493de04b637 | Ozzee/sl-departures,Ozzee/sl-departures | src/reducers/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable max-len */\nimport dayjs from \"dayjs\";\n\nexport const GDQ_API_ENDPOINT = \"https://api.gdqstat.us\";\n\nexport const OFFLINE_MODE = true;\n\nconst LIVE_STORAGE_ENDPOINT = \"https://storage.api.gdqstat.us\";\n\n// No... | javascript | edit | 0 | 0 | mit | bf2db67a14522f853bd0e898286947fdb0ed626b | bcongdon/sgdq-stats,bcongdon/gdq-stats,bcongdon/sgdq-stats,bcongdon/gdq-stats,bcongdon/sgdq-stats | src/js/constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n $.jqplot('gets-sets', [$(\"#gets-sets\").data(\"gets\"), $(\"#gets-sets\").data(\"sets\")], {\n title: 'Gets & Sets',\n grid: {\n drawBorder: false,\n shadow: false,\n background: '#... | javascript | edit | 0 | 1 | mit | b9129f100079a6bf96d086b95c8f65fa8f82d8d4 | bryckbost/memdash,bryckbost/memdash | lib/memdash/server/public/charts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {Events} from 'tabris';\nimport {mixin} from './helpers';\n\nconst store = {};\n\nclass Settings {\n\n get serverUrl() {\n return store.serverUrl;\n }\n\n set serverUrl(url) {\n store.serverUrl = url;\n localStorage.s... | javascript | edit | 0 | 2 | mit | ed45aff0857eeac70aef4d339f6f97c805cadc82 | ralfstx/kitchen-radio-app | src/model/settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar winston = require('winston');\nvar expressWinston = require('express-winston');\n\nvar requestLogger = expressWinston.logger({\n transports: [\n new winston.transports.Console({\n json: true,\n coloriz... | javascript | edit | 0 | 0 | mit | 6648b1b1027a7fcc099f88339b312c7a03de1cd8 | rangle/the-clusternator,rafkhan/the-clusternator,bennett000/the-clusternator,alanthai/the-clusternator,rangle/the-clusternator,bennett000/the-clusternator,bennett000/the-clusternator,rangle/the-clusternator,rafkhan/the-clusternator,alanthai/the-clusternator | src/server/loggers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// import { test, getRenderedComponent } from '../spec_helper'\n// import { default as subject } from '../../src/components/buttons/Button'\n\n// test('#render', (assert) => {\n// const button = getRenderedComponent(subject, {classNam... | javascript | edit | 0 | 1 | mit | 24c1af11a108aa8be55337f057b453cb1052cab6 | ello/webapp,ello/webapp,ello/webapp | test/components/Button_test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs');\nvar path = require('path');\nvar exec = require('child_process').exec;\nvar semver = require('semver');\nvar sh = require('execSync');\nvar packageJSONPath = path.join(process.cwd(), 'package.json');\nvar packag... | javascript | edit | 0 | 3 | mit | ae1be9535929473c219b16e7710d6b2fb969859d | tanem/npmrel | lib/npmrel.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Obstacle from './Obstacle'\n\nexport default class extends Obstacle {\n constructor (game, player, x, y, frame, bulletFrame) {\n super(game, player, x, y, frame)\n\n this.weapon = this.game.plugins.add(Phaser.Weapon)\n ... | javascript | edit | 0 | 4 | mit | 7b6ba59b367e90de2137c5300b264578d67e85e1 | mikkpr/LD38,mikkpr/LD38 | src/sprites/Turret.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { expect } from 'chai';\nimport { mount } from 'enzyme';\nimport React from 'react';\nimport Post from '../../src/js/components/Post';\n\ndescribe('<Post/>', () => {\n const post = {\n id: 0,\n title: 'Test Post',\n con... | javascript | edit | 0 | 1 | mit | e30668139c173653ff962d393311f36cb64ab08f | slavapavlutin/pavlutin-node,slavapavlutin/pavlutin-node | test/components/Post.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst genDefaultConfig = require('@storybook/vue/dist/server/config/defaults/webpack.config.js')\nconst merge = require('webpack-merge')\n\nmodule.exports = (baseConfig, env) => {\n const storybookConfig = genDefaultConfig(baseConfig, ... | javascript | edit | 0 | 1 | mit | c08b8593ffbd3762083af29ea452a09ba5180832 | yunity/foodsaving-frontend,yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/karrot-frontend,yunity/foodsaving-frontend,yunity/foodsaving-frontend,yunity/karrot-frontend,yunity/karrot-frontend | .storybook/webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\n\n/** Load modules. */\nvar fs = require('fs'),\n path = require('path');\n\n/** Resolve program params. */\nvar args = process.argv.slice(process.argv[0] === process.execPath ? 2 : 0),\n filePa... | javascript | edit | 0 | 1 | mit | 4f1c3887f77927ac93daa825357b4bf94914d9f1 | steelsojka/lodash,msmorgan/lodash,steelsojka/lodash,beaugunderson/lodash,boneskull/lodash,msmorgan/lodash,boneskull/lodash,rlugojr/lodash,beaugunderson/lodash,rlugojr/lodash | test/remove.js | rejected_duplicate | Near-duplicate of sample 88154 | true |
[
{
"role": "user",
"content": "Write javascript code for the following: Test that getOptions returns default options when none are provided"
},
{
"role": "assistant",
"content": "QUnit.test( \"getOptions default\", function( assert ) {\n\n var options = $.fn.inputFileText.getOptions();\n\n ... | javascript | new_file | 0 | 1 | mit | 2b0dd27492594ee525eab38f6f4428d596d31207 | datchung/jquery.inputFileText,datchung/jquery.inputFileText | tests/tests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// import axios from 'axios';\n\nexport const FETCH_SEARCH_RESULTS = 'fetch_search_results';\n\n// const ROOT_URL = 'http://herokuapp.com/';\n\nexport function fetchSearchResults(term, location) {\n // const request = axios.get(`${ROOT... | javascript | edit | 0 | 1 | mit | fbb7654967bb83d7c941e9eef6a87162fbff676b | EarlyRavens/ReactJSFrontEnd,EarlyRavens/ReactJSFrontEnd | src/actions/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright © 2017 Highpine. All rights reserved.\n *\n * @author Max Gopey <<EMAIL>>\n * @copyright 2017 Highpine\n * @license https://opensource.org/licenses/MIT MIT License\n */\n\nclass ApiError {\n constructor(messag... | javascript | edit | 0 | 1 | mit | a8b64f852c6e223b21a4052fa9af885e79f6692e | highpine/highpine,highpine/highpine,highpine/highpine | app/server/shared/api-server/api-error.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*! CSS rel=preload polyfill. Depends on loadCSS function. [c]2016 @scottjehl, Filament Group, Inc. Licensed MIT */\n(function( w ){\n // rel=preload support test\n if( !w.loadCSS ){\n return;\n }\n var rp = loadCSS.relpreload =... | javascript | edit | 0 | 5 | mit | f620f2919897b40b9f960a3e147c54be0d0d6549 | filamentgroup/loadCSS,filamentgroup/loadCSS | src/cssrelpreload.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\n\nmodule.exports = function(dbConfig) {\n\n\tvar db = require('./poemlab_database')(dbConfig);\n\n\treturn {\n\n\t\tcreate: function(user_data, callback) {\n\t\t\tvar params = _.values(_.pick(user_data, [... | javascript | edit | 0 | 2 | mit | c6dc037de56ebc5b1beb853cc89478c1228f95b9 | jimguys/poemlab,jimguys/poemlab | lib/repositories/poets_repository.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction submitEmail() {\n var button = document.getElementById('submit');\n button.onclick = function() {\n var parent = document.getElementById('parent').value;\n var phone = document.getElementById('phone-number').value;\n ... | javascript | edit | 0 | 3 | apache-2.0 | dc706a5bc91d647fade86d3f9d948a95e447be35 | Coding-Camp-2017/website,Coding-Camp-2017/website | javascript/signup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport PropTypes from \"prop-types\";\n\nexport default class FuzzyWrapper extends React.Component {\n constructor(props) {\n super();\n this.state = {\n isOpen: false,\n };\n\n // create a ... | javascript | edit | 0 | 2 | mit | 983c7b9e42902589a4d893b8d327a49650a761c9 | 1egoman/fuzzy-picker | src/fuzzy-wrapper.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default (config) => {\n\tif ( ! config.enabled) return (req, res, next) => { next() }\n\n\tvar header = (config.header || 'Authorization').toLowerCase()\n\tvar tokenLength = 32\n\tvar tokenRegExp = new RegExp(`^Token ([a-zA-Z0-9]... | javascript | edit | 0 | 6 | mit | c3609cbe9d33222f2bd5c466b874f4943094143f | kukua/concava | src/middleware/authenticate.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst Request = require('request');\n\nmodule.exports = (user, cb) => {\n Request.get({\n url: `https://api.github.com/users/${user}/repos`,\n headers: {\n 'User-Agent': 'GitPom'\n }\n }, cb);\n};\n\n```\n\nApply this ch... | javascript | edit | 0 | 1 | mit | 365e1016f05fab1b739b318d5bfacaa926bc8f96 | The-Authenticators/gitpom,The-Authenticators/gitpom | src/lib/getIssues.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar VNode = require('virtual-dom').VNode;\nvar VText = require('virtual-dom').VText;\n\n/**\n * Button.\n *\n * @param {object} props\n * @param {string} props.text\n * @param {function} [props.onClick]\n * @param {stri... | javascript | edit | 0 | 4 | mit | beb7349f523e7087979260698c9e799684ecc531 | MRN-Code/coins-logon-widget,MRN-Code/coins-logon-widget | scripts/components/button-group.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar _ = require('lodash')\n , defaultConf, developmentConf, env, extraConf, productionConf, testConf;\n\nenv = process.env.NODE_ENV || 'development';\n\ndefaultConf = {\n logger: 'dev',\n port: process.env.PORT || 30... | javascript | edit | 0 | 1 | mit | 87cf25bf581b4c96562f884d4b9c329c3c36a469 | Hilzu/SecureChat | lib/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// View\n$(document).ready(function() {\n console.log(\"Ready!\");\n // initialize the game and create a board\n var game = new Game();\n PopulateBoard(game.flattenBoard());\n\n //Handles clicks on the checkers board\n $(\".board\... | javascript | edit | 0 | 4 | mit | fa40d7c3a2bdb01a72855103fa72095667fddb71 | RenanBa/checkers-v1,RenanBa/checkers-v1 | js/application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function(){\n $('.datepicker').pickadate({\n onSet: function (ele) {\n if(ele.select){\n this.close();\n }\n }\n });\n $('.timepicker').pickatime({\n min: [7,30],\n max: [19,0],\... | javascript | edit | 0 | 2 | mit | d40bead054b0883ff59ae6ddd311bf93c5da6de3 | warrenca/silid,warrenca/silid,warrenca/silid,warrenca/silid | public/js/scripts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport {header} from './header';\nimport {mime} from './mime';\nimport {security} from './security';\nimport {tags} from './tags';\nimport {paths} from './paths';\nimport {types} from './types';\n\nexport const fieldsToShow = {\n 'head... | javascript | edit | 0 | 0 | mit | 2cbe06fdf4fa59605cb41a5f6bfb9940530989b5 | apinf/open-api-designer,apinf/openapi-designer,apinf/openapi-designer,apinf/open-api-designer | src/schemas/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Node = require('./nodeModel.js'),\n handleError = require('../../util.js').handleError,\n handleQuery = require('../queryHandler.js');\n\nmodule.exports = {\n\n createNode : function (req, res, next) {\n var newNode... | javascript | edit | 0 | 3 | mit | b8864dc79530a57b5974bed932adb0e4c6ccf73c | sreimer15/RoadMapToAnything,GMeyr/RoadMapToAnything,delventhalz/RoadMapToAnything,cyhtan/RoadMapToAnything,sreimer15/RoadMapToAnything,cyhtan/RoadMapToAnything,RoadMapToAnything/RoadMapToAnything,GMeyr/RoadMapToAnything,RoadMapToAnything/RoadMapToAnything,delventhalz/RoadMapToAnything | server/api/nodes/nodeController.js | rejected_duplicate | Near-duplicate of sample 105298 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// client start file\n\nconst Display = require('./interface.js');\nconst network = require('./network.js');\n\nlet dis = new Display();\n\n// TODO: placeholder nick\nlet nick = \"Kneelawk\";\n// TODO: placeholder server\nlet server = \... | javascript | edit | 0 | 3 | mit | 028b0c515a4d5e0bf26ca76cb101272b49f25219 | PokerDaddy/scaling-potato,PokerDaddy/scaling-potato | client/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of... | javascript | edit | 0 | 4 | mit | 2f63b0d6c9f16e4820d969532e8f9ae00ab66bdd | aickin/react,jquense/react,billfeller/react,mhhegazy/react,nhunzaker/react,silvestrijonathan/react,brigand/react,trueadm/react,kaushik94/react,prometheansacrifice/react,cpojer/react,mosoft521/react,joecritch/react,yungsters/react,glenjamin/react,jdlehman/react,facebook/react,roth1002/react,edvinerikson/react,TheBlasfem... | eslint-rules/no-primitive-constructors.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\nvar codeCopter = require('../');\n\n/**\n * A pretty harsh analyzer that passes NO files for the reason that \"it sucks\" starting on line 1.\n *\n * @returns {Object} An object consistent with a code-copter Analysis obje... | javascript | edit | 0 | 1 | isc | 6754468b9a1821993d5980c39e09f6eb772ecd41 | jtheriault/code-copter,jtheriault/code-copter | examples/analyzer-inline.spec.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nconst fs = require('fs')\nconst path = require('path')\nconst concise = require('../src/index')\n\nconst command = {\n name: process.argv[2],\n input: process.argv[3],\n output: process.argv[4]\n}\n\nconst buil... | javascript | edit | 0 | 2 | mit | e5b67dcf51ee97b6890b06a5d17b890bbf616081 | ConciseCSS/concise.css | bin/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('../lib/fin/lib/js.io/packages/jsio')\n\njsio.addPath('./lib/fin/js', 'shared')\njsio.addPath('./lib/fin/js', 'server')\njsio.addPath('.', 'fan')\n\njsio('import fan.Server')\njsio('import fan.Connection')\n\nvar redisEngine = r... | javascript | edit | 0 | 0 | mit | 55ac0e6be4b8a286c095a1a009777e336bc315cf | marcuswestin/Focus | node_scripts/run_server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { Route, IndexRoute } from 'react-router';\nimport $ from 'jQuery';\n\nimport CoreLayout from 'layouts/CoreLayout';\nimport HomeView from 'views/HomeView';\nimport ResumeView from 'views/ResumeView';\n... | javascript | edit | 0 | 2 | mit | c0747bbf0ba35c22f393d347a1b87729659031a3 | dont-fear-the-repo/fear-the-repo,sujaypatel16/fear-the-repo,AndrewTHuang/fear-the-repo,ericsonmichaelj/fear-the-repo,AndrewTHuang/fear-the-repo,ericsonmichaelj/fear-the-repo,sujaypatel16/fear-the-repo,dont-fear-the-repo/fear-the-repo | src/routes/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular.module('yds').directive('ydsWorkbenchNew', ['$ocLazyLoad', '$timeout', '$window', 'Data', 'Basket', 'Workbench',\n function ($ocLazyLoad, $timeout, $window, Data, Basket, Workbench) {\n return {\n restrict: ... | javascript | edit | 0 | 5 | apache-2.0 | a00a62f147489141cfb7d3fb2d10e08e8f161e01 | YourDataStories/components-visualisation,YourDataStories/components-visualisation,YourDataStories/components-visualisation | demo/js/components/workbench-new.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Copyright (c) 2015 IBM Cloudant, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file\n * except in compliance with the License. You may obtain a copy of t... | javascript | edit | 0 | 1 | apache-2.0 | 3908db4cabd5193aa3798a48277369b86b786f73 | KimStebel/nodejs-cloudant,cloudant/nodejs-cloudant,cloudant/nodejs-cloudant | tests/nock.js | rejected_duplicate | Near-duplicate of sample 73874 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar observer = lozad(\".lazy\", {\n\trootMargin: \"25%\",\n\tthreshold: 0\n});\nobserver.observe();\n\n```\n\nApply this change: Use ES6 import for Portfolio JS dependencies"
},
{
"role": "assistant",
"content": "import Inte... | javascript | edit | 0 | 0 | mit | ae166fa6cd8ef9c8a73ff1b9e7a1e64503e6061e | stevecochrane/stevecochrane.com,stevecochrane/stevecochrane.com | src/js/portfolio.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconsole.log('main.js');\n\n// Load Css async w LoadCSS & +1 polyfill / https://www.npmjs.com/package/fg-loadcss?notice=MIvGLZ2qXNAEF8AM1kvyFWL8p-1MwaU7UpJd8jcG\nvar stylesheet = loadCSS( \"styles/main.css\" );\nonloadCSS( stylesheet, fu... | javascript | edit | 0 | 1 | mit | 7b1ee57b1fc73b6bf75818561a2f5bba39b50344 | youpiwaza/chaos-boilerplate,youpiwaza/chaos-boilerplate | src/scripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*@ngInject*/\nfunction ProjectModelService(projectsAPI) {\n class Project {\n constructor(id, name, owner) {\n this.id = id;\n this.name = name;\n this.owner = owner;\n this.samples... | javascript | edit | 0 | 1 | mit | 0d58435c37ad66fa5bea391672cb490c13e455f7 | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | website/mcapp.projects/src/app/models/project.model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nconst baseConfig = require(\"./rollup.config\");\nconst plugin = require(\"./plugin\");\nconst path = require(\"path\");\n\nmodule.exports = baseConfig.map((config, index) => {\n config.plugins.push(plugin({\n ope... | javascript | edit | 0 | 1 | mit | a7a88cac0976c49e05fa9ea278320749f6ef1ba0 | btd/rollup-plugin-visualizer,btd/rollup-plugin-visualizer | rollup.config-dev.js | rejected_duplicate | Near-duplicate of sample 91181 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('../../index.js');\nvar scope = require('./Tadpoles');\nscope.view.exportFrames({\n\tamount: 200,\n\tdirectory: __dirname,\n\tonComplete: function() {\n\t\tconsole.log('Done exporting.');\n\t},\n\tonProgress: function(event) {\n... | javascript | edit | 0 | 1 | mit | c67b8acd4ee31cd4f8285cd21185727d191d23ce | superjudge/paper.js,proofme/paper.js,ClaireRutkoske/paper.js,iconexperience/paper.js,mcanthony/paper.js,legendvijay/paper.js,Olegas/paper.js,lehni/paper.js,fredoche/paper.js,JunaidPaul/paper.js,lehni/paper.js,luisbrito/paper.js,baiyanghese/paper.js,Olegas/paper.js,JunaidPaul/paper.js,mcanthony/paper.js,baiyanghese/pape... | examples/Node.js/exportTadpoles.js | rejected_duplicate | Near-duplicate of sample 94591 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nvar GameEngine = ( function () {\n\tfunction start(){\n\t\tvar x,\n y,\n color,\n i,\n j,\n lengthBoard,\n lengthField;\n\n var players = [];\n players.push( Object.create( GameObjects.... | javascript | edit | 0 | 3 | mit | 0f9b5317e5a9ce68372d62c814dfbd260b748169 | Vesper-Team/JavaScriptUI-DOM-TeamWork,Vesper-Team/JavaScriptUI-DOM-TeamWork | JavaScriptUI-DOM-TeamWork-Kinetic/Scripts/GameEngine.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = ResponseToObjects;\n\nvar Transform = require('readable-stream/transform');\nvar inherits = require('inherits');\nvar isArray = require('is-array');\n\n/**\n * Parse written Livefyre API Responses (strings or objects) i... | javascript | edit | 0 | 5 | mit | 7de0b3e5e86bcd995e30f6aa953e86c7730ffa28 | gobengo/chronos-stream | transform-response-to-objects.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { concat } = require('lodash')\n\nconst currentYear = (new Date()).getFullYear()\n\nconst GLOBAL_NAV_ITEM = {\n path: '/investment-projects',\n label: 'Investment projects',\n permissions: [\n 'investment.read_associated_inv... | javascript | edit | 0 | 0 | mit | 8c1899b772a1083ce739e237990652b73b41a48d | uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend | src/apps/investment-projects/constants.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar _ = require('underscore');\nvar util = require('util');\n\nexports.setup = function() {\n\tglobal.commands = {};\n};\n\nexports.handle = function(evt, msg) {\n\tif(msg.slice(0, 1) != \"!\")\n\t\treturn;\n\tvar m = msg.match(/^!([A-Z... | javascript | edit | 0 | 6 | mit | e771602c05add371bdb1d8d7082f87ae02715cae | ircah/cah-js,ircah/cah-js | app/commands.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar target = UIATarget.localTarget();\n\nfunction captureLocalizedScreenshot(name) {\n var target = UIATarget.localTarget();\n var model = target.model();\n var rect = target.rect();\n\n if (model.match(/iPhone/)) {\n if (rect.si... | javascript | edit | 0 | 4 | mit | ec0c70f94319a898453252d4c4a7d8020e40081b | wordpress-mobile/ui-screen-shooter,myhanhtran1999/UIScreenShot,jonathanpenn/ui-screen-shooter,duk42111/ui-screen-shooter,myhanhtran1999/UIScreenShot,wordpress-mobile/ui-screen-shooter,jonathanpenn/ui-screen-shooter,duk42111/ui-screen-shooter,myhanhtran1999/UIScreenShot | take_screenshots.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n;((rc) => {\n 'use strict';\n var tagContent = 'router2-content';\n var tagView = 'router2-view';\n\n var div = document.createElement('div');\n div.innerHTML = `\n <${tagContent} id=\"case5-1\" hash=\"case5-1\">\n Case 5-1\n ... | javascript | edit | 0 | 1 | isc | ce4db4da61560acb8536332b4092dcbf0ae1b9a8 | m3co/router3,m3co/router3 | test/case5/case5.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport webpack from 'webpack';\nimport ExtractTextPlugin from 'extract-text-webpack-plugin';\nimport baseConfig from './webpack.config.base';\n\nconst config = {\n ...baseConfig,\n\n devtool: 'source-map',\n\n entry: './app/index',\n... | javascript | edit | 0 | 0 | mit | 38bc4c6908ef3bd56b4c9d724b218313cb3400a5 | stefanKuijers/aw-fullstack-app,waha3/Electron-NeteaseCloudMusic,treyhuffine/tuchbase,foysalit/wallly-electron,joshuef/peruse,jenyckee/electron-virtual-midi,pahund/scenescreen,dfucci/Borrowr,mitchconquer/electron_cards,xiplias/github-browser,cosio55/app-informacion-bitso,Byte-Code/lm-digital-store-private-test,joshuef/p... | webpack.config.production.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport * as ReactIntl from 'react-intl'\n\nimport languageResolver from './languageResolver'\nimport messagesFetcher from './messagesFetcher'\n\nfunction wrappedReactIntlProvider(language, localizedMessages) {... | javascript | edit | 0 | 1 | mit | c4d7ea7e74d0f81b6b38a6623e47ccfee3a0fab1 | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | src/locale/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport _ from 'lodash'\nimport postcss from 'postcss'\n\nconst variantGenerators = {\n hover: (container, config) => {\n const cloned = container.clone()\n\n cloned.walkRules(rule => {\n rule.selector = `.hover${config.optio... | javascript | edit | 0 | 2 | mit | 255c7b47e7686650f5712fb2632d3b4c0e863d64 | tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindlabs/tailwindcss,tailwindcss/tailwindcss | src/lib/substituteVariantsAtRules.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component, PropTypes } from 'react'\nimport FormControl from './FormControl'\n\n/* eslint-disable react/prefer-stateless-function */\nclass LinksControl extends Component {\n\n static propTypes = {\n text: PropTypes.... | javascript | edit | 0 | 3 | mit | fd5937050f8f97301d909beadfa3e87ef9f4aa13 | ello/webapp,ello/webapp,ello/webapp | src/components/forms/LinksControl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar repl = require('repl');\nvar Chrome = require('../');\n\nChrome(function (chrome) {\n var chromeRepl = repl.start({\n 'prompt': 'chrome> '\n });\n\n chromeRepl.on('exit', function () {\n ... | javascript | edit | 0 | 2 | mit | 6be5d442638239436104e48cd8977a7742c86c38 | valaxy/chrome-remote-interface,cyrus-and/chrome-remote-interface,washtubs/chrome-remote-interface,cyrus-and/chrome-remote-interface | bin/repl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.ObjectController.extend(Ember.I18n.TranslateableProperties, {\n proxiedObjectives: [],\n session: null,\n course: null,\n actions: {\n addParent: function(parentProxy){\n va... | javascript | edit | 0 | 1 | mit | e50a7eec7a8d1cb130da08cdae8c022b82af0e35 | stopfstedt/frontend,stopfstedt/frontend,jrjohnson/frontend,thecoolestguy/frontend,gabycampagna/frontend,thecoolestguy/frontend,jrjohnson/frontend,ilios/frontend,djvoa12/frontend,gboushey/frontend,djvoa12/frontend,gboushey/frontend,ilios/frontend,dartajax/frontend,dartajax/frontend,gabycampagna/frontend | app/controllers/sessionobjective.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// Common webpack configuration used by webpack.hot.config and webpack.rails.config.\n\nvar path = require(\"path\");\n\nmodule.exports = {\n context: __dirname, // the project dir\n entry: [ \"./assets/javascripts/example\" ],\n // ... | javascript | edit | 0 | 0 | mit | 17bcd21bf30b3baabbacb1e45b59c7103b3cdbd3 | mscienski/stpauls,szyablitsky/react-webpack-rails-tutorial,RomanovRoman/react-webpack-rails-tutorial,crmaxx/react-webpack-rails-tutorial,roxolan/react-webpack-rails-tutorial,Rvor/react-webpack-rails-tutorial,phosphene/react-on-rails-cherrypick,jeffthemaximum/Teachers-Dont-Pay-Jeff,shakacode/react-webpack-rails-tutorial... | webpack/webpack.common.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n var socket = new WebSocket(\"ws://\" + window.location.host + \"/\");\n\n socket.onmessage = function(message){\n console.log('got a message: ')\n console.log(message)\n }\n\n});\n\n```\n\nApply this change: Us... | javascript | edit | 0 | 1 | mit | 3500fe09fd8aba9d9d789f1308d57955aaeacd5d | portlandcodeschool-jsi/barebones-chat,portlandcodeschool-jsi/barebones-chat | public/javascripts/page.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar tape = require(\"tape\"),\n jsdom = require(\"jsdom\"),\n d3 = Object.assign(require(\"../\"), require(\"d3-selection\"));\n\n/*************************************\n ************ Components *************\n *******************... | javascript | edit | 0 | 1 | bsd-3-clause | fcb2a9ecda9fe5dfb9484531ab697ef4c26ae608 | curran/d3-component | test/create-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * grunt-external-daemon\n * https://github.com/jlindsey/grunt-external-daemon\n *\n * Copyright (c) 2013 Joshua Lindsey\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nprocess.stdout.write(\"STDOUT Message\");\nprocess... | javascript | edit | 0 | 0 | mit | 1a8ad6d06e5b465ee331cbc5c4957862edf31950 | jlindsey/grunt-external-daemon | test/fixtures/output_server.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport RightColumn from \"./RightColumn\";\n\nconst UserApp = ({ children }) => (\n <div className=\"main-container\">\n <section className=\"who-are-we\">\n <h1>GBG tech</h1>\n </section>\n ... | javascript | edit | 0 | 1 | mit | 7470675462f60a8260ca6f9d8e890f297046bee5 | gbgtech/gbgtechWeb,gbgtech/gbgtechWeb | src/frontend/components/UserApp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//For Heroku Deployment\nvar URI = require('urijs');\nvar config = URI.parse(process.env.DATABASE_URL);\nconfig['ssl'] = true;\n\nmodule.exports = config;\n// module.exports = {\n// database: 'sonder',\n// user: 'postgres',\n// //... | javascript | edit | 0 | 0 | mit | ea850baf397ae98a78222691e1f38571d66d029c | aarontrank/SonderServer,MapReactor/SonderServer,MapReactor/SonderServer,aarontrank/SonderServer | db/config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Delighted = require('./lib/delighted');\n\nmodule.exports = function(key) {\n return new Delighted(key);\n};\n\n```\n\nApply this change: Change case for required Delighted in lib\n\nLinux is case sensitive and fails to load the re... | javascript | edit | 0 | 1 | mit | cda7032237124def696840041c872e5fc9427ad4 | delighted/delighted-node | delighted.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar eng = require('./node/engine');\n\nvar index = module.exports = {\n localMinimize: function(func, options, callback) {\n eng.runPython('local', func, options, callback);\n },\n globalMinimize: function(func, options, callback)... | javascript | edit | 0 | 1 | mit | 588a552ce9750a70f0c80ed574c139f563d5ffcc | acjones617/scipy-node,acjones617/scipy-node | optimize/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n(function (module, undefined) {\n function CreateResultBox(elem) {\n // TODO: add property 'list' and 'details' for each UI state.\n this.elem = elem;\n this.list = new TimetableList(elem);\n }\n\n Object.de... | javascript | edit | 0 | 1 | mit | 53b76340aa614a01a206a728f14406aa1cdef1c9 | kyukyukyu/dash-web,kyukyukyu/dash-web | test/e2e/page/create/create_result_box.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n*\tcom.spinal.ioc.plugins.ThemePlugin Class Tests\n*\t@author Patricio Ferreira <<EMAIL>>\n**/\ndefine(['ioc/plugins/theme'], function(ThemePlugin) {\n\n\tdescribe('com.spinal.ioc.plugins.ThemePlugin', function() {\n\n\t\tbefore(fu... | javascript | edit | 0 | 1 | mit | 94396993d1a0552559cb5b822f797adee09ea2b1 | nahuelio/boneyard,3dimention/spinal,3dimention/boneyard | test/com/spinal/ioc/plugins/theme-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(function() {\n var formatted_string = 'hoge';\n // $('#text_output').text(formatted_string);\n $('#text_input').bind('keyup', function(e) {\n var text = $('#text_input').val();\n console.log(text);\n $.ajax({\n url: '... | javascript | edit | 0 | 1 | mit | 27b391f8bdf57b9c3215ef99a29351ba55db65f5 | gouf/test_sinatra_markdown_preview,gouf/test_sinatra_markdown_preview | public/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n * templateLayout tests\n * Copyright (c) 2011 Pablo Escalada\n * MIT Licensed\n */\nTestCase(\"templateLayout\", {\n \"test templateLayout registration\":function () {\n assertNotUndefined(wef.plugins.registered.template... | javascript | edit | 0 | 1 | mit | 512ebaf12ea76d3613c2742d4ea5b61a257e5e04 | diesire/cssTemplateLayout,diesire/cssTemplateLayout,diesire/cssTemplateLayout | test/templateLayout.wefTest.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// ES2015 polyfill\nimport 'babel-polyfill';\n\n// Modernizr\nimport './modernizr';\n\n// Components\nimport './components/example';\n\n```\n\nApply this change: Use core-js and js-polyfills instead of babel-polyfill"
},
{
"role... | javascript | edit | 0 | 0 | mit | 302c3434a44b3e51d84b70e801a72e9119f106f4 | strt/strt-boilerplate,strt/strt-boilerplate | src/scripts/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport config from \"../\"\nimport postcss from \"postcss\"\nimport stylelint from \"stylelint\"\nimport test from \"tape\"\n\ntest(\"basic properties of config\", t => {\n t.ok(isObject(config.rules), \"rules is object\")\n t.end()\n... | javascript | edit | 0 | 2 | mit | 940f4f4da198335f51c2f8e76fc1c0caffb7736c | ntwb/stylelint-config-wordpress,WordPress-Coding-Standards/stylelint-config-wordpress,GaryJones/stylelint-config-wordpress,stylelint/stylelint-config-wordpress | __tests__/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport _ from 'underscore';\n\nclass Grid {\n\n // The state of a particular game grid\n constructor({ columnCount = 7, rowCount = 6, columns = _.times(columnCount, () => []), lastPlacedChip = null }) {\n this.columnCount = columnC... | javascript | edit | 0 | 1 | mit | dfcde972cde79fd3f354366ac3d9f3bc136a5981 | caleb531/connect-four | app/server/grid.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n'use strict';\n\n /**\n * ngInject\n */\n function StateConfig($urlRouterProvider) {\n $urlRouterProvider.otherwise('/');\n }\n\n // color ramp for sectors\n\n var sectorColors = {\n ... | javascript | edit | 0 | 1 | mit | fd7dda54d0586906ccd07726352ba8566176ef71 | azavea/mos-energy-benchmark,azavea/mos-energy-benchmark,azavea/mos-energy-benchmark | app/scripts/app.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar deps = [\n '/stdlib/tag.js',\n '/stdlib/observable.js'\n];\n\nfunction increment(x) {\n return String(parseInt(x, 10) + 1);\n}\n\nfunction onReady(tag, observable) {\n var value = observable.observe(\"0\");\n\n functi... | javascript | edit | 0 | 1 | bsd-3-clause | 202941769bd594e31719303882df16ee6ece95c9 | garious/poochie-examples,garious/yoink-examples,garious/poochie-examples,garious/yoink-examples | react/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar RiotControl = {\n _stores: [],\n addStore: function(store) {\n this._stores.push(store);\n }\n};\n\n['on','one','off','trigger'].forEach(function(api){\n RiotControl[api] = function() {\n var args = [].slice.call(arguments... | javascript | edit | 0 | 1 | mit | 8fae4b14a95f17adbefce5a33132c556197cadc1 | jimsparkman/RiotControl,creatorrr/RiotControl,creatorrr/RiotControl,nnjpp/RiotDispatch,geoapi/RiotControl,geoapi/RiotControl,jimsparkman/RiotControl | riotcontrol.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Keen = require('keen-tracking');\nvar extend = require('keen-tracking/lib/utils/extend');\n\n// Accessor methods\n\nfunction readKey(str){\n if (!arguments.length) return this.config.readKey;\n this.config.readKey = (str ? String(... | javascript | edit | 0 | 4 | mit | e37ab30622a50614f226dc746d7e7b68b2afd792 | keen/keen-analysis.js,keen/keen-analysis.js | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar rump = module.exports = require('rump');\nvar configs = require('./configs');\nvar originalAddGulpTasks = rump.addGulpTasks;\n\n// TODO remove on next major core update\nrump.addGulpTasks = function(options) {\n or... | javascript | edit | 0 | 4 | mit | d5815ce2b68695a548b0972e6c3f5928ba887673 | rumps/scripts,rumps/rump-scripts | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar angular = require('angular');\n\nangular.module('DashCtrl', ['chart.js']).controller('DashController', ['$scope', $scope => {\n const colorScheme = ['#2a9fd6'];\n\n let weekDays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', '... | javascript | edit | 0 | 1 | mit | 18d33de0c54e64693274bc17afb1a08b9fec5ad8 | Foltik/Shimapan,Foltik/Shimapan | app/public/panel/controllers/DashCtrl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\n// Copyright (c) Jupyter Development Team.\n// Distributed under the terms of the Modified BSD License.\n\n// This file must be webpacked because it contains .css imports\n\n// Load jquery and jquery-ui\nvar $ = require('jquery');\nre... | javascript | edit | 0 | 3 | bsd-3-clause | 5e41bab44fe3cdd1d160198cbe9ec3aeebf1fdcc | cornhundred/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,ipython/ipywidgets,cornhundred/ipywidgets,cornhundred/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidg... | jupyter-js-widgets/src/embed-webpack.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar config = require('./config.js');\nvar jsonLdContext = require('./context.json');\nvar MetadataService = require('./metadata-service.js');\nvar Organism = require('./organism.js');\nvar Xref = require('./xref.js');\n\nvar BridgeDb = ... | javascript | edit | 0 | 5 | apache-2.0 | 5d674572dcce72f756d5c74704ec1d809ac864cb | bridgedb/bridgedbjs,bridgedb/bridgedbjs,egonw/bridgedbjs,bridgedb/bridgedbjs | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function()\n{ \n $(\"#invite-form\").on('submit', function()\n { \n var inviteeEmail = $(\"#email\").val();\n console.log(inviteeEmail)\n\n if (!inviteeEmail || !inviteeEmail.length) {\n ... | javascript | edit | 0 | 3 | mit | 323b195642bab258001da6b0a85ca998e8697d3d | avinassh/slackipy,avinassh/slackipy,avinassh/slackipy | static/js/submit.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.