conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Store renderer's objects in an array.\n" }, { "from": "human", "value": "\nvar objectMappings = {\n circle: function(object) {\n return new SvgCircle()\n .setRadius(object.radius)\n .setTransform(object.getTransformation() || Transformation.IDENTITY)\n...
javascript
chosen
[ { "from": "system", "value": "Fix Block-scoped declarations (let, const, function, class) not yet supported outside strict mode\n\nIn Node v4.4.5, I get this error:\n\n```\nascallback/index.js:4\n let p = promise.then(function (ret) {\n ^^^\n\nSyntaxError: Block-scoped declarations (let, const, function, ...
javascript
chosen
[ { "from": "system", "value": "Remove reference to old broccoli-yuidoc-fork\n" }, { "from": "human", "value": "'use strict';\n\nvar YuidocCompiler = require('broccoli-yuidoc-fork');\nvar mergeTrees = require('broccoli-merge-trees');\n\nmodule.exports = {\n name: 'ember-cli-yuidoc',\n\n postproc...
javascript
chosen
[ { "from": "system", "value": "Fix import of foreach var\n" }, { "from": "human", "value": "import foreach from './src/foreach.js';\n\nexport var bindings = {\n foreach: foreach\n};" }, { "from": "gpt", "value": "import { foreach } from './src/foreach.js';\n\nexport var bindings = {\...
javascript
chosen
[ { "from": "system", "value": "Disable Android, not supported by Sauce Labs.\n" }, { "from": "human", "value": "module.exports = function(session, options) { \n function testBrowser(name, version) {\n var config = {\n 'browserName': name,\n 'tunnel-identifier': pro...
javascript
chosen
[ { "from": "system", "value": "Create Bitcore network settings for Openchain\n" }, { "from": "human", "value": "// Copyright 2015 Coinprism, Inc.\n// \n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// Yo...
javascript
chosen
[ { "from": "system", "value": "Update loaders for webpack 2 support\n" }, { "from": "human", "value": "require(\"style!css!less!./font-awesome-styles.loader.js!./font-awesome.config.js\");\n" }, { "from": "gpt", "value": "require(\"style-loader!css-loader!less-loader!./font-awesome-st...
javascript
chosen
[ { "from": "system", "value": "Upgrade syntax for ES 6\n" }, { "from": "human", "value": "var client = require('./lib/api-client');\nvar candidate = require('./lib/candidate');\nvar committee = require('./lib/committee');\nvar reports = require('./lib/reports');\nvar schedules = require('./lib/sc...
javascript
chosen
[ { "from": "system", "value": "Add separate configuration for audit recipients.\n" }, { "from": "human", "value": "export default (app) => {\n app.jobs.schedule('send audit email', '0 16 * * FRI', async () => {\n app.info('CRON: sending audit email - starting')\n\n const recipients =\n ...
javascript
chosen
[ { "from": "system", "value": "Fix bug where attributes would be reset to self-reference if falsey.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function pluginSelfReference(schema, options) {\n // ensure `options` and `options.keys` are supplied\n if(!options || !(o...
javascript
chosen
[ { "from": "system", "value": "Use numeric value to turn off no-process-exit rule\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n// reason: this is the main entry to the module walker. if something\n// goes wrong it has to decide what exit code to return. hence, it\n// has to be able t...
javascript
chosen
[ { "from": "system", "value": "Add note about broken theme config loading\n\nSomething weird going on here. Now that config loading is fixed it gives\nerrors. Probably need to understand better how loaders work to solve\nthis.\n" }, { "from": "human", "value": "'use strict';\nvar path = require('...
javascript
chosen
[ { "from": "system", "value": "Revert \"No support for update in pre\"\n\nThis reverts commit 20eb9908eff6fa7f2eb254d225a3e4f4bdc0c8a4.\n" }, { "from": "human", "value": "var Schema = require('mongoose').Schema;\n\nmodule.exports = function (schema, options) {\n schema.add({ deleted: Boolean }...
javascript
chosen
[ { "from": "system", "value": "Delete processed keys to avoid double stats\n\nThis assumes nobody is going to access req.files after multer-autoreap." }, { "from": "human", "value": "var fs = require('fs');\nvar debug = require('debug')('express:mutler-autoreap');\n\n// auto remove any uploaded f...
javascript
chosen
[ { "from": "system", "value": "[iso-core] Use sequelize.import now that eval is enabled\n" }, { "from": "human", "value": "const fs = require('fs');\nconst path = require('path');\n\nfunction loadModels(Sequelize, sequelize, modelsPath, {schema} = {}) {\n const db = {};\n const modelsDirectory ...
javascript
chosen
[ { "from": "system", "value": "Use nullary instead of arrow function\n\nThis makes it more explicit that the function shouldn’t be called\nwith an argument.\n" }, { "from": "human", "value": "/* eslint-disable no-use-before-define */\n\nconst R = require('ramda');\nconst types = require('babel-ty...
javascript
chosen
[ { "from": "system", "value": "Add owner_ids field to Accounts\n" }, { "from": "human", "value": "var wompt = require(\"../includes\"),\n mongoose = wompt.mongoose;\n\nvar Account = new mongoose.Schema({\n\t'display_name' : String\n\t,'name' : String\n});\n\n// number defines inde...
javascript
chosen
[ { "from": "system", "value": "Remove eslint config file from grunt task.\n\nNo need for that.\n" }, { "from": "human", "value": "\"use strict\";\n\nmodule.exports = function (grunt) {\n\n grunt.initConfig({\n eslint: {\n options: {\n config: \".eslintrc\"\n ...
javascript
chosen
[ { "from": "system", "value": "Update grunt build task description to match styles.\n\nOther tasks use a full sentence, therfore so should we.\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n\n // Project configuration.\n grunt.initConfig({\n pkg: grunt.file.re...
javascript
chosen
[ { "from": "system", "value": "Make it easier to generate images for each demo\n" }, { "from": "human", "value": "module.exports = function (grunt) {\n\n // Project configuration.\n grunt.initConfig({\n\n // Store your Package file so you can reference its specific data whenever nece...
javascript
chosen
[ { "from": "system", "value": "Fix bug with getting url for transition\n" }, { "from": "human", "value": "import Router from '@ember/routing/router';\n\nexport function initialize() {\n const isEmbedded = window !== window.top;\n\n if (isEmbedded) {\n Router.reopen({\n notifyTopFrame: f...
javascript
chosen
[ { "from": "system", "value": "Move annonymous function handling resolved route into named function.\n" }, { "from": "human", "value": "var Driver = require('./Driver').Driver;\n\nfunction turnpike_server() {\n return function(req, res) {\n var d = domain.create();\n\n d.on('error', functi...
javascript
chosen
[ { "from": "system", "value": "Add fallback to app.import if this.import is not available\n" }, { "from": "human", "value": "/* jshint node: true */\n// jscs: disable\n'use strict';\n\nmodule.exports = {\n name: 'ember-l10n',\n\n isDevelopingAddon: function() {\n // @see: https://ember-cli.c...
javascript
chosen
[ { "from": "system", "value": "Fix minor merge conflic in whitespace\n" }, { "from": "human", "value": "'use strict';\n\nimport React, { Component } from 'react';\nimport Swiper from 'react-native-swiper';\n\nimport {\n Text,\n View,\n StyleSheet,\n Image,\n} from 'react-native';\n\n\n\n\ncla...
javascript
chosen
[ { "from": "system", "value": "Replace quotes around env var value\n" }, { "from": "human", "value": "var util = require('util');\n\n\nvar DECLARATION = 'window.__env__ = window.__env__ || {};\\n',\n TEMPLATE = function(name) {\n if (typeof process.env[name] !== 'undefined') {\n va...
javascript
chosen
[ { "from": "system", "value": "Enable support for nested addon & engines" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nvar debug = require('debug')('ember-cli-nprogress:addon');\n\nmodule.exports = {\n name: 'ember-cli-nprogress',\n\n included: function(app) {\n ...
javascript
chosen
[ { "from": "system", "value": "Make it require() on Windows properly.\n" }, { "from": "human", "value": "//! © 2015 Nathan Rugg <nmrugg@gmail.com> | MIT\n\nvar lzma;\n\nfunction load_lzma()\n{\n var p = require(\"path\");\n \n ///NOTE: We can't use .join() because it will delete the lead...
javascript
chosen
[ { "from": "system", "value": "Add support for older node versions\n" }, { "from": "human", "value": "'use strict'\n\nvar postcss = require('postcss')\nvar isVendorPrefixed = require('is-vendor-prefixed')\n\nmodule.exports = postcss.plugin('postcss-remove-prefixes', function (options = {}) {\n l...
javascript
chosen
[ { "from": "system", "value": "Fix error if .git directory doesn't exists\n" }, { "from": "human", "value": "'use strict';\n\nvar url = require('url');\nvar path = require('path');\nvar utils = require('./utils');\n\nmodule.exports = function(dir, cb) {\n if (typeof dir === 'function') {\n cb...
javascript
chosen
[ { "from": "system", "value": "Add test running code for 'Library' class\n" }, { "from": "human", "value": "const Input = require('./lib/input')\nconst User = require('./lib/user')\n\nasync function tryAutoLogin() {\n const { existsSync, readFileSync } = require('fs')\n\n let info = existsSync(...
javascript
chosen
[ { "from": "system", "value": "Set up state for the query value\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport {\n StyleSheet,\n View\n} from 'react-native';\nimport AutocompleteInput from './lib/AutocompleteInput';\nimport Predictions from './lib/Predi...
javascript
chosen
[ { "from": "system", "value": "Make jshint happy with Promise\n" }, { "from": "human", "value": "'use strict';\n\nvar Promise = require('bluebird');\nvar request = Promise.promisify(require('request'));\n\nvar JXT = require('jxt').createRegistry();\n\nJXT.use(require('./lib/xrd'));\n\n\nmodule.ex...
javascript
chosen
[ { "from": "system", "value": "Add display name to component\n" }, { "from": "human", "value": "import React, {Component} from 'react'\nimport {END} from 'redux-saga'\n\nfunction hoc(config) {\n return BaseComponent => {\n class WrappedComponent extends Component {\n static async getInit...
javascript
chosen
[ { "from": "system", "value": "Make bluebird as default promise overriding ES6 promise\n\nCloses #48\n" }, { "from": "human", "value": "import Promise from 'bluebird';\nimport mongoose from 'mongoose';\nimport util from 'util';\nimport config from './config/env';\nimport app from './config/expres...
javascript
chosen
[ { "from": "system", "value": "Update hook name for Vue2 compatibility\n" }, { "from": "human", "value": "'use strict';\n\nvar windowsill = require('windowsill');\nvar resizer = windowsill.resizer;\n\nmodule.exports = {\n ready: function() {\n windowsill.enable('resizer');\n resizer.addLis...
javascript
chosen
[ { "from": "system", "value": "Update User-Agent: Node -> node" }, { "from": "human", "value": "var resources = require('./lib').resources;\nvar maybePromise = require('./lib').maybePromise;\nvar version = require('./package.json').version;\n\nmodule.exports = function client(apiKey, config) {\n ...
javascript
chosen
[ { "from": "system", "value": "Remove room booking for now\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport moment from 'moment';\n\nimport MeetingDisplay from './MeetingDisplay';\n\nclass CurrentMeeting extends Component {\n constructor() {\n su...
javascript
chosen
[ { "from": "system", "value": "Reset fields after document create\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Controller.extend({\n previewVisible: false,\n\n actions: {\n togglePreview: function() {\n this.toggleProperty('previewVisible');\n ...
javascript
chosen
[ { "from": "system", "value": "Use the global mongoose.connection instead (fix)\n" }, { "from": "human", "value": "var mongoose = require('mongoose');\nvar config = require(softblu + 'config');\nvar deferred = require(softblu + 'util/deferred');\nvar ready = deferred();\nvar db;\n\nfunction init ...
javascript
chosen
[ { "from": "system", "value": "Reset status messages before opening task.\n" }, { "from": "human", "value": "import Ember from \"ember\";\nimport ResetScroll from '../../mixins/reset-scroll';\n\nexport default Ember.Route.extend(ResetScroll, {\n\tmodel: function(params) {\n\t\treturn this.store.f...
javascript
chosen
[ { "from": "system", "value": "Update live object tests so that they know they should fire at 120fps\n" }, { "from": "human", "value": "QUnit.test(\"CanGetLiveTicks\", function(assert) {\n var someGame = new TameGame.StandardGame();\n var someObject = someGame.createObject();\n var someS...
javascript
chosen
[ { "from": "system", "value": "Fix lint errors in example code\n" }, { "from": "human", "value": "// compile javascript in here with babel\n\n(() => {\n function* fib() {\n let prev = 0, cur = 1;\n for(;;) {\n yield cur;\n let temp = cur;\n cur = cur + prev;\n prev = te...
javascript
chosen
[ { "from": "system", "value": "Update with reference to global nav partial\n" }, { "from": "human", "value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar postcss = require('postcss')\nvar cssstats = require('cssstats'...
javascript
chosen
[ { "from": "system", "value": "Remove redundant call to resolveConceptSetExpression\n" }, { "from": "human", "value": "define(\n\t(require, factory) => {\n const { AuthorizedRoute } = require('pages/Route');\n function routes(appModel, router) {\n const detailsRoute = new AuthorizedRou...
javascript
chosen
[ { "from": "system", "value": "Fix bug in question review JS that leaves radio buttons incorrectly disabled.\n\nThe old version behaved incorrectly when there was already a selected radio\nbutton on page load, e.g. when form validation failed on the server side or when\nusing the back button.\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Fix bug in FirebaseUI for when Firebase is an AMD module\n" }, { "from": "human", "value": "/** @module emberfire-utils */\nimport { scheduleOnce } from 'ember-runloop';\nimport Component from 'ember-component';\nimport inject from 'ember-service/inject';\n\nimport ...
javascript
chosen
[ { "from": "system", "value": "Disable random pathfinding for workers\n" }, { "from": "human", "value": "import { fastMap, fastObjects } from '../../../world';\nimport { clone, nextCoord } from '../../../utils';\nimport { collidableObjects } from '../../../collisions';\nimport config from '../../...
javascript
chosen
[ { "from": "system", "value": "Add default state to the reducer\n" }, { "from": "human", "value": "const {PUSH, POP, REPLACE} = require('../constants/navigation');\n\nmodule.exports = function navigate(state, {type, payload}) {\n const stack = state.__nav.stack;\n const index = state.__nav.inde...
javascript
chosen
[ { "from": "system", "value": "Fix goto section at sidebar\n" }, { "from": "human", "value": "import ServerboardView from 'app/components/project'\nimport store from 'app/utils/store'\nimport { projects_update_info } from 'app/actions/project'\n\nvar Project=store.connect({\n state(state){\n ...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary returns left by coffee -> es6 transform\n" }, { "from": "human", "value": "/*eslint-env node*/\n/*eslint vars-on-top: 0*/\n\nvar Autocompile;\nvar CompileView = require('./less-postcss-autocompile-view.js');\nvar CompositeDisposable = require('ato...
javascript
chosen
[ { "from": "system", "value": "Add type to toUpdateTime action creator\n" }, { "from": "human", "value": "export const type = 'UPDATE_TIME';\n\nexport function reduce(state, action) {\n console.log( 'updateTime' );\n return state;\n};\n\nexport function toUpdateTime() {\n return { direction };...
javascript
chosen
[ { "from": "system", "value": "Fix Bug From Model Publicity\n" }, { "from": "human", "value": "/**\r\n * Created by K on 10/2/2016.\r\n */\r\n\r\nvar mongoose = require('mongoose');\r\nvar PublicitySchema = mongoose.Schema({\r\n publicity_name: {\r\n type: String\r\n },\r\n\r\n pu...
javascript
chosen
[ { "from": "system", "value": "Add empty object as default options\n" }, { "from": "human", "value": "import { NativeModules } from 'react-native';\n\nconst CookieManager = NativeModules.RNCookieManager;\n\nexport default {\n get(url:String, name?: String): Promise<Object|String> {\n re...
javascript
chosen
[ { "from": "system", "value": "Change assertion to be slightly more flexible\n" }, { "from": "human", "value": "const assert = require(\"assert\");\nconst CommandRunner = require(\"../commandrunner\");\nconst MemoryLogger = require(\"../memorylogger\");\nlet config = {};\n\ndescribe(\"truffle hel...
javascript
chosen
[ { "from": "system", "value": "Fix include for older node versions?\n" }, { "from": "human", "value": "/* jshint loopfunc: true, evil: true */\nvar util = require('util');\nvar EventEmitter = require('events').EventEmitter;\n\nvar traverse = require('traverse');\nvar Session = require('msgpack5rp...
javascript
chosen
[ { "from": "system", "value": "Fix call to OC.generateUrl for caldav birthday calendar on/off\n\nSigned-off-by: Daniel Kesselberg <1d6e1cf70ec6f9ab28d3ea4b27a49a77654d370e@danielkesselberg.de>\n" }, { "from": "human", "value": "/**\n * @copyright 2017, Georg Ehrke <oc.list@georgehrke.com>\n *\n *...
javascript
chosen
[ { "from": "system", "value": "Add note about JSDom DOM support\n\nResolves #274\n" }, { "from": "human", "value": "global.chai = require('chai');\nglobal.sinon = require('sinon');\nglobal.chai.use(require('sinon-chai'));\n\nrequire('babel-core/register');\nrequire('./setup')();\n\n/*\n\tUncommen...
javascript
chosen
[ { "from": "system", "value": "Correct IIFE global variable name\n" }, { "from": "human", "value": "(function(global, f){\n\n 'use strict';\n\n /*istanbul ignore next*/\n if(module && typeof module.exports !== 'undefined'){\n module.exports = f(\n require('fluture'),\n require('sa...
javascript
chosen
[ { "from": "system", "value": "Fix data URI for Firefox\n" }, { "from": "human", "value": "'use strict';\nvar gutil = require('gulp-util');\nvar through = require('through2');\nvar chalk = require('chalk');\n\nmodule.exports = function (opts) {\n var count = 0;\n return through.obj(function (fi...
javascript
chosen
[ { "from": "system", "value": "Check if title should be updated\n" }, { "from": "human", "value": "'use strict';\n\nvar React = require('react'),\n withSideEffect = require('react-side-effect');\n\nfunction reducePropsToState(propsList) {\n var innermostProps = propsList[propsList.length - 1]...
javascript
chosen
[ { "from": "system", "value": "fix: Transform must return a Buffer, not a String" }, { "from": "human", "value": "var through = require('through');\nvar join = require('path').join;\nvar basename = require('path').basename;\n\nmodule.exports = function(file) {\n if(basename(file) !== 'jsonl...
javascript
chosen
[ { "from": "system", "value": "Add a hard coded delay to _onProcessExit()\n" }, { "from": "human", "value": "// Karme Edge Launcher\n// =================\n\n// Dependencies\n// ------------\n\nvar urlparse = require('url').parse\nvar urlformat = require('url').format\n\n// Constants\n// ---------...
javascript
chosen
[ { "from": "system", "value": "Use process.cwd() to get actual project path.\n" }, { "from": "human", "value": "'use strict';\nvar path = require('path');\n\nmodule.exports = function(name){\n\n\t// read the project package.json\n\tvar pkg = require('./package.json');\n\n\t// make sure that the s...
javascript
chosen
[ { "from": "system", "value": "Support a final URL after potential redirects" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = Response;\n\n/**\n * A response from a web request\n *\n * @param {Number} statusCode\n * @param {Object} headers\n * @param {Buffer} body\n */\nfunction...
javascript
chosen
[ { "from": "system", "value": "Add basic Array.from polyfill for IE11\n" }, { "from": "human", "value": "(function() {\n var isIE11 = !!window.MSInputMethodContext && !!document.documentMode;\n\n if (isIE11) {\n // IE11 does not provide classList on SVGElements\n if (! (\"clas...
javascript
chosen
[ { "from": "system", "value": "Support creation of even stopped gradients using the constructor\n" }, { "from": "human", "value": "var color = require(\"color\"),\n\nvar Radient = function(obj) {\n}\n\nColor.prototype.stop = function(stop) {\n}\n\nColor.prototype.color = function(stop) {\n}\n\nCo...
javascript
chosen
[ { "from": "system", "value": "Remove now unnecessary initial action dispatch \n\n" }, { "from": "human", "value": "import { createStore } from 'redux'\nimport reducers from './reducers/index.js'\nimport { ActionCreators as UndoActionCreators } from 'redux-undo'\nimport * as actions from 'actions...
javascript
chosen
[ { "from": "system", "value": "Use ES6 syntax for node-land.\n" }, { "from": "human", "value": "/* eslint-env node */\n\"use strict\";\n\nmodule.exports = {\n name: \"ember-component-attributes\",\n\n setupPreprocessorRegistry: function(type, registry) {\n registry.add(\"htmlbars-ast-plugin\...
javascript
chosen
[ { "from": "system", "value": "Add code to create bin directory if it doesn't exist." }, { "from": "human", "value": "'use strict';\n\nconst fs = require('fs'),\n\tconfig = require('./config/generator.js'),\n\tlog = require('bunyan').createLogger({name: \"ProducerConsumer: index\"});\n\nconst gen...
javascript
chosen
[ { "from": "system", "value": "Add config for including google places library" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-place-autocomplete',\n contentFor: function(type, config) {\n var content = '';\n if (type === 'body-f...
javascript
chosen
[ { "from": "system", "value": "Update js ajax call method\n" }, { "from": "human", "value": "import * as utility from './utility.js'\n\n/**\n * the function to submit form via ajax in dendrogram\n * @returns {void} - nothing is returned from this function.\n */\nfunction generateBCT () {\n // Sh...
javascript
chosen
[ { "from": "system", "value": "Add early exits for typeof number, or typeof not \"object\"." }, { "from": "human", "value": "'use strict';\n\nvar toStr = Number.prototype.toString;\n\nmodule.exports = function isNumberObject(value) {\n\ttry {\n\t\ttoStr.call(value);\n\t\treturn true;\n\t} catch (...
javascript
chosen
[ { "from": "system", "value": "Remove non-standard homebrew install path\n" }, { "from": "human", "value": "const { delimiter } = require(\"path\");\nconst Color = require(\"color\");\nconst which = require(\"which\");\n\nconst shell = getShell();\n\nmodule.exports.onWindow = (browserWindow) =>\n...
javascript
chosen
[ { "from": "system", "value": "Add attribution for isArray polyfill\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = Array.isArray || function (arg) {\n return Object.prototype.toString.call(arg) === '[object Array]';\n};\n" }, { "from": "gpt", "value": "'use stri...
javascript
chosen
[ { "from": "system", "value": "Initialize jobData and jobId constants.\n" }, { "from": "human", "value": "'use strict';\n\nconst AWS = require('aws-sdk');\nconst codePipeline = new AWS.CodePipeline();\n\nexports.handler = (event, context, callback) => {\n // TODO implement\n callback(null, ...
javascript
chosen
[ { "from": "system", "value": "Throw error on unsuccessful execCommand\n" }, { "from": "human", "value": "function copy(text) {\n var range = document.createRange();\n var newDiv = document.createElement(\"div\");\n var newContent = document.createTextNode(text);\n newDiv.appendChild(newConte...
javascript
chosen
[ { "from": "system", "value": "Remove usage of dump component.\n" }, { "from": "human", "value": "import React, { Component } from \"react\";\nimport { connect } from \"react-redux\";\nimport {\n SCREEN_STATE_PAGE_ENTER,\n SCREEN_STATE_PAGE_EXIT\n} from \"../screen/action\";\n\nimport Dumb from...
javascript
chosen
[ { "from": "system", "value": "Remove preserved values for now since they are the same\n" }, { "from": "human", "value": "/* eslint global-require:0 */\n\nmodule.exports = {\n map: { inline: true },\n plugins: [\n require('postcss-custom-properties')({\n importFrom: 'src/css/00_variable...
javascript
chosen
[ { "from": "system", "value": "i18n: Add comment explaining why our use of legacy-context works.\n" }, { "from": "human", "value": "/* @flow strict-local */\nimport { connect } from 'react-redux';\n\nimport React, { PureComponent } from 'react';\nimport { Text } from 'react-native';\nimport { Int...
javascript
chosen
[ { "from": "system", "value": "Improve wording of screen reader text so the user knows how to switch to a table view\n" }, { "from": "human", "value": "$(window).on('load', function() {\n if ($('.timeseries__chart').length == 0) {\n // Enhance markdown charts\n $('.highcharts-con...
javascript
chosen
[ { "from": "system", "value": "Update ngconstant version after releasing\n" }, { "from": "human", "value": "\"use strict\";\n// DO NOT EDIT THIS FILE, EDIT THE GRUNT TASK NGCONSTANT SETTINGS INSTEAD WHICH GENERATES THIS FILE\nangular.module('publisherApp')\n\n.constant('ENV', 'dev')\n\n.constant(...
javascript
chosen
[ { "from": "system", "value": "Add require statement for api\n" }, { "from": "human", "value": "\n\nmodule.exports = {\n\n login(username, password, callback) {\n api.login(username, password)\n .then((response) => {\n if(response.status === 400){\n if(callback) {\n ca...
javascript
chosen
[ { "from": "system", "value": "Remove the plottable typings todo as it is currently a good solution\nChange: 130777731\n" }, { "from": "human", "value": "/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may no...
javascript
chosen
[ { "from": "system", "value": "Remove http prefix from host\n\nThis is not needed, moreover, it break everything!\n" }, { "from": "human", "value": "\nimport * as actions from '../actions';\n\n\nconst url = (state = { host: 'http://localhost', port: 50051 }, action) => {\n switch (action.type) {...
javascript
chosen
[ { "from": "system", "value": "Use stage 0 features for postcss-preset-env\n" }, { "from": "human", "value": "const PostcssNormalize = require(\"postcss-normalize\");\nconst PostcssPxtorem = require(\"postcss-pxtorem\");\nconst PostcssPresetEnv = require(\"postcss-preset-env\");\nconst Stylelint ...
javascript
chosen
[ { "from": "system", "value": "client: Add server link to thumbnails.\n" }, { "from": "human", "value": "import React from 'react';\nimport { Card, CardHeader, CardTitle, CardMedia } from 'material-ui/Card';\n\nconst ServerThumbnail = ({\n server,\n media\n}) => (\n <Card className=\"thumb\">\...
javascript
chosen
[ { "from": "system", "value": "Remove user from connections upon disconnect\n" }, { "from": "human", "value": "var models = require('../db/models.js');\nvar io;\nvar connections = {};\n\nvar events = {\n //input: {userToken: string}\n init: function(data) {\n connections[data.userToken] = th...
javascript
chosen
[ { "from": "system", "value": "Remove debug console.log & dev comment\n" }, { "from": "human", "value": "import { call, take, put } from 'redux-saga/effects';\nimport { eventChannel } from 'redux-saga';\nimport io from 'socket.io-client';\nimport * as actions from '../actions/socket';\n\nfunction...
javascript
chosen
[ { "from": "system", "value": "Set threadpool numberOfThreads to availableProcessors.\n" }, { "from": "human", "value": "/**\n * @license\n * Copyright 2017 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\n package: 'foam.nanos.pool',\n ...
javascript
chosen
[ { "from": "system", "value": "chore(dist): Add latest generated build file (es5)\n" }, { "from": "human", "value": "\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (theme, mapper) {\n return function (props, defaultClass)...
javascript
chosen
[ { "from": "system", "value": "Use more meaningful function names\n" }, { "from": "human", "value": "const videoClip = {\n video: '',\n initWidth: 0,\n initHeight: 0,\n width: 0,\n height: 0,\n start: 0;\n end: 0;\n duration: function () {\n return t...
javascript
chosen
[ { "from": "system", "value": "Fix NoonPacific play state class\n" }, { "from": "human", "value": "controller = new BasicController({\n supports: {\n playpause: true,\n next: true,\n previous: true\n },\n playStateSelector: '[ng-click=\"PlayPauseClick()\"] i',\n playStateClass: 'fa-p...
javascript
chosen
[ { "from": "system", "value": "Add support for error detail\n" }, { "from": "human", "value": "var Promise = require(\"bluebird\");\n\nmodule.exports = (response, body) => {\n var outResponse = {\n statusCode: response.statusCode,\n headers: response.headers,\n body: body\n };\n\n if ...
javascript
chosen
[ { "from": "system", "value": "Add socket check to avoid uninstantiated error\n" }, { "from": "human", "value": "import config from '../config';\nimport createQueryString from './createQueryString';\nimport WebSocketClient from 'websocket.js';\n\nlet socket;\n\nexport function sendMessage(type, p...
javascript
chosen
[ { "from": "system", "value": "Add conditions for MAIL_SECURE configuration\n" }, { "from": "human", "value": "'use strict';\n\n/* Rename this file into local.env.js to add the configuration to server */\n\nmodule.exports = {\n MONGO_HOST: process.env.MONGO_HOST || 'localhost',\n MONGO_PORT...
javascript
chosen
[ { "from": "system", "value": "Make Resize mixin extend InitSize mixin\n\nThis is because Resize updates this.width and this.height, which means that\nconceptually it must depend on InitSize (which initializes those properties in\nthe constructor).\n" }, { "from": "human", "value": "import Resize...
javascript
chosen
[ { "from": "system", "value": "Use start and end of day\n" }, { "from": "human", "value": "import chrono from 'chrono-node'\nimport wholeMonth from 'chrono-refiner-wholemonth'\n\nexport default extractDates\n\nconst parser = new chrono.Chrono\nparser.refiners.push(wholeMonth)\n\nfunction extractD...
javascript
chosen
[ { "from": "system", "value": "Update the file serving script\n\nAdd logging for requests. Indicate the bound port. The previous version\ndid not work when node was updated. So the offending code was removed.\nThis has not been checked for backwards compatiblilty.\n" }, { "from": "human", "value"...
javascript
chosen
[ { "from": "system", "value": "TXTResults: Use CouchPotato to get results from db.\n" }, { "from": "human", "value": "import fetch from 'isomorphic-fetch';\nimport {\n TXT_RV_REQ,\n TXT_RV_RECV,\n TXT_RV_SELECT_ONE,\n TXT_RV_INVALIDATE,\n TXT_SELECTED_TEST,\n TXT_CANCEL_SELECTED...
javascript
chosen
[ { "from": "system", "value": "Disable pre-caching for now to simplify development\n" }, { "from": "human", "value": "importScripts(\n 'https://storage.googleapis.com/workbox-cdn/releases/6.2.0/workbox-sw.js',\n)\nconst { precaching, routing, strategies } = workbox\n\nconst CacheStrategy = str...
javascript
chosen