conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix for readonly hash args\n" }, { "from": "human", "value": "import { helper } from '@ember/component/helper';\nimport config from '../config/environment';\nimport { shaRegExp, versionRegExp, versionExtendedRegExp } from 'ember-cli-app-version/utils/regexp';\n\ncon...
javascript
chosen
[ { "from": "system", "value": "Set friendly delay for cleanup alarm\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2017. Stephan Mahieu\n *\n * This file is subject to the terms and conditions defined in\n * file 'LICENSE', which is part of this source code package.\n */\n\nclass Cleanup...
javascript
chosen
[ { "from": "system", "value": "Set up strict lint options.\n" }, { "from": "human", "value": "/*global desc, task, jake, fail, complete */\n\n\"user strict\";\n\ntask(\"default\", [\"lint\"]);\n\ndesc(\"Lint everything\");\ntask(\"lint\", [], function(){\n var lint = require(\"./build/lint/lint_...
javascript
chosen
[ { "from": "system", "value": "[CS] Stop depending on \"logs\" directory\n\nIt's not necessarily going to be there.\n" }, { "from": "human", "value": "/**\n * New Relic agent configuration.\n *\n * See lib/config.defaults.js in the agent distribution for a more complete\n * description of configu...
javascript
chosen
[ { "from": "system", "value": "Use 8001 port instead of 8000 to be reverse proxied over 9090\n" }, { "from": "human", "value": "/*\nThis script runs a reverse proxy on http://localhost:9090/ to the actual backend http://localhost:8000/aws-mock/ec2-endpoint/\n*/\n\n'use strict';\n\nvar httpProxy =...
javascript
chosen
[ { "from": "system", "value": "Fix bug global leaks, `;` to `,`\n" }, { "from": "human", "value": "(function (tree) {\n\ntree.Extend = function Extend(elements, index) {\n this.selector = new(tree.Selector)(elements);\n this.index = index;\n};\n\ntree.Extend.prototype.eval = function Extend...
javascript
chosen
[ { "from": "system", "value": "Make MemoryLocation more useful for the server side rendering\n\nMake locations/memory behave a more like history, respect the\ntrigger: false option which is important when cancelling transitions,\notherwise a redirect loop is caused since after transitions are cancelled\nthe ...
javascript
chosen
[ { "from": "system", "value": "Use gulp default task to build all\n" }, { "from": "human", "value": "var path = require('path');\n\nvar gulp = require('gulp');\nvar $ = require('gulp-load-plugins')();\nvar bower_components = require('main-bower-files')();\n\nvar gopath = function() {\n var gpm_d...
javascript
chosen
[ { "from": "system", "value": "Clean up from loging/new tab\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular.module('sslv2App')\n .controller('DashboardCtrl', DashboardCtrl);\n\n DashboardCtrl.$inject = ['$state', '$cookies'];\n\n function DashboardCtrl($state, ...
javascript
chosen
[ { "from": "system", "value": "Add the simplest of simple `alert` error handling\n" }, { "from": "human", "value": "\"use strict\";\n\nvar saveRow = require('../templates/save_row.html')();\n\nmodule.exports = {\n events: {\n 'click .save-item': '_handleSave'\n },\n render: function () {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix scan time ordering for tests\n" }, { "from": "human", "value": "function(doc) {\n if (doc.type === \"child\" && doc.scan_status !== 'scan_complete' && doc.domain === \"uth-rhd\") {\n emit([doc.domain, 'VH014466XK', doc.exam_number, doc.date], doc._id);...
javascript
chosen
[ { "from": "system", "value": "Remove get receipt override for given providers\n" }, { "from": "human", "value": "import { Manager as Web3RequestManager } from 'web3-core-requestmanager';\nimport MiddleWare from '../middleware';\nimport {\n ethSendTransaction,\n ethSign,\n ethSignTransaction,\...
javascript
chosen
[ { "from": "system", "value": "Add space to title variable in Javascript\n" }, { "from": "human", "value": "function setAriaCurrent() {\n\tvar title = document.title;\n\tif title== \"Comunidad hispanohablante de NVDA\" {\n\t\tvar id = \"inicio\"\n\t}\n\tdocument.getElementById(id).removeAttribute...
javascript
chosen
[ { "from": "system", "value": "Replace placeholder countries with real service call\n" }, { "from": "human", "value": "'use strict';\n\nmldsApp.factory('CountryService', ['$http', '$log', '$q', function($http, $log, $q){\n\t\treturn {\n\t\t\tgetCountries: function() {\n\t\t\t\treturn $q.when([\n\...
javascript
chosen
[ { "from": "system", "value": "Add the fucking NewRelic key\n" }, { "from": "human", "value": "/**\n * New Relic agent configuration.\n *\n * See lib/config.defaults.js in the agent distribution for a more complete\n * description of configuration variables and their potential values.\n */\nexpor...
javascript
chosen
[ { "from": "system", "value": "Fix potential bug of referencing super ctor dynamically instead of statically\n" }, { "from": "human", "value": "/*\n * IFrameTransport - Storage Service Extension\n *\n * Use a cookie to capture which key changed for IE8\n * Use a cookie to ignore \"storage\" event...
javascript
chosen
[ { "from": "system", "value": "Fix --proxy argument to ember server\n" }, { "from": "human", "value": "/* global require */\n\nvar gulp = require('gulp'),\n spawn = require('child_process').spawn,\n ember,\n node;\n\n\ngulp.task('server', function () {\n if (node) node.kill(); // Kill ...
javascript
chosen
[ { "from": "system", "value": "Fix isBN not always returning a boolean\n" }, { "from": "human", "value": "'use strict'\n\nvar BN = require('bn.js')\n\nmodule.exports = isBN\n\n//Test if x is a bignumber\n//FIXME: obviously this is the wrong way to do it\nfunction isBN(x) {\n return x && typeof x...
javascript
chosen
[ { "from": "system", "value": "Add axios request to breweryDB through our API endpoint\n" }, { "from": "human", "value": "'use strict';\n\nconst axios = require('axios');\n\n// const Post = require('./postModel')\nconst _API_KEY = require('../config/apiKeys.js').breweryDBKey;\nconst _API_ENDPOINT...
javascript
chosen
[ { "from": "system", "value": "Add support for converting arrays\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Attempts to convert object properties recursively to numbers.\n * @param {Object} obj - Object to iterate over.\n * @param {Object} options - Op...
javascript
chosen
[ { "from": "system", "value": "Define the way transitions work\n" }, { "from": "human", "value": "/*jslint indent: 2, nomen: true, maxlen: 100 */\n/*global require, applicationContext */\n\n(function () {\n \"use strict\";\n var FoxxGenerator = require('./foxx_generator').Generator,\n genera...
javascript
chosen
[ { "from": "system", "value": "Remove unused function along with unused cluster module\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Module dependencies\n */\n\n// Node.js core.\nconst cluster = require('cluster');\n\n// Public node modules.\nconst async = require('async');\n\n/**\n...
javascript
chosen
[ { "from": "system", "value": "Add alias for the extension path\n" }, { "from": "human", "value": "import path from 'path';\nimport webpack from 'webpack';\n\nconst srcPath = path.join(__dirname, '../src/browser/');\n\nconst baseConfig = ({input, output = {}, globals = {}, plugins, loaders, entry...
javascript
chosen
[ { "from": "system", "value": "Fix stop video on modal close\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport YTPlayer from 'youtube-player';\nimport styles from './Modal.scss';\n\nlet player;\n\nconst Modal = ({ title, isGallery, trailerI...
javascript
chosen
[ { "from": "system", "value": "Update resource to use public url (temporary)\n" }, { "from": "human", "value": "angular.module('SceneSkeleton')\n\t.factory(\"Scene\", function($resource) {\n\t\treturn $resource(\"http://dockervm:8081/scene/:id\");\n\t});" }, { "from": "gpt", "value": ...
javascript
chosen
[ { "from": "system", "value": "Add gray transition to level end\n" }, { "from": "human", "value": "'use strict';\n\nconst\n eventBus = require('./event-bus');\n\nconst\n totalTime = 3000, // ms\n intensity = 0.75;\n\nclass LevelEnding {\n\n constructor(stage, renderer) {\n this...
javascript
chosen
[ { "from": "system", "value": "[ADD] Add base components to Race dashboard\n" }, { "from": "human", "value": "import React from 'react';\nimport { connect } from 'react-redux';\nimport { Redirect } from 'react-router-dom';\nimport Base from '../components/Base';\nimport HelpMenu from '../componen...
javascript
chosen
[ { "from": "system", "value": "Trim slug before inserting dashes\n\n" }, { "from": "human", "value": "export const liveRootUrl = 'https://bolg-app.herokuapp.com/posts/';\n\nexport const states = {\n LOADING: 0,\n EDITING: 1,\n SAVED: 2,\n ERROR: 3,\n EDITING_OFFLINE: 4,\n SAVED_OFFLINE: 5,\...
javascript
chosen
[ { "from": "system", "value": "Remove double slash from path\n\nThe slash after content caused a double slash in the resulting path, standalone could not be loaded in a simple Android WebView app. See detailed error description here: https://h5p.org/node/104774\r\n\r\nThanks for providing!" }, { "fro...
javascript
chosen
[ { "from": "system", "value": "fix(scene): Remove scene causes no error anymore\n\nfix #86\n" }, { "from": "human", "value": "import { LitElement, html } from 'lit-element'\nimport { links } from '../../styles/links.js'\n\n/*\n * A fixture list item\n */\nclass FixtureListItem extends LitElement ...
javascript
chosen
[ { "from": "system", "value": "Revert \"Fallback to other things when keyCode is not available\"\n\nThis reverts commit 016d44a851fd3bcc4f5ffeef79431ac53add5e88.\n" }, { "from": "human", "value": "Elm.Native.Keyboard = {};\n\nElm.Native.Keyboard.make = function(localRuntime) {\n\tlocalRuntime.Nat...
javascript
chosen
[ { "from": "system", "value": "Fix bug introduced from messed up merge.\n" }, { "from": "human", "value": "'use strict';\n\nconst Handlers = require('../util').Handlers;\nconst Err = require('../util').Err;\nconst VerifyHeaders = require('../util').VerifyHeaders;\n\nexports.attach = function(app,...
javascript
chosen
[ { "from": "system", "value": "Fix picked color sometimes undefined\n" }, { "from": "human", "value": "\nvar squares = document.querySelectorAll(\".square\");\n\nvar colors = [];\nfor (var i = squares.length - 1; i >= 0; i--) {\n colors.push(getRandomRGB());\n}\n\nvar pickedColor = colors[getRan...
javascript
chosen
[ { "from": "system", "value": "Improve error message for indexing null/undefined.\n" }, { "from": "human", "value": "'use strict';\n\nconst Value = require('../Value');\nconst BridgeValue = require('./BridgeValue');\nconst CompletionRecord = require('../CompletionRecord');\n\nclass EmptyValue ext...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary timeout from tests\n" }, { "from": "human", "value": "import webdriver from 'selenium-webdriver';\n\nexport function check(done, func) {\n try {\n func();\n } catch (ex) {\n done(ex);\n }\n}\n\nexport function doBefore(done, action, load ...
javascript
chosen
[ { "from": "system", "value": "Use const instead of var\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n/**\n *\n * @typedef {{\n * cwd: string,\n * require: Array,\n * configNameSearch: string[],\n * configPath: string,\n * configBase: string,\n * modulePath: string,\n * moduleP...
javascript
chosen
[ { "from": "system", "value": "Enable elda to persist her own memories\n" }, { "from": "human", "value": "function configure(memory, network) {\n\n function write() {\n console.log('Write neural network to file system');\n return buildIndex(network).then(writeFiles);\n }\n\n function bui...
javascript
chosen
[ { "from": "system", "value": "Configure the size of the conkeror completions buffer\n" }, { "from": "human", "value": "// Load URLs from the command line in new buffers instead of new\n// windows.\nurl_remoting_fn = load_url_in_new_buffer;\n\n// Load download buffers in the background in the cur...
javascript
chosen
[ { "from": "system", "value": "Apply Common Upgrade to Popover classes\n" }, { "from": "human", "value": "\n// ----------------------------------------------------------------\n// Popover Class\n\nclass PopoverModel extends CommonModel {\n constructor({\n name = 'Popover',\n selector = nul...
javascript
chosen
[ { "from": "system", "value": "Use import instead of require" }, { "from": "human", "value": "/** @babel */\n\nconst {Disposable, CompositeDisposable} = require('atom')\nconst ViewURI = 'atom://deprecation-cop'\nlet DeprecationCopView\n\nclass DeprecationCopPackage {\n activate () {\n this.di...
javascript
chosen
[ { "from": "system", "value": "Test commit for account change\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport { Text, Image, View } from 'react-native';\nimport styles from './styles/ActorsMoviesStyle';\nimport ActorImage from '../components/ActorImage';\nimpo...
javascript
chosen
[ { "from": "system", "value": "Add Test send message success test case\n" }, { "from": "human", "value": "'use strict';\n\nvar express = require('express');\nvar request = require('supertest');\nvar logger = require('log4js').getLogger('Unit-Test');\n\n\nexports['Test recevie message'] = function...
javascript
chosen
[ { "from": "system", "value": "[Biography] Fix truncation + Replace born with abbreviation\n" }, { "from": "human", "value": "/* @flow */\n'use strict';\n\nimport Relay from 'react-relay';\nimport React from 'react';\nimport { View, Text, Dimensions } from 'react-native';\n\nimport removeMarkdown...
javascript
chosen
[ { "from": "system", "value": "Make sentence make more sense\n" }, { "from": "human", "value": "/**\n * app.js\n *\n * Use `app.js` to run your app in environments where `sails lift` is not available.\n * To start the server, run: `node app.js`.\n *\n * The same command-line arguments as sails li...
javascript
chosen
[ { "from": "system", "value": "Maintain the current context `this` context when giving the module its own scope\n" }, { "from": "human", "value": "(function() {\n function chaingun(obj) {\n function _chained_(v) {\n function _chain_() { return curr; }\n\n var curr = v;\n if (ty...
javascript
chosen
[ { "from": "system", "value": ":bug: Replace deprecated node type simpleSelector with selector\n" }, { "from": "human", "value": "'use strict';\n\nvar helpers = require('../helpers');\n\nmodule.exports = {\n 'name': 'placeholder-in-extend',\n 'defaults': {},\n 'detect': function (ast, parser) ...
javascript
chosen
[ { "from": "system", "value": "FIx translation preview for detected language\n" }, { "from": "human", "value": "import React from 'react';\nimport icon from './icon.png';\nimport translate from './translate';\nimport detectLanguage from './detectLanguage';\nimport toLanguageCode from './toLanguag...
javascript
chosen
[ { "from": "system", "value": "Use toggleModal for headerbar navigation\n" }, { "from": "human", "value": "/**\n * @class Denkmal_Component_HeaderBar\n * @extends Denkmal_Component_Abstract\n */\nvar Denkmal_Component_HeaderBar = Denkmal_Component_Abstract.extend({\n\n /** @type String */\n _cl...
javascript
chosen
[ { "from": "system", "value": "Support Request url in fetch interceptor\n" }, { "from": "human", "value": "import queryString from 'query-string';\nimport parseUrl from 'parse-url';\n\nimport { baseInterceptor } from './baseInterceptor';\nimport { Response as KakapoResponse } from '../Response';\...
javascript
chosen
[ { "from": "system", "value": "Add summary with first two rows implemented\n" }, { "from": "human", "value": "import React from 'react';\n\nexport default ({ modules, serverID }) => (\n <p>Summary not implemented yet</p>\n);\n" }, { "from": "gpt", "value": "import React from 'react';...
javascript
chosen
[ { "from": "system", "value": "Add JSONParser.js to ViewlessModels - working in node again\n" }, { "from": "human", "value": "/**\n * @license\n * Copyright 2012 Google Inc. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this fil...
javascript
chosen
[ { "from": "system", "value": "Add autorun to update resident activities\n" }, { "from": "human", "value": "Template.latestActivitiesByType.created = function () {\n // Create 'instance' variable for use througout template logic\n var instance = this;\n\n // Subscribe to all activity types\n ...
javascript
chosen
[ { "from": "system", "value": "Fix a small syntax error\n" }, { "from": "human", "value": "redactParagraph = Redact.addModule(\n 'paragraph',\n (\n typeof Template != 'undefined'\n ? Template.redactParagraph\n : ''\n ),\n {\n label: 'Paragraph',\n icon: '/redactParagraph.sv...
javascript
chosen
[ { "from": "system", "value": "Remove the devices table for the moment. This is not normalized, but works for the moment :-).\n" }, { "from": "human", "value": "var sqlite3 = require('sqlite3').verbose();\nvar config = require('./data/config.js');\nvar db = new sqlite3.Database(config.getDatabase...
javascript
chosen
[ { "from": "system", "value": "Add plot lines for more time points and fix overlapping text for some that fall on the same time\n" }, { "from": "human", "value": "const vertPlotLine = (epoch, color, text) => ({\n id: text,\n value: epoch * 1000,\n color,\n width: 2,\n label: {\n ...
javascript
chosen
[ { "from": "system", "value": "Move export output directory from files/output to files/export.\n" }, { "from": "human", "value": "module.exports = {\n 'port': 8889,\n 'providers': ['directory', 's3'],\n 'files': __dirname + '/files',\n 'mapfile_dir': __dirname + '/files/.cache',\n ...
javascript
chosen
[ { "from": "system", "value": "Remove enabled filter on clusterTemplates that caused js error\n\nrancher/rancher#20268\n" }, { "from": "human", "value": "import Controller from '@ember/controller';\nimport { computed, get } from '@ember/object';\nimport { inject as service } from '@ember/service'...
javascript
chosen
[ { "from": "system", "value": "Fix error with minified JS\n" }, { "from": "human", "value": "/* This file is part of Indico.\n * Copyright (C) 2002 - 2015 European Organization for Nuclear Research (CERN).\n *\n * Indico is free software; you can redistribute it and/or\n * modify it under the ter...
javascript
chosen
[ { "from": "system", "value": "Include all available log flags, comment out unused ones" }, { "from": "human", "value": "import Resolver from 'resolver';\nimport routerMap from 'bibliaolvaso/router';\n\nvar App = Ember.Application.create({\n LOG_ACTIVE_GENERATION: true,\n LOG_VIEW_LOOKUPS: true...
javascript
chosen
[ { "from": "system", "value": "Add simple logger for request handler (useful with slog)\n" }, { "from": "human", "value": "\"use strict\";\n\nvar store = require_core(\"server/store\");\nvar config = require_core(\"server/config\");\nvar connect = require('connect');\n\nmodule.exports = {\n setu...
javascript
chosen
[ { "from": "system", "value": "Throw error - avoriaz must be run in a browser - if document does not exist\n" }, { "from": "human", "value": "function isDomSelector(str) {\n if (typeof str !== 'string') {\n return false;\n }\n\n try {\n document.querySelector(str);\n return true;\n }...
javascript
chosen
[ { "from": "system", "value": "Fix for in-page anchor links\n" }, { "from": "human", "value": "(function(d) {\n\t\"use strict\";\n\tvar hs = d.getElementById(\"DocumentationText\").querySelectorAll(\"H1, H2, H3\"), h;\n\n\tfor (var i = 0; i < hs.length; i++) {\n\t\th = hs[i];\n\t\tif (h.id != nul...
javascript
chosen
[ { "from": "system", "value": "Clean up OK alarm links\n" }, { "from": "human", "value": "/** @typedef {import('./index').EventBridgeCloudWatchAlarmsEvent} EventBridgeCloudWatchAlarmsEvent */\n\nconst urls = require('./urls');\n\nmodule.exports = {\n /**\n * @param {EventBridgeCloudWatchAlarms...
javascript
chosen
[ { "from": "system", "value": "Add clean task and comments\n" }, { "from": "human", "value": "module.exports = function(grunt){\n\n\tgrunt.initConfig({\n\t\tuglify: {\n\t\t\toptions: {\n\t\t\t\tmangle: true,\n\t\t\t\tcompress: true,\n\t\t\t\tsourceMap: \"dist/application.map\",\n\t\t\t\tbanner: \...
javascript
chosen
[ { "from": "system", "value": "Add rounding to numeric computation input fields.\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react';\nimport { Field, FieldArray } from 'redux-form';\n\nimport ComputationFieldBasic from '../computation-field-basic';\nimport ComputationFiel...
javascript
chosen
[ { "from": "system", "value": "Set HomePage to use preact layout\n" }, { "from": "human", "value": "import { h } from 'preact' /** @jsx h */\nimport { connect } from 'preact-redux'\nimport ButtonPrimary from '../components/ButtonPrimary'\nimport * as MenuActions from '../../menu/redux/action-crea...
javascript
chosen
[ { "from": "system", "value": "chore: Write alias in a better way\n\nNo need to call a function for this.\n" }, { "from": "human", "value": "import * as path from \"path\";\nimport _ from \"lodash\";\nimport rimraf from \"rimraf\";\n\nimport prettyConsole from \"./libs/pretty_console\";\nimport b...
javascript
chosen
[ { "from": "system", "value": "Validate cookie contains known locale when initialising the store\n" }, { "from": "human", "value": "import Cookies from 'js-cookie'\nimport * as types from '../mutation-types'\n\nconst { locale, locales } = window.config\n\n// state\nexport const state = {\n local...
javascript
chosen
[ { "from": "system", "value": "Change default for env execOption to null\n" }, { "from": "human", "value": "\n'use strict';\n\nvar glob = require('glob'),\n _ = require('underscore'),\n ParallelExec = require('./lib/ParallelExec'),\n BehatTask = require('./lib/BehatTask'),\n defaults ...
javascript
chosen
[ { "from": "system", "value": "Add coverage requirements to @proton/util\n\nCP-3824\n" }, { "from": "human", "value": "module.exports = {\n preset: 'ts-jest',\n testEnvironment: 'node',\n};\n" }, { "from": "gpt", "value": "module.exports = {\n preset: 'ts-jest',\n testEnvi...
javascript
chosen
[ { "from": "system", "value": "Add comment to clarify fixture for repliedArticleCount\n" }, { "from": "human", "value": "export default {\n '/users/doc/test-user': {\n id: 'test-user',\n name: 'test user',\n email: 'secret@secret.com',\n },\n '/users/doc/current-user': {\n id: 'cur...
javascript
chosen
[ { "from": "system", "value": "Use an arrow function to get rid of ctrl = this\n" }, { "from": "human", "value": "let defaultSnippet = `\nfrom player_map import playerPositions\nprint playerPositions()`;\n\nexport default class Controller {\n constructor($log, $rootScope, connection, $mdToast)...
javascript
chosen
[ { "from": "system", "value": "fix: Change 'dest' address for built css files\n\nconcatenated and minified css files are saved in 'dist/css/' folder instead of 'dist'\n\n[ticket: #5]\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n // Do grunt-related things in here.\n ...
javascript
chosen
[ { "from": "system", "value": "Fix bug when modifying the startFrame of a layer\n\nTwo events were sent to the server at once, which triggered a double\nsimultaneous write of layers.json.\n\nThis mostly resulted in the endFrame update overwriting the startFrame\nupdate, and sometimes even an extra `]` at the...
javascript
chosen
[ { "from": "system", "value": "Apply offset/limit to Best Of\n" }, { "from": "human", "value": "import { dbAdapter } from '../../../models'\nimport { reportError } from '../../../support/exceptions'\nimport { serializePostsCollection } from '../../../serializers/v2/post';\n\nexport default class ...
javascript
chosen
[ { "from": "system", "value": "Make { ident } const instead of let for closure\n" }, { "from": "human", "value": "import { NativeModules, Platform } from 'react-native'\n\nconst { RNBranch } = NativeModules\n\nexport default async function createBranchUniversalObject(identifier, options = {}) {\n...
javascript
chosen
[ { "from": "system", "value": "Remove optional options from api call\n" }, { "from": "human", "value": "import React, { Component } from \"react\";\nimport { injectGlobal } from \"styled-components\";\n\nimport Api from \"./api\";\nimport StoryList from \"./containers/StoryList\";\n\n// eslint-di...
javascript
chosen
[ { "from": "system", "value": "Break build on Sass error\n" }, { "from": "human", "value": "const sass = require('gulp-sass');\nconst gulpif = require('gulp-if');\nconst autoprefixer = require('gulp-autoprefixer');\nconst preprocess = require('gulp-preprocess');\nconst sourcemaps = require('gulp-...
javascript
chosen
[ { "from": "system", "value": "Remove default acceptable email domain.\n\nExpect all acceptable email domains to be specified as a comma\nseparated list in the env variables.\n" }, { "from": "human", "value": "let acceptableDomainsFromEnv = process.env.ACCEPTABLE_DOMAINS;\n\nif (acceptableDomains...
javascript
chosen
[ { "from": "system", "value": "build(browser): Remove IE11 from SauceLabs tests until compatibility is restored\n" }, { "from": "human", "value": "module.exports = {\n // Chrome\n chrome_canary_osx: {\n browserName: 'chrome',\n platform: 'OS X 10.11',\n version: 'dev',\n base: 'Sauc...
javascript
chosen
[ { "from": "system", "value": "Set default to be light mode\n" }, { "from": "human", "value": "import React from \"react\";\nimport { RoutingApp } from \"./modules/RoutingApp\";\nimport store from \"./store\";\nimport { Provider } from \"react-redux\";\nimport { STUY_SPEC_API_URL } from \"./const...
javascript
chosen
[ { "from": "system", "value": "Add convenience helper for keccak hash\n" }, { "from": "human", "value": "export function prefixName(prefix, fn) {\n Object.defineProperty(fn, 'name', {\n value: `${prefix}.${fn.name}`,\n configurable: true\n });\n\n return fn;\n}\n" }, { "from": "g...
javascript
chosen
[ { "from": "system", "value": "Replace the constant with a class, add render method returning the same jsx input.\n" }, { "from": "human", "value": "import React from 'react';\n\nconst SearchBar = () => {\n\treturn <input />;\n}\n\nexport default SearchBar;" }, { "from": "gpt", "value...
javascript
chosen
[ { "from": "system", "value": "Set a base API endpoint\n" }, { "from": "human", "value": "import express from 'express'\nimport {logger, http_logger} from './utils/logger'\nimport {cookie_parser, session} from './utils/session'\nimport body_parser from 'body-parser'\nimport passport from 'passpor...
javascript
chosen
[ { "from": "system", "value": "Add add and remove methods - currently returns promise after set time until api is ready\n\n\nFormer-commit-id: d3431ae4976bf3c953b43f859e3c028b694c5e98\nFormer-commit-id: daaea3ba37d95e67470dae733967f1b89c5e225b\nFormer-commit-id: f914e882d910e625258589ee26d68932feaca92d" },...
javascript
chosen
[ { "from": "system", "value": "Change selector to take current_user from state\n" }, { "from": "human", "value": "/*\n This file is a part of libertysoil.org website\n Copyright (C) 2015 Loki Education (Social Enterprise)\n\n This program is free software: you can redistribute it and/or modify\n...
javascript
chosen
[ { "from": "system", "value": "Add source code documentation format\n" }, { "from": "human", "value": "// GitHub Gist: <%= name %>\n// <%= _.repeat('=', name.length + 13) %>\n//\n// > (c) <%= new Date().getFullYear() %> Chao Huang <chao@realguess.net>\n\n'use strict';\n" }, { "from": "gpt...
javascript
chosen
[ { "from": "system", "value": "Print trace for errors without message" }, { "from": "human", "value": "'use strict';\n\n/* eslint-disable no-process-exit */\n\nconst util = require('util');\nconst Cli = require('./Cli');\nconst CliError = require('./CliError');\nconst cli = new Cli(process.argv.s...
javascript
chosen
[ { "from": "system", "value": "[test] Fix typo in whitelist and blacklist\n" }, { "from": "human", "value": "// @flow\n\nconst { JSDOM } = require('jsdom');\nconst Node = require('jsdom/lib/jsdom/living/node-document-position');\n\n// We can use jsdom-global at some point if maintaining that list...
javascript
chosen
[ { "from": "system", "value": "Add babel register for node compat\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar yargs = require('yargs');\n\nyargs\n .command(\n 'init',\n 'Initialize standalone CRA server',\n () => {},\n argv => {\n require('./cli/init');\n }\...
javascript
chosen
[ { "from": "system", "value": "Use AppContainer only in dev mode\n" }, { "from": "human", "value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport { AppContainer } from 'react-hot-loader';\nimport App from './containers/App';\n\nimport './styles';\n\nconst render = (Compone...
javascript
chosen
[ { "from": "system", "value": "Upgrade src arg to object automatically\n" }, { "from": "human", "value": "import { render } from 'solid-js/web';\nimport Player from './components/Player';\n\nfunction create(props, elem) {\n let el;\n\n const dispose = render(() => {\n el = <Player {...props}...
javascript
chosen
[ { "from": "system", "value": "fix($hmr): Support arbitrary origins in publicPath.\n\nIf the Webpack publicPath contains \"http:\" or \"https:\", treat it as the\nbase URL for newly-loaded\nassets. Otherwise, continue to use the current window's location.\n\nFixes #25.\n" }, { "from": "human", "v...
javascript
chosen
[ { "from": "system", "value": "Move loopback status to /api and send static message to /\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(server) {\n // Install a `/` route that returns server status\n var router = server.loopback.Router();\n router.get('/', server...
javascript
chosen
[ { "from": "system", "value": "Add id to message posting and receiving\n" }, { "from": "human", "value": "const h = require(`virtual-dom/h`)\nconst diff = require(`virtual-dom/diff`)\nconst {CREATE, DIFF} = require(`wwvdom-constants`)\n\nlet previousNode = null\n\nonmessage = function (ev) {\n c...
javascript
chosen
[ { "from": "system", "value": "Use destructuring to require modules\n" }, { "from": "human", "value": "const connect = require('./connect/connect')\nconst store = require('./store/store')\nconst events = require('./core/events')\nconst {actions, unboundActions} = require('./store/actions/actions'...
javascript
chosen
[ { "from": "system", "value": "Change thumbsCheck and poll route to generic poll route\n" }, { "from": "human", "value": "var studentsController = require('../controllers/students');\nvar teachersController = require('../controllers/teachers');\nvar authenticationController = require('../controll...
javascript
chosen
[ { "from": "system", "value": "Remove /html suffix from template name\n" }, { "from": "human", "value": "define('app/views/templated', ['ember'],\n //\n // Templated View\n //\n // @returns Class\n //\n function () {\n\n 'use strict';\n\n return Ember.View.extend...
javascript
chosen
[ { "from": "system", "value": "Disable use of css framework\n\n" }, { "from": "human", "value": "\nimport './style/skeleton.css';\nimport './style/spinner.css'\nimport './style';\nimport App from './components/app';\n\nexport default App;\n" }, { "from": "gpt", "value": "\n// import '...
javascript
chosen
[ { "from": "system", "value": "Add iframe title to fix ESLint warning\n" }, { "from": "human", "value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport classNames from 'classnames'\nimport { completeUrl } from '../../util'\nimport { loadSuccess } from '../../actions'\nimpor...
javascript
chosen