conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add POST route to retrieve all game data.\n" }, { "from": "human", "value": "'use strict';\n\nconst express = require('express');\nconst router = express.Router();\nconst gameService = require('../services').gameService;\n\nrouter.post('/create', function(req, res, ...
javascript
chosen
[ { "from": "system", "value": "Add handling for slider values\n\nAdd functionality for random lat/long\n" }, { "from": "human", "value": "'use strict';\n\n$(function() {\n\tvar $imagesContainer = $('.js-images-container');\n\n\t$(document).foundation();\n\n\t$('form').on('submit', function(e) {\n...
javascript
chosen
[ { "from": "system", "value": "Modify the start_date to date.\n" }, { "from": "human", "value": "// GraphQL types\nimport {\n\tGraphQLObjectType,\n\tGraphQLString,\n\tGraphQLID,\n GraphQLInt,\n GraphQLFloat\n} from 'graphql';\n\nconst WorkLog_TYPE = new GraphQLObjectType({\n name: 'workl...
javascript
chosen
[ { "from": "system", "value": "CRM-341: Create workflow widget for entity page - fixed JS minification\n" }, { "from": "human", "value": "var Oro = Oro || {};\nOro.widget = Oro.widget || {};\n\nOro.widget.Buttons = Oro.widget.Abstract.extend({\n options: _.extend(\n _.extend({}, Oro.wid...
javascript
chosen
[ { "from": "system", "value": "Expatistan: Switch to using the api_result.abstract for firstline\n" }, { "from": "human", "value": "(function(env) {\n env.ddg_spice_expatistan = function(api_result) {\n \"use strict\";\n\n if(!api_result || api_result.status !== 'OK') {\n ...
javascript
chosen
[ { "from": "system", "value": "Add sessions reducer to main reducer\n" }, { "from": "human", "value": "import { combineReducers } from 'redux';\nimport audio from '../containers/Audio/reducer';\nimport midi from '../containers/Midi/reducer';\nimport login from '../containers/Login/reducer';\nimpo...
javascript
chosen
[ { "from": "system", "value": "chore(linter): Increase maximum valid line width\n" }, { "from": "human", "value": "module.exports = {\n parser: 'babel-eslint',\n extends: 'google',\n rules: {\n 'no-var': 2\n }\n};\n" }, { "from": "gpt", "value": "module.exports = {\n parser: '...
javascript
chosen
[ { "from": "system", "value": "Add js to open evaluation schedule dialog\n" }, { "from": "human", "value": "(function(global) {\n 'use strict';\n\n $(document).ready(function() {\n setupQuestionWindows();\n });\n\n global.setupQuestionWindows = function setupQuestionWindows() {...
javascript
chosen
[ { "from": "system", "value": "Update New Relic config file with default values to prevent application crashing.\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 configurat...
javascript
chosen
[ { "from": "system", "value": "Move afterModel hook to after the model in user-quickfiles\n" }, { "from": "human", "value": "import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport Analytics from 'ember-osf/mixins/analytics';\n\nexport default Route....
javascript
chosen
[ { "from": "system", "value": "Load XBlockToXModuleShim for Studio Tabs page\n\nThe studio tabs page had a race condition when loading many static tabs.\nThe result was that those tabs couldn't be deleted. By requiring the\n`xmodule` module, we force the EditTabsFactory to load\nXBlockToXModuleShim before it...
javascript
chosen
[ { "from": "system", "value": "Refactor code of utility function\n" }, { "from": "human", "value": "(function(window) {\n 'use strict';\n\n var util = {};\n\n util.isNumber = function(obj) {\n return (Object.prototype.toString.call(obj) === '[object Number]');\n };\n\n util.toNumber = fun...
javascript
chosen
[ { "from": "system", "value": "Tweak payment receipt upload rejection resolution\n" }, { "from": "human", "value": "// PaymentRequirementUpload class\n\n'use strict';\n\nvar memoize = require('memoizee/plain')\n , defineRequirementUpload = require('./requirement-upload')\n , def...
javascript
chosen
[ { "from": "system", "value": "Sort languages by alphabetical order\n" }, { "from": "human", "value": "/*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */\n/*global define */\n\ndefine(function (require, exports, module) {\n\n 'use strict';\n\n // Code th...
javascript
chosen
[ { "from": "system", "value": "Use hyphenated appname in webpack\n" }, { "from": "human", "value": "var path = require(\"path\");\n\nmodule.exports = {\n context: path.join(process.cwd(), \"<%= srcFolder %>\"),\n progress: true,\n entry: {\n \"<%= appName %>\": \"./<%= hAppName %>...
javascript
chosen
[ { "from": "system", "value": "Fix borked jQuery targeting in input-password\n" }, { "from": "human", "value": "import Component from '@ember/component';\nimport Util from 'ui/utils/util';\nimport { get, set } from '@ember/object';\nimport layout from './template';\nimport $ from 'jquery';\n\nexp...
javascript
chosen
[ { "from": "system", "value": "Use process.nextTick for ultimate speed\n" }, { "from": "human", "value": "/**\n * Author: Michael Rose\n * License: MIT\n */\n\n'use strict';\n\nvar _ = require('./utils');\n\nfunction ThenCall(onFulfilled, onRejected, returnPromise) {\n this.onFulfilled = onFulfi...
javascript
chosen
[ { "from": "system", "value": "Fix crash in Direct Messages column settings\n\nFixes #892\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { defineMessages, injectIntl, Formatted...
javascript
chosen
[ { "from": "system", "value": "Add test case for dynamic class instantiation.\n" }, { "from": "human", "value": "/**\n * @fileoverview Tests for no-ext-create rule.\n * @author Nat Burns\n */\n\n//------------------------------------------------------------------------------\n// Requirements\n//-...
javascript
chosen
[ { "from": "system", "value": "Fix the yarn start command caused by WebpackDevServer config change\n" }, { "from": "human", "value": "const WebpackDevServer = require('webpack-dev-server')\nconst webpack = require('webpack')\nconst config = require('../webpack.config')()\nconst env = require('./e...
javascript
chosen
[ { "from": "system", "value": "Remove default code to prevent errors\n" }, { "from": "human", "value": "if (Meteor.isClient) {\n Template.hello.greeting = function () {\n return \"Welcome to astroid-web.\";\n };\n\n Template.hello.events({\n 'click input' : function () {\n // templa...
javascript
chosen
[ { "from": "system", "value": "Revert \"We don't need the message here.\"\n\nThis reverts commit 8a63b900a07216b157e4a6e234f4ff10ac9bd6e2.\n" }, { "from": "human", "value": "var ExtendableBuiltin = require(\"./extendablebuiltin\");\nvar inherits = require(\"util\").inherits;\n\ninherits(Extendabl...
javascript
chosen
[ { "from": "system", "value": "Update up to deferred v0.2\n" }, { "from": "human", "value": "// Read all filenames from directory and it's subdirectories\n\n'use strict';\n\nvar fs = require('fs')\n , aritize = require('es5-ext/lib/Function/aritize').call\n , curry = require('es5-ext/lib...
javascript
chosen
[ { "from": "system", "value": "Disable eslint check for undefined module\n" }, { "from": "human", "value": "export function isNode() {\n return typeof window === 'undefined' && typeof module !== 'undefined' && module.exports;\n}\n" }, { "from": "gpt", "value": "export function isNode...
javascript
chosen
[ { "from": "system", "value": "[Props] Make the source prop type optional\n\nThis way if it's marked as required in `Image` we won't get warnings.\n" }, { "from": "human", "value": "'use strict';\n\nlet React = require('react-native');\nlet {\n Image,\n PixelRatio,\n PropTypes,\n} = React;\n\ncla...
javascript
chosen
[ { "from": "system", "value": "[default-layout] Add prop type for versions\n" }, { "from": "human", "value": "import React from 'react'\nimport PropTypes from 'prop-types'\nimport Button from 'part:@sanity/components/buttons/default'\nimport Dialog from 'part:@sanity/components/dialogs/default'\n...
javascript
chosen
[ { "from": "system", "value": "Use connect() instead of connector.connect()\n" }, { "from": "human", "value": "// @flow\nimport {TypedConnector} from '../util/typed-connect'\nimport PurgeMessage from './purge-message.desktop'\nimport * as Constants from '../constants/pgp'\n\nimport type {Props} f...
javascript
chosen
[ { "from": "system", "value": "Fix typo in error message\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nconst fs = require('fs')\nconst got = require('got')\nconst path = require('path')\n\nconst downloadURL = 'https://ci.appveyor.com/api/projects/electron-bot/rcedit/artifacts/Default/...
javascript
chosen
[ { "from": "system", "value": "Select top item by default\n" }, { "from": "human", "value": "// ==UserScript==\n// @name Rightmove Enhancement Suite\n// @namespace https://github.com/chigley/\n// @description Keyboard shortcuts\n// @include http://www.rightmove.co.uk/*\n// @version ...
javascript
chosen
[ { "from": "system", "value": "Use stage 1 config (instead of listing all transforms)\n" }, { "from": "human", "value": "/**\n * Copyright 2013-2015, 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 ...
javascript
chosen
[ { "from": "system", "value": "Fix event type in handler manager\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withModules } from '../Modules';\nimport { stripesShape } from '../../Stripes';\n\nimport { getHandlerComponents } from '.....
javascript
chosen
[ { "from": "system", "value": "Fix initialization when turbolinks is present.\n" }, { "from": "human", "value": "(function() {\n\t\"use strict\";\n\n\tfunction initPage() {\n\n\t\t// If there is an \"Additional Fields\" button on the page, then show the extended fields and hide the button.\n\t\t/...
javascript
chosen
[ { "from": "system", "value": "IPLookup: Add `moreAt: true` because it's false by default.\n" }, { "from": "human", "value": "(function (env) {\n \"use strict\";\n env.ddg_spice_iplookup = function(api_result){\n\n if (!api_result || api_result.error) {\n return Spice.fail...
javascript
chosen
[ { "from": "system", "value": "Set title to 4line, change fontsize to 17px\n" }, { "from": "human", "value": "(function (env) {\n \"use strict\";\n env.ddg_spice_wikinews = function(api_result){\n\n if (api_result.error) {\n return Spice.failed('wikinews');\n }\n\n ...
javascript
chosen
[ { "from": "system", "value": "Mark tresdb global as legacy\n" }, { "from": "human", "value": "\nmodule.exports = {\n env: {\n // Browser global variables\n browser: true,\n\n // jQuery global variables\n jquery: true,\n\n // CommonJS global variables and CommonJS scoping.\n co...
javascript
chosen
[ { "from": "system", "value": "Fix webcam teardown when component is destroyed\n" }, { "from": "human", "value": "import config from 'ember-get-config';\nimport Component from 'ember-component';\nimport computed from 'ember-computed';\nimport Webcam from 'webcamjs';\nimport layout from '../templa...
javascript
chosen
[ { "from": "system", "value": "Remove second from job overview.\n" }, { "from": "human", "value": "app.controller(\"MainController\", [\"$scope\", \"$http\", \"units\", \"unit\", function($scope, $http, units, unit) {\n // Convert 0 or 1 from database to false or true for Angular. Yup...\n ...
javascript
chosen
[ { "from": "system", "value": "Fix bug in javscript, when clearing the repo_name.\n" }, { "from": "human", "value": "$('form#submit-repo').submit(\n function(evt){\n evt.preventDefault();\n\n var status = $('#status');\n var repo = $('label[for=\"repo_name\"]').text() + $('input[name=\"...
javascript
chosen
[ { "from": "system", "value": "Add simple test for travis\n" }, { "from": "human", "value": "'use strict';\n\ndescribe('Unit :: Protocols.Local', function () {\n\n var Local = require('../../../src/protocols/list/Local.js');\n\n it('constructor()', function() {\n\n var local = new Lo...
javascript
chosen
[ { "from": "system", "value": "Remove member variable after it's no longer necesary\n" }, { "from": "human", "value": "var Class = require('./Class'),\n\tinvokeWith = require('./invokeWith'),\n\tslice = require('./slice'),\n\teach = require('./each')\n\nmodule.exports = Class(function() {\n\tthis...
javascript
chosen
[ { "from": "system", "value": "Fix bug on travis CI\n" }, { "from": "human", "value": "import fs from 'fs';\nimport path from 'path';\nimport Sequelize from 'sequelize';\nimport configs from '../config/config';\n\nconst basename = path.basename(module.filename);\nconst env = process.env.NODE_ENV ...
javascript
chosen
[ { "from": "system", "value": "Change deprecated method for changing moment's locale\n\nSigned-off-by: Felipe Milani <6def120dcec8fcb28aed4723fac713cfff66d853@gmail.com>\n" }, { "from": "human", "value": "// client entry point, imports all client code\nimport { Meteor } from 'meteor/meteor';\nimp...
javascript
chosen
[ { "from": "system", "value": "Change create so it uses bulk edit, insteadt of just setAttributes\n" }, { "from": "human", "value": "\"use strict\";\n\nvar domElementFactory = require( \"./lib/domElementFactory\" ),\n\tdomElementListFactory = require( \"./lib/domElementListFactory\" );\n\nfunctio...
javascript
chosen
[ { "from": "system", "value": "Adjust Settings UI for Chrome Now's Geolocation Source\n\nBUG=164227\n\nReview URL: https://codereview.chromium.org/26315007\n\ngit-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@228326 0039d316-1c4b-4281-b951-d872f2087c98\n" }, { "from": "human", "value": "// Cop...
javascript
chosen
[ { "from": "system", "value": "Support ArrayBufferViews in BlobBuilder constructor\n" }, { "from": "human", "value": "/**\n * Create a blob builder even when vendor prefixes exist\n */\n\nvar BlobBuilder = global.BlobBuilder\n || global.WebKitBlobBuilder\n || global.MSBlobBuilder\n || global.M...
javascript
chosen
[ { "from": "system", "value": "Optimize cases when no wait is required\n" }, { "from": "human", "value": "\nmodule.exports = limiter;\n\n/*global setTimeout, clearTimeout */\n\nfunction limiter(interval) {\n\n var queue = [], lastTrigger = 0, timer;\n\n function now() {\n return + (new Date)...
javascript
chosen
[ { "from": "system", "value": "Make (undocumented) library interface backwards-compatible, since some clients seem to be relying on it\n" }, { "from": "human", "value": "/*\n Copyrights for code authored by Yahoo! Inc. is licensed under the following\n terms:\n\n MIT License\n\n Copyright (c) 201...
javascript
chosen
[ { "from": "system", "value": "Make it better (Open and read)\n" }, { "from": "human", "value": "var express = require('express')\nvar app = express()\nvar fs=require('fs');\n\napp.set('port', (process.env.PORT || 8080))\n//app.use(express.static(__dirname + '/public'))\n\n//__dirname returns the...
javascript
chosen
[ { "from": "system", "value": "Rename the config file config -> pb-config\n" }, { "from": "human", "value": "'use strict';\n\nvar PhonegapBoilerplate = function() {\n this.loadConfig();\n};\n\nPhonegapBoilerplate.prototype = {\n constructor: PhonegapBoilerplate,\n\n options: {\n repository:...
javascript
chosen
[ { "from": "system", "value": "Update syntax to work with elixir version 3 / Laravel 5.1\n\n- reference: https://github.com/laravel/elixir/releases/tag/3.0.0\r\n- tested: in homestead with `gulp`, passed\r\n\r\nps\r\n\r\nNeed to use this for our site, this will really help us with our IE fixes, thanks!" },...
javascript
chosen
[ { "from": "system", "value": "Make long salt callback really async\n" }, { "from": "human", "value": "var bindings = require(\"bindings\")(\"argon2_lib\");\n\nexports.encrypt = function (plain, salt, callback) {\n \"use strict\";\n\n if (salt.length < 16) {\n callback(new Error(\"Salt too l...
javascript
chosen
[ { "from": "system", "value": "Add a create and get test\n" }, { "from": "human", "value": "describe('person', function() {\n\n var Person = require('../lib/Person').Person;\n\n before(function(done) {\n var databank = require('databank'),\n DatabankObject = databank.DatabankObjec...
javascript
chosen
[ { "from": "system", "value": "Add -l/--last flag as alias for --recent\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\n\nvar program = require('commander');\nvar core = require('./lib/core');\n\nvar words = [];\nprogram\n .version(core.VERSION)\n .option(\n '-c, --con...
javascript
chosen
[ { "from": "system", "value": "Add config flag to exclude css and/or js\n" }, { "from": "human", "value": "/* eslint-env node */\n'use strict';\n\nconst DEFAULT_ASSET_VERSION = 'latest';\nconst getJSSource = ver => `https://cdn.reflect.io/${ver}/reflect.js`;\nconst getCSSSource = ver => `https://...
javascript
chosen
[ { "from": "system", "value": "Fix bug with ariaMapper initialization\n" }, { "from": "human", "value": "$(document).ready(function(){\n\n /**\n * This makes a webpage accessible to screen readers if one follows \n * proper HTML and WebBlocks conventions.\n */\n\n $('body').aria...
javascript
chosen
[ { "from": "system", "value": "Comment out no-unused-vars eslint warnings back.\n\nsrc/ButtonInput.js\n 9:9 warning bsStyle is defined but never used no-unused-vars\n 9:18 warning value is defined but never used no-unused-vars\n\nAlas, that was a bug, not a feature.\n" }, { "from": "human"...
javascript
chosen
[ { "from": "system", "value": "Change example from Null Island to Santiago, Chile\n" }, { "from": "human", "value": "var point = require('turf-point');\n\n/**\n * Takes a bounding box and a cell depth and outputs points in a grid.\n *\n * @module turf/grid\n * @param {Array<number>} extent extent...
javascript
chosen
[ { "from": "system", "value": "Revert \"Fixed infector api call.\"\n\nThis reverts commit 4b9aaa610320f837148d39d5ee892e1ff8f884f0.\n" }, { "from": "human", "value": "'use strict';\n\nvar infector = require('infector'),\n Server = require('./server'),\n argv = require('optimist').argv;\n\nvar s...
javascript
chosen
[ { "from": "system", "value": "Write default config to JSON for Jigsaw, not docs config\n" }, { "from": "human", "value": "const argv = require('yargs').argv\nconst command = require('node-cmd')\nconst mix = require('laravel-mix')\nconst OnBuild = require('on-build-webpack')\nconst Watch = requir...
javascript
chosen
[ { "from": "system", "value": "Add vibration when time runs out.\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n\n function WordCtrl(Term, Session, $location, $route, $scope) {\n var time;\n\n $scope.word = 'tralala';\n $scope.started = false;\n ...
javascript
chosen
[ { "from": "system", "value": "Handle lack of street name in page title\n" }, { "from": "human", "value": "import { getSignInData, isSignedIn } from '../users/authentication'\n\n/**\n * Updates page title.\n * This is called whenever the name of the street changes and it affects\n * the document ...
javascript
chosen
[ { "from": "system", "value": "Fix bug. youtube block cannot be edited\n" }, { "from": "human", "value": "'use strict';\n\nimport ENTITY from '../entities';\nimport insertAtomicBlock from './insert-atomic-block';\nimport { replaceAtomicBlock } from './replace-block';\nimport { Entity } from 'draf...
javascript
chosen
[ { "from": "system", "value": "Add comment to explain what is expected . to be lazy loaded\n" }, { "from": "human", "value": "import Vue from 'vue'\n\nVue.component('LoginModal', () => import('./views/containers/LoginModal.vue'))\nVue.component('SignUp', () => import('./views/containers/SignUp.vu...
javascript
chosen
[ { "from": "system", "value": "Add a back to overview button\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport './BookDetails.scss';\n\nexport default class BookDetails extends Component {\n render() {\n const { title, coverUrl } = this.props.book;\n retu...
javascript
chosen
[ { "from": "system", "value": "Set min boxCount to be 0\n\nDon’t allow negative.\n" }, { "from": "human", "value": "// (C) Copyright 2014-2016 Hewlett Packard Enterprise Development LP\n\nimport React, { Component } from 'react';\nimport Tiles from 'grommet/components/Tiles';\nimport Box from 'gr...
javascript
chosen
[ { "from": "system", "value": "Use workshopper commands to run server mode\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nimport path from 'path';\nimport workshopper from 'workshopper';\nimport updateNotifier from 'update-notifier';\nimport Server from './lib/Server';\nimport pkg from...
javascript
chosen
[ { "from": "system", "value": "Use custom column names for some attributes in queryable tests\n\n(shouldn't affect the tests, which is the point)\n" }, { "from": "human", "value": "/**\n * Dependencies\n */\n\nvar Waterline = require('waterline');\n\nmodule.exports = Waterline.Collection.extend({...
javascript
chosen
[ { "from": "system", "value": "Make color mode toggle global\n" }, { "from": "human", "value": "import primerStyles from '!!raw-loader!postcss-loader!../../../../../src/docs.scss'\nimport {Flex} from '@primer/components'\nimport {Frame} from '@primer/gatsby-theme-doctocat'\nimport {MoonIcon, SunI...
javascript
chosen
[ { "from": "system", "value": "Adjust receiver class in connector module\n" }, { "from": "human", "value": "import _ from 'lodash';\nimport errorer from '../../../errorer/errorer';\n\nexport default class {\n constructor(instance, receiver, receiverConfigs, params) {\n let {events = {}}...
javascript
chosen
[ { "from": "system", "value": "refactor: Set authorization only if exists\n" }, { "from": "human", "value": "/*\n * Copyright (C) 2015 The Gravitee team (http://gravitee.io)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in complianc...
javascript
chosen
[ { "from": "system", "value": "Update exports - include NumberBox\n" }, { "from": "human", "value": "import ReactiveBase from \"./components/basic/ReactiveBase\";\nimport TextField from \"./components/basic/TextField\";\nimport SelectedFilters from \"./components/basic/SelectedFilters\";\nimport ...
javascript
chosen
[ { "from": "system", "value": "Use a rejection instead of throwing\n" }, { "from": "human", "value": "// @flow\n\nimport deviceInfo from 'react-native-device-info'\nimport networkInfo from 'react-native-network-info'\nimport pkg from '../../../package.json'\n\nexport const getIpAddress = (): Prom...
javascript
chosen
[ { "from": "system", "value": "Fix focus in js selector searchbar\n" }, { "from": "human", "value": "export class Searchbar {\n\n constructor() {\n $('a.toggle-searchbar').on('click', $.proxy(this.toggleSearchbar, this));\n }\n\n toggleSearchbar() {\n $('.search-box').toggleClass('open')...
javascript
chosen
[ { "from": "system", "value": "Add onMarkClick event to SimpleTextGraph, set pointer cursor\n" }, { "from": "human", "value": "import React from \"react\";\n\nimport CircularProgress from \"material-ui/CircularProgress\";\n\nimport \"./style.css\";\n\n/*\n This is a very basic graph that displ...
javascript
chosen
[ { "from": "system", "value": "Throw error when a field renderer is missing in the Plain JavaScript template.\n" }, { "from": "human", "value": "/**\n * Renders a formulate Field.\n * @param fieldData The data for the form field to render.\n * @param fieldRenderers The associative array of field ...
javascript
chosen
[ { "from": "system", "value": "Test css grid in meals container\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport { connect } from 'react-redux'\nimport Meal from '../views/Meal'\nimport NewMeal from '../components/NewMeal'\nimport { Container } from 'semantic-ui...
javascript
chosen
[ { "from": "system", "value": "Remove flowtype rules, because prettier will format flow syntax\n" }, { "from": "human", "value": "const paths = require('./paths');\n\n// TODO - Verfiy that we don't need eslint-import-resolver-webpack anymore\n// const webpackConfig = process.env.NODE_ENV === \"de...
javascript
chosen
[ { "from": "system", "value": "Fix right click issue (:\n" }, { "from": "human", "value": "import { Menu, MenuItem } from \"electron\";\n\nexport class MainMenu {\n constructor(app, tray) {\n this.app = app;\n this.tray = tray;\n }\n initialize() {\n this.setTrayHandler();\n }\n set...
javascript
chosen
[ { "from": "system", "value": "Fix imgur `https` to `http`.\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('members').filter('getMemberIdByFullName', [\n function() {\n /**\n * @param members A member object arrays.\n * @param fullName A member full name that want ...
javascript
chosen
[ { "from": "system", "value": "Add link file for queries\n" }, { "from": "human", "value": "import fileReader from './fileReader.js';\nimport fs from 'fs';\nimport path from 'path';\n\nvar reader = function(folder){\n\tvar result = getFile(folder, '');\n\treturn result;\n};\n\nvar getFile = funct...
javascript
chosen
[ { "from": "system", "value": "Add test ensuring declare class w/ mixins are stripped\n" }, { "from": "human", "value": "declare var foo\ndeclare var foo;\ndeclare function foo(): void\ndeclare function foo(): void;\ndeclare function foo<T>(): void;\ndeclare function foo(x: number, y: string): vo...
javascript
chosen
[ { "from": "system", "value": "Fix initialisation issue on Android\n\nAs per https://github.com/medic/medic-webapp/issues/1207\n" }, { "from": "human", "value": "if ( typeof exports === 'object' && typeof exports.nodeName !== 'string' && typeof define !== 'function' ) {\n var define = function...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"remove obsolete browser electron distinction\"\"\n\nThis reverts commit c45c602e9cae985fae3c62f3021e1d74bbe77ffb.\n" }, { "from": "human", "value": "(function(global) {\n\n if(typeof process != 'object') {\n console.log('Running in browse...
javascript
chosen
[ { "from": "system", "value": "Remove no longer needed comments\n" }, { "from": "human", "value": "'use strict';\n\nvar _ = require('lodash');\nvar glimpse = require('glimpse');\n\nvar processMessages = function(messages) { \n return {\n messages: messages,\n groupedById: _.group...
javascript
chosen
[ { "from": "system", "value": "Refresh global addresses when joining\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('copayApp.controllers').controller('CopayersController',\n function($scope, $rootScope, $location, backupService, walletFactory, controllerUtils) {\n\n $scop...
javascript
chosen
[ { "from": "system", "value": "Make sure api.json contains correct title on deployment\n\nOtherwise it is possible that the API will end up targetting the incorrect instance in API Gateway.\n" }, { "from": "human", "value": "\"use strict\";\n\nconst fs = require('fs');\nconst fsx = require('../he...
javascript
chosen
[ { "from": "system", "value": "Change Promise to BBPromise as Promise is now a global variable in node and we don't want to overwrite it.\n" }, { "from": "human", "value": "'use strict';\n\nvar request = require('request');\nvar Promise = require('bluebird');\n\nvar ResourceBase = function(endpoi...
javascript
chosen
[ { "from": "system", "value": "Add flag for new module loader.\n" }, { "from": "human", "value": "/*\n ___ usage ___ en_US ___\n usage: prolific stdio\n\n -o, --stdout use stdout (default)\n -e, --stderr use stderr\n --help ...
javascript
chosen
[ { "from": "system", "value": "Test for the presence of if, before removing\n\n" }, { "from": "human", "value": "import mediumZoom from 'src/config/medium-zoom';\nimport lqip from 'src/modules/lqip';\n\nwindow.addEventListener('DOMContentLoaded', () => {\n // Run medium zoom\n // mediumZoom();\...
javascript
chosen
[ { "from": "system", "value": "Disable notification test for now\n" }, { "from": "human", "value": "require.config({\n baseUrl: '.',\n paths: {\n jquery: 'js/vendor/jquery',\n underscore: 'js/vendor/underscore',\n backbone: 'js/vendor/backbone',\n localstorage: '...
javascript
chosen
[ { "from": "system", "value": "Fix actions and types export in settings.\n\n" }, { "from": "human", "value": "import * as reducers from './reducers';\nimport * as sagas from './sagas';\nimport * as selectorCreators from './selectorCreators';\n\nexport {\n reducers,\n sagas,\n selectorCreators,...
javascript
chosen
[ { "from": "system", "value": "Allow multiple workers to be updated from launch method\n" }, { "from": "human", "value": "import Worker from '../../universal/models/Worker.js';\n\nexport default function () {\n Meteor.methods({\n 'launchAllWorkers'() {\n Worker.update({status: 'waiting'}...
javascript
chosen
[ { "from": "system", "value": "Put IIFE brackets inside, improve comment\n" }, { "from": "human", "value": "(function (Andamio) {\n\n var methodSplitter = /\\s+/;\n\n function _bind(target, obj, name, callback, methodName) {\n if (!callback) {\n throw new Error('Method \"' + methodName ...
javascript
chosen
[ { "from": "system", "value": "Add the current value to the state\n" }, { "from": "human", "value": "import { default as React, Component } from 'react';\nimport { render } from 'react-dom';\nimport {queryObject} from './ImmutableQuery.js';\nimport InputRange from 'react-input-range';\nvar Style ...
javascript
chosen
[ { "from": "system", "value": "Fix action type which has incorrectly named ActionType.\n" }, { "from": "human", "value": "import {RequestUtil} from 'mesosphere-shared-reactjs';\n\nimport ActionTypes from '../constants/ActionTypes';\nimport Config from '../config/Config';\n\nvar AppDispatcher = re...
javascript
chosen
[ { "from": "system", "value": "Add a close class to the close button.\n" }, { "from": "human", "value": "function overlay(name) {\n var path = 'story/' + name + '.html';\n var $overlay = $('#overlay').load(path, function() {\n $overlay.show()\n .append($('<span>Close</span...
javascript
chosen
[ { "from": "system", "value": "Edit file for readability on Github\n" }, { "from": "human", "value": "/*\n\nAs a user, I want to be able to find the sum, median, or mean of any list of numbers, whether it has an even or odd number of items. Each of these should be able to be called on their own, ...
javascript
chosen
[ { "from": "system", "value": "Add more hours to the day\n" }, { "from": "human", "value": "// Ref: https://github.com/yangshun/nusmods-v3/tree/master/src/js\n\nexport const FIRST_HOUR = 8;\nexport const LAST_HOUR = 22;\nexport const CELLS_COUNT = ((LAST_HOUR - FIRST_HOUR) + 1) * 2;\nexport const...
javascript
chosen
[ { "from": "system", "value": "Fix require paths and description\n" }, { "from": "human", "value": "'use strict';\n\n/**\n* Calculate logical lines of code (LLOC) for list of JavaScript files.\n*\n* @module @stdlib/_tools/js/lloc-file-list\n*\n* @example\n* var analyze = require( '@stdlib/_tools/...
javascript
chosen
[ { "from": "system", "value": "Remove delete from stop to avoid errors\n" }, { "from": "human", "value": "const RtmpServer = require('rtmp-server');\nconst rtmpToHLS = require('./rtmpToHLS');\nconst { streamKey } = require('../config.json');\nconst { deleteVideos, log } = require('./utils');\n\nf...
javascript
chosen