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\nexport function getInterfaceLanguage() {\n if (!!navigator && !!navigator.language) {\n return navigator.language;\n } else if (!!navigator && !!navigator.languages && !!navigator.languages[0]) {\n return navigator.languages[0];... | javascript | edit | 0 | 10 | mit | 61328d83b9671c066913c301bc4bc449ea427eb7 | stefalda/react-localization | src/utils.js | rejected_duplicate | Near-duplicate of sample 87247 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n// Handles params concerning configuration files in the $routeProvider phase\nangular.module('arethusa.core').factory('confUrl', [\n 'CONF_PATH',\n '$route',\n function (CONF_PATH, $route) {\n return function (useDe... | javascript | edit | 0 | 4 | mit | 12cfd7069c6513186bffdc073c1fd5264d077754 | Masoumeh/arethusa,PonteIneptique/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,latin-language-toolkit/arethusa,fbaumgardt/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa | app/js/arethusa.core/conf_url.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n\n //grunt-sass\n grunt.config('sass', {\n options: {\n outputStyle: 'expanded',\n imagePath: '../<%= config.image.dir %>'\n },\n dist: {\n ... | javascript | edit | 0 | 1 | mit | 1378fbb1df3684e9674a2fb9836d8516b624e7a4 | SnceGroup/grunt-config-for-websites,SnceGroup/grunt-config-for-websites | grunt/css.js | rejected_duplicate | Near-duplicate of sample 67996 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = (function(){\n\n\t// GET /users/:id/media?lat=<LAT>&lng=<LNG>&time=<TIME>\n\treturn function* collection(id) {\n\n\t\t// Twitter Requests\n\t\tvar TwitterManager = require('../media/twitter');\n\t\tvar twitterGranuals =... | javascript | edit | 0 | 1 | mit | 79ddea43a8e7217f974dc183e4f9bdb6732d2d11 | capsul/capsul-api | controllers/users/collection.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*******************************\n Default Paths\n*******************************/\n\nmodule.exports = {\n base : '',\n\n theme : './src/theme.config',\n\n docs : {\n source : '../docs/server/files/release/',\n outpu... | javascript | edit | 0 | 0 | mit | 13b62a9096c0e81efeaabfe7f603051a246fd22d | lucienevans/Semantic-UI,avorio/Semantic-UI,Dineshs91/Semantic-UI,CapeSepias/Semantic-UI,bradbird1990/Semantic-UI,techpool/Semantic-UI,vibhatha/Semantic-UI,dhj2020/Semantic-UI,Keystion/Semantic-UI,nik4152/Semantic-UI,raoenhui/Semantic-UI-DIV,zcodes/Semantic-UI,CapsuleHealth/Semantic-UI,davialexandre/Semantic-UI,86yankai... | tasks/defaults.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\"use strict\";\n\nangular.module(\"hikeio\").\n\tdirective(\"giveFocus\", function() {\n\treturn {\n\t\tlink: function(scope, element, attributes) {\n\t\t\tscope.$watch(attributes.giveFocus, function(value) {\n\t\t\t\tif (value) {\n\t\... | javascript | edit | 0 | 2 | mit | 3dd759f1b7756e34f94a66ae361c44c6a2781c8d | zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io,zaknelson/hike.io | client/js/directives/give-focus-directive.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function() {\n return {\n presets: ['module:metro-react-native-babel-preset'],\n plugins: [\n [\n 'babel-plugin-module-resolver',\n {\n alias: {\n 'react-native-vector-icons... | javascript | edit | 0 | 2 | bsd-3-clause | 1c4c3c036aa2d88db4d1c078d009eb2d0875b136 | exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponen... | packages/babel-preset-expo/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\nCopyright 2016 Mozilla\n\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LI... | javascript | edit | 0 | 1 | apache-2.0 | 7ec505fba9972b109a3aea2e70c103f5b8c09286 | victorporof/tofino,victorporof/tofino | src/browser-runner/platform-dummy/sagas/server-command-handlers.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { langSelector } from './';\n\n// This enhancers sole purpose is to add the lang prop to route actions so that\n// they do not need to be explicitally added when using a RFR route action.\nexport default function addLangToRouteEn... | javascript | edit | 0 | 5 | bsd-3-clause | 63875316d9df4983c477600dac427f1bed899ae2 | MiloATH/FreeCodeCamp,HKuz/FreeCodeCamp,Munsterberg/freecodecamp,jonathanihm/freeCodeCamp,FreeCodeCampQuito/FreeCodeCamp,BhaveshSGupta/FreeCodeCamp,no-stack-dub-sack/freeCodeCamp,matthew-t-smith/freeCodeCamp,FreeCodeCamp/FreeCodeCamp,raisedadead/FreeCodeCamp,BerkeleyTrue/FreeCodeCamp,raisedadead/FreeCodeCamp,otavioarc/f... | common/app/Router/redux/add-lang-enhancer.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('ts-node').register({ fast: true, compilerOptions: { target: 'es2015', } })\nrequire('source-map-support/register')\nrequire('jsdom-global/register')\nrequire('raf').polyfill(global)\n\nconst enzyme = require('enzyme')\nconst c... | javascript | edit | 0 | 1 | mit | 30caeb00644a2f7e3740b49b39790f96a796bee5 | brightinteractive/bright-js-framework,brightinteractive/bright-js-framework,brightinteractive/bright-js-framework | test/init.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nimport passport from 'passport';\nimport {Strategy as LocalStrategy} from 'passport-local';\n\nfunction localAuthenticate(User, email, password, done) {\n User.findOneAsync({\n email: email.toLowerCase()\n })\n ... | javascript | edit | 0 | 3 | mit | db599cb4fdaa27d68a45f0d5198d2e8a6a70201b | Klemensas/ffempire,Klemensas/ffempire | server/auth/local/passport.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar mongoose = require('mongoose');\nvar schema = require('validate');\n\nvar Event = mongoose.model('Event', {\n name: String,\n start: Date,\n end: Date,\n group: String,\n notify: Boolean\n});\n\nvar validate = function (event) ... | javascript | edit | 0 | 1 | mit | 8acde49dee699c4055d930eb4bfb9916e884026f | hacksu/kenthackenough,hacksu/kenthackenough | app/events/model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar fs = require('fs'),\n Libraries = require('../lib/libraries'),\n should = require('should');\n\ndescribe('Libraries', function() {\n describe('#bowerLibraries', function() {\n var readdirSync = fs.readdirSync,\n sta... | javascript | edit | 0 | 1 | mit | 5cd96c419d81f5365121064bfb8a0762c3004984 | walmartlabs/lumbar | test/libraries.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar chai = require('chai'),\n expect = chai.expect,\n sql = require('../psql');\n\ndescribe('select', function() {\n it('should generate a select statement with an asterisk with no arguments', function() {\n expect(sql.select(... | javascript | edit | 0 | 1 | mit | 4718270e280fb258aacf942ed6d33cb3e6c39ae3 | swlkr/psqljs | test/select-test.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar JsonExtension = require('../../src/json');\n\nvar expect = require('chai').expect;\n\ndescribe('JsonExtension', function () {\n var ext;\n\n beforeEach(function() {\n ext = new JsonExtension();\n });\n\n desc... | javascript | edit | 0 | 1 | mit | 7d1c8097ef9ead4935f94e7f69dcbe5e8e5f2330 | petejohanson/hy-res | test/spec/json.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar webpack = require('./webpack.config');\n\nprocess.env.CHROME_BIN = require('puppeteer').executablePath();\n\nmodule.exports = function (config) {\n config.set({\n basePath: '.',\n frameworks: ['mo... | javascript | edit | 0 | 1 | bsd-3-clause | 0e16b3547b7134e032885053ddac97cb85cb7ee2 | jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab | tests/karma.conf.js | rejected_duplicate | Near-duplicate of sample 81047 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { app, html } from \"flea\"\n\nconst model = 0\n\nconst view = (model, dispatch) => html`\n <div>\n <h1>${model}</h1>\n <button onclick=${_ => dispatch(\"INCREMENT\")}>+</button>\n <button onclick=${_ => d... | javascript | edit | 0 | 1 | mit | 03b28db81686b8a8528eb949d990a6c40f9cde79 | hyperapp/hyperapp,hyperapp/hyperapp,jbucaran/hyperapp | examples/dir/counter/index.js | rejected_duplicate | Near-duplicate of sample 79783 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst {VM} = require('vm2')\nconst exec = require('child_process').exec\n\nmodule.exports = {\n js: code => {\n const vm = new VM()\n try {\n return vm.run(code).toString()\n } catch (e) {\n return e.toString();\n ... | javascript | edit | 0 | 2 | mit | 6a25939169dde7cb31093f3ebf7298a658ed0ab4 | josephrexme/sia | lib/repl.js | rejected_duplicate | Near-duplicate of sample 89680 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require(\"path\")\n\nconst PATHS = {\n app: path.join(__dirname, 'src/index.tsx'),\n}\n\nmodule.exports = {\n entry: { \n app: PATHS.app,\n },\n output: {\n path: __dirname + '/dist',\n filename: 'bundle.js',\... | javascript | edit | 0 | 0 | mit | a49d464a2ba55c3d0c3600f14c85f8c003c785cd | looker-open-source/extension-template-react,looker-open-source/extension-template-react | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst HtmlWebPackPlugin = require(\"html-webpack-plugin\")\n\nmodule.exports = {\n entry: {\n main: __dirname + \"/src/DragRange.jsx\",\n viewer: __dirname + \"/src/index.js\",\n },\n\n output: {\n filename: \"[name].js\",\n... | javascript | edit | 0 | 0 | mit | 4b37bc34f49b3cdc59b2960dd97b4083995f72a4 | Radivarig/react-drag-range,Radivarig/react-drag-range | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n entry: [\n path.resolve(__dirname, \"src\", \"r3test.js\"),\n \"webpack/hot/dev-server\",\n \"webpack-dev-server/client?http://localhost:80... | javascript | edit | 0 | 0 | apache-2.0 | f011989558edaea5df62e28155cd904942ed743f | Izzimach/r3test,Izzimach/r3test | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/** @babel */\n\nimport { applyMiddleware, createStore } from 'redux'\nimport createLogger from 'redux-logger'\nimport createSagaMiddleware from 'redux-saga'\nimport reducers, { initialState } from './reducers'\nimport rootSaga from './... | javascript | edit | 0 | 0 | mit | d5e55241a66d37f45b0404be3d4e1d0f85715573 | sanack/atom-jq | src/store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { render } from 'react-dom'\nimport './index.css'\nimport '../semantic/dist/semantic.min.css';\n\nimport Exame from './Exame.js'\nimport Result from './Result.js'\nimport { Route, BrowserRouter } from '... | javascript | edit | 0 | 1 | mit | ebbffa2dde972b267f70677adc60a21c89c07b8e | wallat/little-test,wallat/little-test | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nrequire('core-js'); // es2015 polyfill\nvar path = require('path');\nvar plopBase = require('./modules/plop-base');\nvar generatorRunner = require('./modules/generator-runner');\n\n/**\n * Main node-plop module\n *\n * @param {string} p... | javascript | edit | 0 | 2 | mit | 0fb79bc1c55db7e13eb4ce987256b87f751d3d01 | amwmedia/node-plop,amwmedia/node-plop,amwmedia/node-plop | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n\n didInsertElement() {\n Chart.defaults.global.responsive = true;\n Chart.defaults.global.legend.display =false\n },\n\n\n didRender() {\n ... | javascript | edit | 0 | 1 | mit | bc24c5e0a2abc2f89c98f66ea19b632d3248c64b | ThreeDRadio/playlists,ThreeDRadio/playlists,ThreeDRadio/playlists | frontend/app/components/bar-graph.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar express = require('express');\nvar router = express.Router();\n\nvar TaxonPresenter = require('./presenters/taxon-presenter.js');\n\nrouter.get('/', function (req, res) {\n res.render('index');\n});\n\nrouter.get('/tabbed/:taxonSlu... | javascript | edit | 0 | 1 | mit | d8fff58a630c053f4a5706a7022ab2f3589200f6 | alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype,alphagov/govuk-navigation-prototype | app/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport PropTypes from 'prop-types'\n\nexport const getContextualizer = (propTypes, targetProp) => {\n class ContextProps extends Component {\n getChildContext () {\n const props = Objec... | javascript | edit | 0 | 2 | unlicense | 825828d319b65a1027f18b42bac80c7d0a89869f | xaviervia/react-context-props,xaviervia/react-context-props | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\n// Create a new component to produce some html\nconst App = function () { // const means that this is the final value. Here we are making a component.\n return <div>Hel... | javascript | edit | 0 | 1 | mit | ab9f0b13f4a8e07d4e255a856fcc2ae2c0e4a456 | phirefly/react-redux-starter,phirefly/react-redux-starter | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Returns a very important number.\n *\n * @returns {number} - The number.\n */\nexport default function theDefaultExport() {\n return 40;\n}\n\n/**\n * Value that can be incremented.\n *\n * @type {number}\n */\nexport let value... | javascript | edit | 0 | 1 | mit | d6a2545ab672c59f66b13570a7d809483cd7e78e | cheminfo-js/test | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { createFilter } from 'rollup-pluginutils';\nimport { resolve as resolveSourceMap } from 'source-map-resolve';\nimport { readFile } from 'fs';\n\nexport default function sourcemaps({ include, exclude } = {}) {\n const filter = c... | javascript | edit | 0 | 3 | mit | 069158e6356e3a58a8c41191a5d00f2afeac0bba | maxdavidson/rollup-plugin-sourcemaps,maxdavidson/rollup-plugin-sourcemaps | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst { createLogger, LEVELS: { INFO } } = require('./loggers')\nconst logFunctionConsole = require('./loggers/console')\nconst Cluster = require('./cluster')\nconst createProducer = require('./producer')\nconst createConsumer = require... | javascript | edit | 0 | 1 | mit | 987768c4c78761ed5b827131f10b4a9d6e79fc12 | tulios/kafkajs,tulios/kafkajs,tulios/kafkajs,tulios/kafkajs | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nimport h from 'snabbdom/h'\nimport extend from 'extend'\n\nconst sanitizeProps = (props) => {\n\n props = props === null ? {} : props\n\n Object.keys(props).map((prop) => {\n const keysRiver = prop.split('-').reverse()\n\n if(... | javascript | edit | 0 | 3 | mit | d86544c4df922080939dc057f7b682298b13a6d6 | Swizz/snabbdom-pragma | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = {\n plugins: {\n '@wearegenki/ui-postcss': {},\n },\n};\n\n```\n\nApply this change: Add comments about ui-postcss in docs"
},
{
"role": "assistant",
"content": "module.exports = {\n plugins: {\n '@... | javascript | edit | 0 | 0 | isc | a6f9255f268d8b17d2820aa0cc32a18cee3f778f | WeAreGenki/wag-ui | .postcssrc.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//\n// textEditView\n// Modify text based on a textarea\n//\n\nimport ItemView from 'base/item-view';\n\nexport default ItemView.extend({\n template: 'editTextView',\n\n tagName: 'textarea',\n\n className: 'gistbook-textarea',\n\n /... | javascript | edit | 0 | 1 | mit | 358d2a9b5d2959031fa685045a9f1a07f2d27c78 | jmeas/gistbook,joshbedo/gistbook | client.src/shared/views/gistbook-view/views/text/edit/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from \"react-redux\";\nimport { createStore, applyMiddleware } from \"redux\";\nimport thunk from \"redux-thunk\";\nimport App from \"./containers/App\... | javascript | edit | 0 | 0 | mit | fbd3bd5365b8dd1b6f4773e22f7b94fe4126acfa | alice02/go-todoapi,alice02/go-todoapi,alice02/go-todoapi | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* eslint-disable no-console */\nimport { createFilter } from 'rollup-pluginutils';\nimport { resolveSourceMap } from 'source-map-resolve';\nimport { readFile } from 'fs';\nimport { promisify } from './utils';\n\nconst readFileAsync = p... | javascript | edit | 0 | 5 | mit | 5aa339bb60364eb0c43690c907cc391788811a24 | maxdavidson/rollup-plugin-sourcemaps,maxdavidson/rollup-plugin-sourcemaps | src/index.js | rejected_duplicate | Near-duplicate of sample 85699 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n//Get the required shit together\nconst config = require(\"./config.json\");\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\nconst MSS = require(\"./functions/\");\nconst fs = require(\"fs\");\nvar comma... | javascript | edit | 0 | 3 | mit | 1481d1905b237c768d45335cc431d567f5676d87 | moustacheminer/MSS-Discord,moustacheminer/MSS-Discord,moustacheminer/MSS-Discord | src/index.js | rejected_duplicate | Near-duplicate of sample 71771 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n \"text!src/templates/command.html\"\n], function(commandTemplate) {\n var commands = codebox.require(\"core/commands\");\n var dialogs = codebox.require(\"utils/dialogs\");\n\n commands.register({\n id: \"p... | javascript | edit | 0 | 2 | apache-2.0 | 25e28e9795aee56e9d7acdb09b362c30ee7dad15 | etopian/codebox-package-command-palette,CodeboxIDE/package-command-palette,CodeboxIDE/package-command-palette,etopian/codebox-package-command-palette | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from \"react\";\nimport { render } from \"react-dom\";\nimport Root from \"./Root\";\n\nrender(\n React.createElement(Root),\n document.getElementById(\"root\")\n);\n\n```\n\nApply this change: Fix missing root css import... | javascript | edit | 0 | 0 | apache-2.0 | 453d61337dda06c15130b9783b39ce0e58979c86 | nwsapps/flashcards,nwsapps/flashcards | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\ndefine([\n 'underscore',\n 'backbone',\n 'models/section',\n 'config'\n], function (_, Backbone, Section, config) {\n 'use strict';\n\n var SectionCollection = Backbone.Collection.extend({\n model: Section,\n\n initialize: f... | javascript | edit | 0 | 2 | mit | 83314d1d646ffa3ec5e668ecdc5ae0bbbabfaad8 | jmflannery/jackflannery.me,jmflannery/jackflannery.me,jmflannery/rez-backbone,jmflannery/rez-backbone | app/scripts/collections/section.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport pf from 'portfinder';\n\n\nexport function homedir() {\n return process.env[(process.platform === 'win32') ? 'USERPROFILE' : 'HOME'];\n}\n\n\nexport function wait (time) {\n return new Promise(resolve => {\n setTimeout(() =>... | javascript | edit | 0 | 2 | mit | 61c69d309ad8d80812b3467697ef52ead021249a | sqlectron/sqlectron-term | src/utils.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react'\nimport { render } from 'react-dom'\nimport createStore from './createStore'\n\nconst store = createStore()\n\nrender(\n <h1>Hello from React</h1>,\n document.getElementById('react')\n)\n\n```\n\nApply this c... | javascript | edit | 0 | 0 | mit | 6f8019e821d94975cfab7e62c1557af4254be72e | epicsharp/react-boilerplate,epicsharp/react-boilerplate,RSS-Dev/live-html,RSS-Dev/live-html | src/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar path = require('path');\nvar fs = require('extfs');\nvar mongoose = require('mongoose');\nimport { AbstractDB } from './AbstractDB';\nimport { Core } from '../Core/Core';\n\nexport class Mongo extends AbstractDB {\n\n constructor(u... | javascript | edit | 0 | 3 | mit | 7b3f810e466248d77218a3d59bd674386ff9bd97 | marian2js/rode | src/DB/Mongo.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { lazyFunctionRequire } from 'roc';\n\nimport config from '../config/roc.config.js';\nimport meta from '../config/roc.config.meta.js';\n\nconst lazyRequire = lazyFunctionRequire(require);\n\nexport default {\n config,\n met... | javascript | edit | 0 | 0 | mit | a2136a83a4c7eeb988da2a2c1833fd16d4828632 | voldern/roc-plugin-dredd | extensions/roc-plugin-dredd/src/roc/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Trie = require('../app/trie');\n\ndescribe('Trie', function() {\n var trie;\n\n beforeEach(function() {\n trie = new Trie();\n });\n\n it('should be an object', function() {\n expect(trie).to.be.ok;\n });\n\n it('should ... | javascript | edit | 0 | 1 | mit | 69914fdba918b1a8c38d9f8b08879d5d3d213132 | mgarbacz/nordrassil,mgarbacz/nordrassil | test/trie.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar Disk = require( '../' )\nvar BlockDevice = require( 'blockdevice' )\nvar assert = require( 'assert' )\n\nconst DISK_IMAGE = __dirname + '/data/bootcamp-osx-win.bin'\n\ndescribe( 'Disk', function( t ) {\n \n var device = null\n va... | javascript | edit | 0 | 1 | mit | 3221f816bc32adee59d03fd9b5549507384f5b08 | jhermsmeier/node-disk | test/disk.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// jQuery built with \"grunt custom:-ajax/script,-ajax/jsonp,-css,-deprecated,-dimensions,-effects,-event,-event/alias,-offset,-wrap,-ready,-deferred,-exports/amd,-sizzle\"\n// https://github.com/jquery/jquery#how-to-build-your-own-jque... | javascript | edit | 0 | 2 | bsd-3-clause | 170248b70dfe6b4eb9eb476919c19fb98a2e88c8 | moham3d/tabris-js,mkostikov/tabris-js,mkostikov/tabris-js,softnep0531/tabrisjs,softnep0531/tabrisjs,pimaxdev/tabris,pimaxdev/tabris,eclipsesource/tabris-js,moham3d/tabris-js,eclipsesource/tabris-js,eclipsesource/tabris-js | examples/jquery/http-request.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\njQuery(function(){\n var body = jQuery('body');\n var settings_path = body.data('settings-path');\n\n body.on('settingssave', function( event, key_or_settings, value )\n {\n if (!settings_path)\n {\n ... | javascript | edit | 0 | 3 | mit | 7749879e6c083bd9c5c4d5fc2244399c3cd5e861 | cubesystems/releaf,cubesystems/releaf,graudeejs/releaf,graudeejs/releaf,cubesystems/releaf,graudeejs/releaf | releaf-core/app/assets/javascripts/releaf/include/store_settings.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport path from 'path';\nimport webpack from 'webpack';\nimport config from '../webpack.config';\n\ndescribe('example', () => {\n it('combines loader results into one object', () =>\n new Promise(resolve => {\n webpack(config,... | javascript | edit | 0 | 1 | mit | 4ccd6bf73b26f9910827bf5bd487bcd30e0b24c0 | elliottsj/combine-loader | example/__tests__/example-test.js | rejected_duplicate | Near-duplicate of sample 80989 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\n'use strict';\n\nvar pkg = require('../package.json')\nvar cli = require('commander');\n\nvar fs = require('fs');\nvar path = require('path');\nvar spawn = require('child_process').spawn;\n\ncli\n .version( p... | javascript | edit | 0 | 2 | mit | 0fa905726bc545f6809aac20c7a3c8579dadb647 | simonsinclair/collider-cli | bin/collider-run.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function () {\n \"use strict\";\n if (window.ol && ol.source && !ol.source.VectorEventType) {\n // HACK: monkey patch event types not present in current OL6 repackage build\n // @see https://github.com/openlayers/op... | javascript | edit | 0 | 12 | mit | 42e2cac9631969f51352f1c1d04cde129caa0dee | mapbender/mapbender-digitizer,mapbender/mapbender-digitizer | Resources/public/ol6-compat.js | rejected_complexity | Cyclomatic complexity too high: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = /* glsl */ `\n#if !defined(USE_TANGENTS) && (defined(USE_NORMAL_MAP) || defined(USE_CLEAR_COAT_NORMAL_MAP))\n //http://www.thetenthplanet.de/archives/1180\n mat3 cotangentFrame(vec3 N, vec3 p, vec2 uv) {\n // get e... | javascript | edit | 0 | 0 | mit | 83c53032c97e74bff2ba97f1a798ab28cad6f31d | pex-gl/pex-renderer,pex-gl/pex-renderer | shaders/chunks/normal-perturb.glsl.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*!\n{\n \"name\": \"CSS Animations\",\n \"property\": \"cssanimations\",\n \"caniuse\": \"css-animation\",\n \"polyfills\": [\"transformie\", \"csssandpaper\"],\n \"tags\": [\"css\"],\n \"warnings\": [\"Android < 4 will pass this... | javascript | edit | 0 | 1 | mit | 7783b4bc586b8522cfe5f516c90051133e06fe84 | Modernizr/Modernizr,Modernizr/Modernizr | feature-detects/css/animations.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from \"react\";\nimport styled from \"styled-components\";\n\nimport { Row, RowContent, ColumnContainer } from \"../SharedComponents.js\";\n\nimport Loading from \"../loading.js\";\n\nimport List from \"./Lis... | javascript | edit | 0 | 3 | mit | c6bf12e83cdf792c986b3fc4348a0165fe569e8a | Tejpbit/talarlista,Tejpbit/talarlista,Tejpbit/talarlista | frontend/src/Lists/ListsView.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n'use strict';\nconst program = require('commander');\nconst addLineNumbers = require('add-line-numbers');\nconst fs = require('fs');\nconst listAndRun = require('./list-and-run').listAndRun;\nconst path = '/tmp/te';... | javascript | edit | 0 | 0 | mit | cf530df7cebd995e5742b4be488fa3c765d267e6 | gudnm/te | te-append.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\n * Copyright 2013, All Rights Reserved.\n *\n * Code licensed under the BSD License:\n * https://github.com/node-gh/gh/blob/master/LICENSE.md\n *\n * @author Zeno Rocha <<EMAIL>>\n * @author Eduardo Lundgren <<EMAIL>>\n */\n\nmodule... | javascript | edit | null | null | bsd-3-clause | 84c100bbd0fb6749fdcef577690d85beb7aebd34 | henvic/gh,TomzxForks/gh,modulexcite/gh,oouyang/gh,oouyang/gh,TomzxForks/gh,tomzx/gh,dustinryerson/gh,modulexcite/gh,henvic/gh,tomzx/gh,dustinryerson/gh | Gruntfile.js | rejected_syntax | Syntax error detected by tree-sitter | false |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function() {\n\n $(\"#progress\").on('submit', '.new_rating', function(event) {\n event.preventDefault();\n const $form = $(this),\n url = $form.attr('action'),\n method = $form.attr('method'),... | javascript | edit | 0 | 1 | mit | 6da644a00f47a7bf6a238ebed701d8b8677316b9 | AliasHendrickson/progress,AliasHendrickson/progress,AliasHendrickson/progress | app/assets/javascripts/rating_form.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,\n// or v... | javascript | edit | 0 | 1 | mit | a8994cdafba3a7f550ea5507530a06a056313dd2 | fma2/nyc-high-school-programs,fma2/nyc-high-school-programs | app/assets/javascripts/application.js | rejected_duplicate | Near-duplicate of sample 67416 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport $ from 'jquery';\n\nexport default function() {\n const $mobileMenuTrigger = $('[data-mobilemenu]');\n const $header = $('.header');\n const headerHeight = $('.header').outerHeight();\n const $mobileMenu = $('#mobile-... | javascript | edit | 0 | 2 | mit | 79f3d9a6a7ca614dce7fb0444d3799d9d55f198c | aaronrodier84/flukerfarms,juancho1/bauhaus,PascalZajac/cornerstone,bigcommerce/stencil,PeteyRev/ud-revamp,aaronrodier84/rouxbrands,bigcommerce/stencil,mcampa/cornerstone,rho1140/cornerstone,ovsokolov/dashconnect-bc,mcampa/cornerstone,PeteyRev/ud-revamp,juancho1/bauhaus,bc-annavu/stencil,aaronrodier84/rouxbrands,mcampa/... | assets/js/theme/global/mobile-menu.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nmodule.exports = function setLastUpdatedTimeToLayergroup () {\n return function setLastUpdatedTimeToLayergroupMiddleware (req, res, next) {\n const { mapConfigProvider, analysesResults } = res.locals;\n ... | javascript | edit | 0 | 4 | bsd-3-clause | 9c21194c68654e2152d70a28cc9261b13a2035a4 | CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb,CartoDB/Windshaft-cartodb | lib/api/middlewares/last-updated-time-layergroup.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport jwtDecode from 'jwt-decode';\nimport styles from './styles.scss';\n\nimport Login from './Login';\nimport Sig... | javascript | edit | 0 | 4 | mit | 9557e87a24a1b6d33cef2bce1231f9d9b2a35602 | cdiezmoran/AlphaStage-2.0,cdiezmoran/AlphaStage-2.0 | app/components/Auth/Auth.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nPosts = new Mongo.Collection('posts');\n\nPosts.allow({\n insert: function(userId, doc) {\n // only allow posting if you are logged in\n return !! userId;\n }\n});\n```\n\nApply this change: Use Meteor.methods to set up post (in... | javascript | edit | 0 | 1 | mit | a081e1554614ac92aebe31b0dd514a12484d4ece | drainpip/music-management-system,drainpip/music-management-system | app/lib/collections/posts.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport _ from 'lodash';\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport { Link } from 'react-router-dom';\nimport { fetchPosts } from '../actions';\n\n\nclass PostsIndex extends React.Component {\n component... | javascript | edit | 0 | 1 | mit | 1e1e1e351b3d0a9f4f824e5392de8afea93d5ffe | monsteronfire/redux-learning-blog,monsteronfire/redux-learning-blog | src/components/posts_index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/**\n * Testing includes\n */\n\nvar should = require('should');\n\n/**\n * Unit under test\n */\n\nvar mqtt = require('../lib/mqtt');\n\ndescribe('mqtt', function() {\n describe('#createClient', function() {\n it('should return an ... | javascript | edit | 0 | 1 | mit | fbae2755bb25ef803cd3508448cb1646868a6618 | itavy/MQTT.js,bqevin/MQTT.js,AdySan/MQTT.js,mcanthony/MQTT.js,yunba/MQTT.js,jaambee/MQTT.js,daliworks/MQTT.js,jdiamond/MQTT.js,wesley1001/MQTT.js,authere/MQTT.js,RangerMauve/MQTT.js,1248/MQTT.js | test/mqtt.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nvar OCL = require('openchemlib');\n\nmodule.exports = function getConnectivityMatrix(options={}) {\n var {\n sdt,\n mass\n } = options;\n\n this.ensureHelperArrays(OCL.Molecule.cHelperNeighbours);... | javascript | edit | 0 | 7 | bsd-3-clause | 41db6cf165dd083d3b284c961c128db609fcad81 | cheminfo-js/openchemlib-extended | src/extend/getConnectivityMatrix.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n;(function() {\n \"use strict\";\n\n angular.\n module(\"bookApp\").\n component(\"bookApp\", {\n template: `\n <div class=\"nav\"><a href=\"new-book\">Add new book</a></div>\n\n <div class=\"book-container\" ... | javascript | edit | 0 | 2 | mit | 94bc6236e23440d4f3958e601d0ab880b17d09de | fejs-levelup/angular-bookshelf,fejs-levelup/angular-bookshelf | public/js/book-app/components/book-app.component.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n\nfunction doAjax(options, retries, dfr) {\n $.ajax(options).pipe(function(data) {dfr.resolve(data);}, function(jqXhr) {\n if (retries > 0) {\n setTimeout(doAjax, 100, options, retries - 1, dfr);\n } else {\n dfr.reject... | javascript | edit | 0 | 2 | mit | d3017cbcd542cc5c310d23c0bd478eae10ceef32 | fallenswordhelper/fallenswordhelper,fallenswordhelper/fallenswordhelper | src/modules/ajax/retryAjax.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*jslint indent: 2, plusplus: true */\n/*global $: false, document: false, togglbutton: false, createTag:false, window: false, MutationObserver: false */\n'use strict';\n\n// Individual Work Item & Backlog page\ntogglbutton.render('.wit... | javascript | edit | 0 | 3 | bsd-3-clause | af38d84173285c9ee1203a4cb468a068ae15e2d7 | glensc/toggl-button,glensc/toggl-button,glensc/toggl-button | src/scripts/content/visualstudio.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(grunt) {\n grunt.initConfig({\n pkg : grunt.file.readJSON( 'package.json' ),\n env: {\n casper: {\n BASEURL: \"http://www.google.com\",\n PATH: \"/usr/local/sbin:/usr/local/bin:/usr/sb... | javascript | edit | 0 | 1 | mit | 2818b0138520fbb0e9702cddef9e5d121b8f5ad1 | smlgbl/grunt-casperjs-extra | Gruntfile.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (<EMAIL>), Duncan Mitchell (<EMAIL>), or Johannes Kinder (<EMAIL>) for details or support | LICENSE.md for license details */\n\n\"use strict\";\n\nimport {spa... | javascript | edit | 0 | 1 | mit | b68b04de0eec208ca389f93b271a52b3db5b8ed7 | ExpoSEJS/ExpoSE,ExpoSEJS/ExpoSE,ExpoSEJS/ExpoSE | Tester/src/Tester.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nlet zlib = require('zlib'),\n NBT = require('kld-nbt'),\n Tag = NBT.Tag,\n ReadBuffer = NBT.ReadBuffer;\n\nmodule.exports = class Chunk {\n constructor() {\n this.data = null;\n }\n \n static loadCompressedCh... | javascript | edit | 0 | 7 | bsd-3-clause | b7fcfc3e333218e30e10187523176d45b6bd297d | thelonious/kld-mc-world | lib/Chunk.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n function selector(v) {\n return '[touch-action=\"' + v + '\"]';\n }\n function rule(v) {\n return '{ -ms-touch-action: ' + v + '; touch-action: ' + v + '; }';\n }\n var attrib2css = [\n {\n rule: 'none... | javascript | edit | 0 | 2 | bsd-3-clause | d4ca275b1229942dca73b4c4ed27a50f893dd6c9 | roblarsen/pointer-events.js | src/touch-action.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// Display Trial Data for debugging\nangular.module('core').directive('displayTrialData', function() {\n return {\n restrict: 'AE',\n template: '<div><h3>Trial Data</h3><pre>Subject: {{trialDataJson()}}</pre></di... | javascript | edit | 0 | 1 | mit | a73401e5c10457066171a9ee5060363163ea4e7b | brennon/eim,brennon/eim,brennon/eim,brennon/eim | public/modules/core/directives/display-trial-data.client.directive.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nexport default (app, route) => {\n route.named('hello')\n .maps('/hello')\n .to('hello:index')\n\n route.named('foo').maps('/foo/{bar}').to(async (req, res, {bar}) => {\n res.end(`Foo: ${bar}`)\n })\n\n route.mounted('/bar'... | javascript | edit | 0 | 1 | mit | 46dd15ee2eef96cd693cea63d4a06b1056533356 | CHH/learning-node,CHH/learning-node | app/config/routes.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = () => ({\n plugins: {\n 'postcss-easy-import': {\n extensions: [\n '.pcss',\n '.css',\n '.postcss',\n '.sss'\n ]\n },\n 'stylelint': {\n configFile: '.stylelintrc'\n ... | javascript | edit | 0 | 1 | mit | 899639def4990c5524d0ca462ebf8f6ab4ca59f5 | PolymerX/polymer-skeleton,PolymerX/polymer-skeleton | postcss.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nconst path = require('path');\nconst webpack = require('webpack');\nconst WebpackNotifierPlugin = require('webpack-notifier');\nconst styleLintPlugin = require('stylelint-webpack-plugin');\nconst autoprefixer = require('autoprefixer');\... | javascript | edit | 0 | 0 | mit | c40d33e07a2e835f67bbe10e0bad9ceb66bbbf67 | nazaninreihani/binary-next-gen,nazaninreihani/binary-next-gen,nuruddeensalihu/binary-next-gen,binary-com/binary-next-gen,nuruddeensalihu/binary-next-gen,nuruddeensalihu/binary-next-gen,nazaninreihani/binary-next-gen,binary-com/binary-next-gen,binary-com/binary-next-gen | webpack.config.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { Store } from 'consus-core/flux';\nimport StudentStore from './student-store';\n\nlet checkouts = [];\nlet checkoutsByActionId = new Object(null);\n\nclass CheckoutStore extends Store {\n\n getCheckoutByActionId(actionId) {\n... | javascript | edit | 0 | 2 | unlicense | a7a6a8b5ea4a82660bb0ac7ed290e3d7a6b5c89b | TheFourFifths/consus,TheFourFifths/consus | src/store/checkout-store.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n// scripts-model.js - A mongoose model\n// \n// See http://mongoosejs.com/docs/models.html\n// for more of what you can do here.\n\nconst mongoose = require('mongoose');\nconst Schema = mongoose.Schema;\n\nconst scripts... | javascript | edit | 0 | 0 | mit | 92e0b46c931e5aa3189db50ad758d5db00cbda9f | andreagoulet/callmyreps,andreagoulet/callmyreps,andreagoulet/callmyreps,andreagoulet/callmyreps,andreagoulet/callmyreps | server/src/services/scripts/scripts-model.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction DomStorage() {\r\n\tvar cache = {};\r\n\tfunction getFromCache(selector){\r\n\t\tif(!cache[selector]){\r\n\t\t\tcache[selector] = $(selector);\r\n\t\t}\r\n\t\treturn cache[selector];\r\n\t}\r\n\tfunction updateInCache(selector)... | javascript | edit | null | null | mit | e3e031e4634522e0764a722ad37791c9913ce1cd | kounelios13/Dom-Storage,kounelios13/Dom-Storage | domStorage.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 gulp = require('gulp');\n\nvar $ = require('gulp-load-plugins')();\n\nvar wiredep = require('wiredep');\n\ngulp.task('test', function () {\n var bowerDeps = wiredep({\n directory: 'app/bower_components',\n ex... | javascript | edit | 0 | 1 | mit | 49b7b66ac4c3c40893e53e244a2cba7d915d235d | tvararu/angular-famous-playground | gulp/unit-tests.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// The Vue build version to load with the `import` command\n// (runtime-only or standalone) has been set in webpack.base.conf with an alias.\nimport Vue from 'vue'\nimport Router from 'vue-router'\nimport App from './App'\nimport Home f... | javascript | edit | 0 | 1 | isc | 3a1ea1dce763b04c46d2e13e39782d3249aa493f | Zulko/eagle.js | example/src/main.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React from 'react';\nimport Select from './Select';\n\nfunction reduce(obj, props = {}){\n return Object.keys(obj)\n .reduce((props, key) => {\n const value = obj[key];\n if (value !== undefined) props[key] = value;\n ... | javascript | edit | 0 | 2 | mit | feabc4db34f6a1b15972f1c77306e83a53d61914 | submittable/react-select,serkanozer/react-select,OpenGov/react-select,mmpro/react-select,f-camacho/react-select,JedWatson/react-select,mobile5dev/react-select,JedWatson/react-select | src/AsyncCreatable.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/*\nrequestFrame / cancelFrame\n*/\"use strict\"\n\nvar array = require(\"prime/es5/array\")\n\nvar requestFrame = global.requestAnimationFrame ||\n global.webkitRequestAnimationFrame ||\n global.mozR... | javascript | edit | 0 | 3 | mit | 1e615e33dc380729cfcf7ab52177c6a38dcf8b36 | dehenne/moofx,dehenne/moofx,kamicane/moofx | lib/frame.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n$(document).ready(function () {\n\n $(\".menu-btn a\").click(function () {\n $(\".overlay\").fadeToggle(200);\n $(this).toggleClass('btn-open').toggleClass('btn-close');\n });\n\n $('.overlay').on('click', functio... | javascript | edit | 0 | 1 | mit | 9bb7d328e9e64eead6af6bb0ff06dc147ceed2d0 | marioloncarek/responsive-overlay-menu,marioloncarek/responsive-overlay-menu | js/responsive-overlay-menu.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nfunction deepEqual(obj1, obj2) {\n if (typeof obj1 != \"object\" || obj1 == null ||\n typeof obj2 != \"object\" || obj2 == null) return obj1 === obj2;\n\n let keys1 = Object.keys(obj1), keys2 = Object.keys(obj2);\n\n if ... | javascript | edit | 0 | 6 | mit | 2ee1a0be3b01cc2a3cfbf8d6bc0f17f12dffbecc | bewuethr/ctci | eloquent_js/chapter04/ch04_ex04.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar\n EchoRule = require('../lib/rules/echo.js'),\n Heartbeat = require('../lib/rules/heartbeat.js')\n ;\n\nvar rules = [];\n\nrules.push(new EchoRule());\nrules.push(new Heartbeat());\n\nmodule.exports = rules;\n\n```\n\nAppl... | javascript | edit | 0 | 0 | isc | 1ab6ab7f1e72bad5f39c55110ba65991f23c9df8 | ceejbot/numbat-analyzer,npm/numbat-analyzer,numbat-metrics/numbat-analyzer | examples/ruleset.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function() {\n \"use strict\";\n\n var lastKeys = \"\";\n function fetchRedlines() {\n var baseUrl = $('#baseUrl').val();\n var artworkUrl = $('#artworkUrl').val();\n $.get(baseUrl + 'index').done(function... | javascript | edit | 0 | 2 | bsd-3-clause | 936735753f179190f6391f1b2105246e4d10cdab | Nullreff/redline,Nullreff/redline,Nullreff/redline | public/js/view.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar electron = require('electron'); // Module to control application life.\nvar process = require('process');\nconst {app} = electron;\nconst {BrowserWindow} = electron;\nlet win; // Ensure that our win isn't garbage collected\n\napp.... | javascript | edit | 0 | 2 | mit | 36b78042d3f5d38bb7ca96adb6cb1c0ae40deb49 | NoahAndrews/qmk_firmware_flasher,NoahAndrews/qmk_firmware_flasher,NoahAndrews/qmk_firmware_flasher | main.js | rejected_duplicate | Near-duplicate of sample 68907 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nvar browserify = require('browserify-middleware')\nvar babelify = require('babelify')\n\nmodule.exports = function (entries, brOptions, baOptions) {\n brOptions = brOptions || {}\n brOptions.transform = brOptions.transform || []\n ba... | javascript | edit | 0 | 5 | mit | e8f93882daad04d6a74c864ac2c32d301c199254 | luisfarzati/express-babelify-middleware,luisfarzati/express-babelify-middleware | lib/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n/* Define your initial state here.\n *\n * If you change the type from object to something else, do not forget to update\n * src/container/App.js accordingly.\n */\nconst initialState = {};\n\nmodule.exports = function(state = initialSt... | javascript | edit | 0 | 2 | mit | 649c9c09c9a66e085b33346f5062976801543423 | stylesuxx/generator-react-webpack-redux,stylesuxx/generator-react-webpack-redux | examples/routing/src/reducers/user.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport config from '../config'\nimport server from '../server/main'\nimport _debug from 'debug'\n\nconst debug = _debug('app:bin:server')\nconst port = config.server_port\nconst host = config.server_host\n\nserver.listen(port)\ndebug(`S... | javascript | edit | 0 | 0 | mit | 3ff467f3c1a3c5c9ea911403373229650760850e | josedab/react-redux-i18n-starter-kit,josedab/react-redux-i18n-starter-kit | bin/server.js | rejected_duplicate | Near-duplicate of sample 108398 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nmodule.exports = function(target) {\n if (tasks[target])\n console.log(tasks[target].help)\n else\n console.log(\"No help documentation exists for \" + target + \".\")\n}\n```\n\nApply this change: Load markdown docs in help com... | javascript | edit | 0 | 2 | mit | fc1a61eb29f6cd38f1694fda155a8173432d1999 | YWebCA/ywca-cli | tasks/help/index.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\n\nvar _ = require('lodash');\n\n\n//\n// Observe quicksearch focus to tweak icon style\n//\nN.wire.once('navigate.done', function () {\n $('.navbar-search .search-query')\n .focus(function () { $(this).next('div').a... | javascript | edit | 0 | 3 | mit | e1ee7a46a12715ce5d8bcfc7bf3180a6b254f228 | nodeca/nodeca.core,nodeca/nodeca.core | client/common/layout/layout.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n(function(document, MazeGenerator, MazePainter, MazeInteraction) {\n 'use strict';\n\n // DOM Elements\n var canvas = document.getElementById('maze');\n var bGenerate = document.getElementById('bGenerate');\n var bSolve = document.... | javascript | edit | 0 | 2 | mit | 521eed5e6a64f1bf28210d03372cdbb353bb019e | jghinestrosa/maze-generator,jghinestrosa/maze-generator | scripts/script.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n// -------------------------------------------------------------------------- \\\\\n// File: RegExp.js \\\\\n// Module: Core ... | javascript | edit | 0 | 0 | mit | 94863a27ba7fccb8236592c5b046ad32d7b48341 | adityab/overture,Hokua/overture,linagora/overture,linagora/overture,fastmail/overture | source/Vibrato/core/RegExp.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport React, { Component } from 'react'\nimport firebase, { reference, signIn } from '../firebase';\nimport { pick, map, extend } from 'lodash';\nimport Input from './Input';\nimport MessageContainer from './MessageContainer';\n// impo... | javascript | edit | 0 | 2 | mit | 6e73dbf020236063f8db213f2459c4d56fa2f661 | mlimberg/shoot-the-breeze,mlimberg/shoot-the-breeze | lib/components/Application.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nangular\n .module('ngSharepoint.Lists')\n .factory('JSOMConnector', function($q, $sp) {\n return ({\n getLists: function() {\n return $q(function(resolve, reject) {\n var context... | javascript | edit | 0 | 2 | apache-2.0 | d77f875ffaf501002c30c49ab7c433730a8fce8e | maxjoehnk/ngSharepoint | src/modules/lists/components/connector/jsomConnector.service.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\nimport { TextNode, TEXT } from 'substance'\n\nexport default class Heading extends TextNode {}\nHeading.schema = {\n type: 'heading',\n level: { type: 'number', default: 1 },\n content: TEXT()\n}\n\n```\n\nApply this change: Allow an... | javascript | edit | 0 | 0 | mit | c3da45397839ff6e5857b6413471ca64fac99b54 | substance/texture,substance/texture | src/article/models/Heading.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n#!/usr/bin/env node\n\nvar cp = require('child_process')\nvar fs = require('fs')\nvar path = require('path')\n\nvar script = path.join(__dirname, 'postinstall')\nif (process.platform === 'win32') {\n script += '.cmd'\n} else {\n scrip... | javascript | edit | 0 | 0 | mit | ee3544448dc1755c99b10e0afe52d295deffbdd8 | atom/apm,atom/apm,atom/apm,atom/apm | script/postinstall.js | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```javascript\n'use strict';\n\nlet fs = require('fs'),\n path = require('path'),\n Promise = require('bluebird'),\n filters = require('./filters');\n\nPromise.promisifyAll(fs);\n\n/*\n Find and parse any browser scripts in rootFolder.\n Returns a ... | javascript | edit | 0 | 1 | apache-2.0 | 36d7c61c7d6f7c6dc4e9bb9191f20890ab148e8c | sitespeedio/browsertime,tobli/browsertime,sitespeedio/browsertime,sitespeedio/browsertime,sitespeedio/browsertime | lib/support/browser_script.js | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.