conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Make sure the runInternal only does work only when a files is actually changed\n" }, { "from": "human", "value": "Blend.defineClass('Builder.commands.build.webapp.Builder', {\n extend: 'Builder.commands.build.Base',\n runInternal: function () {\n var me...
javascript
chosen
[ { "from": "system", "value": "Add version constraint on `minifier-js@1.2.18-beta.0`.\n" }, { "from": "human", "value": "Package.describe({\n name: 'standard-minifier-js',\n version: '1.2.3-beta.0',\n summary: 'Standard javascript minifiers used with Meteor apps by default.',\n documentation:...
javascript
chosen
[ { "from": "human", "value": "Replace symlink with correct JS\n" }, { "from": "gpt", "value": "prompt('Your bookmarklet is outdated. Please replace it with the value below.', \"javascript:(function(){var d=document,s=d.createElement('script');s.src='https://rawgit.com/cameroncondry/cbc-kitten-sci...
javascript
chosen
[ { "from": "system", "value": "Change main API export format.\n\nFix for babel-6 change.\n" }, { "from": "human", "value": "import Value from \"./components/Value\";\nimport ValueList from \"./components/ValueList\";\n\n/**\n * Public API.\n */\nexport default {\n Value,\n ValueList\n};\n" },...
javascript
chosen
[ { "from": "system", "value": "Update comment to be more React-agnostic\n\nThis package doesn't know about React, so let's make this comment a bit\nclearer for this context.\n" }, { "from": "human", "value": "import TargetEventHandlers from './TargetEventHandlers';\n\nconst EVENT_HANDLERS_KEY = '...
javascript
chosen
[ { "from": "system", "value": "Rename basicParser variable to pegParser\n" }, { "from": "human", "value": "(function () {\n /* jshint maxstatements: 1000 */\n'use strict';\nvar basicParser;\nbasicParser = require('./parser.peg.js');\n\n/**\n * [newpage]\n * [chapter:.*]\n * [pixivimage:\\d*(-\\d*...
javascript
chosen
[ { "from": "system", "value": "Make sure the context menu never overflows\n\nFixes #22\n" }, { "from": "human", "value": "function ContextMenu(posX, posY, items) {\n this.posX = posX;\n this.posY = posY;\n this.items = items;\n this.rootNode = null;\n}\n\nContextMenu.prototype = {\n show() {...
javascript
chosen
[ { "from": "system", "value": "Fix typo in console message" }, { "from": "human", "value": "import React from 'react';\n\nexport let IntercomAPI = window.Intercom || function() { console.warn('Intercome not initialized yet') };\n\nexport default class Intercom extends React.Component {\n static ...
javascript
chosen
[ { "from": "system", "value": "Move ‘);’ statement to new line, to improve readability\n" }, { "from": "human", "value": "import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport { Provider } from \"react-redux\";\nimport store from \"./stores/Store.js\";\nimport App from \"./com...
javascript
chosen
[ { "from": "system", "value": "Remove project ID from SW\n\nChange-Id: Ia3d95aa2adfaf162aeadfd4ec9a06868f21b63ec\n" }, { "from": "human", "value": "// Give the service worker access to Firebase Messaging.\n// Note that you can only use Firebase Messaging here, other Firebase libraries\n// are not...
javascript
chosen
[ { "from": "system", "value": "Fix `property`, not `name` as iteration variable\n\nThis addresses an Eslint find:\n```\n 2:8 error Read-only global 'name' should not be modified no-global-assign\n```\n\nWe could continue to use `name` as the variable here, but that is less\ndescriptive than `for property...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"added accessor for getting marker ID\"\"\n\nThis reverts commit 8774cdfa1cf8706b06ef2eeedb183576fd8b3be0.\n" }, { "from": "human", "value": "L.SmoothMarkerTransition = L.Marker.extend({\n options: {\n traverseTime: 1000,\n clickable: false\n...
javascript
chosen
[ { "from": "system", "value": "Change how proxy is applied\n\n" }, { "from": "human", "value": "import ContextMenu from './Component/ContextMenu';\nimport withProxy from './util/withProxy';\n\nexport { default as Item } from './Component/Item';\nexport { default as Separator } from './Component/S...
javascript
chosen
[ { "from": "system", "value": "fix: Fix an error about Redux enhancers\n" }, { "from": "human", "value": "import { createStore, combineReducers } from 'redux';\nimport { VERSION, CONSTRAINT } from './actions';\nimport semver from './semver';\n\nconst initialState = {\n version: { version: '', ...
javascript
chosen
[ { "from": "system", "value": "Remove unused options param from cmd util\n" }, { "from": "human", "value": "import { spawn } from 'child_process'\n\nconst MONTH_NAMES = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']\n\n//...
javascript
chosen
[ { "from": "system", "value": "Add remove() utility function for Arrays\n" }, { "from": "human", "value": "export function compose() {\n var fns = Array.from(arguments);\n\n return function(source) {\n return fns.reduce(function(result, fn) {\n return fn(result);\n }, source) ;\n };...
javascript
chosen
[ { "from": "system", "value": "Update imports to use json extensions in fixtures.\n" }, { "from": "human", "value": "/**\n * Tag Manager datastore fixtures.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may ...
javascript
chosen
[ { "from": "system", "value": "Change port for webpack dev server hot reload\n" }, { "from": "human", "value": "var path = require('path')\nvar webpack = require('webpack')\n\nmodule.exports = {\n devtool: 'inline-source-map',\n entry: [\n 'webpack-dev-server/client?http://localhost:3000',\n...
javascript
chosen
[ { "from": "system", "value": "Fix build path for browser benchmark entry\n" }, { "from": "human", "value": "\"use strict\";\n\nconst target = require( \"@pegjs/bundler/target\" );\n\nmodule.exports = [\n\n /* https://unpkg.com/pegjs@latest/dist/peg.js */\n target( {\n\n entry: requi...
javascript
chosen
[ { "from": "system", "value": "Remove classnames from umd build\n" }, { "from": "human", "value": "/* eslint-disable */\nconst webpack = require('webpack');\n\nmodule.exports = {\n mode: process.env.NODE_ENV || 'production',\n devtool: 'source-map',\n entry: './src/index.js',\n output: {\n ...
javascript
chosen
[ { "from": "system", "value": "Use min version of jQuery\n" }, { "from": "human", "value": "const path = require('path')\nconst webpack = require('webpack')\nconst pkg = require('./package')\n\nmodule.exports = {\n mode: 'production',\n entry: {\n main: [\n path.resolve(__dirname, 'node...
javascript
chosen
[ { "from": "system", "value": "Remove exclusion of node_modules as Uglify needs all code as ES5\n" }, { "from": "human", "value": "var path = require('path');\nvar webpack = require('webpack');\n\nmodule.exports = {\n regular: {\n output: {\n filename: 'meyda.js'\n },\n module: {\n ...
javascript
chosen
[ { "from": "system", "value": "Exclude a few more locations\n" }, { "from": "human", "value": "module.exports = {\n verbose: true,\n testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/extensions/'],\n testMatch: ['<rootDir>/src/**/*.test.js'],\n //\n collectCoverage: false,\n co...
javascript
chosen
[ { "from": "system", "value": "Move promise initialization to the first thing\n" }, { "from": "human", "value": "import 'babel-core/polyfill'\nimport 'whatwg-fetch'\n\nimport Promise from 'bluebird'\nPromise.longStackTraces()\n\nimport React from 'react'\nReact.initializeTouchEvents(true)\n\nimpo...
javascript
chosen
[ { "from": "system", "value": "Simplify LogWriter by making it a PassThrough\n\nAllows the use of pipe internally which is safer than wrapping writes\nto this.sink.\n" }, { "from": "human", "value": "var util = require('util');\nvar stream = require('stream');\nvar fs = require('fs');\n\nvar gene...
javascript
chosen
[ { "from": "system", "value": "Add unknown POST /fp-setup route\n" }, { "from": "human", "value": "'use strict';\n\nvar debug = require('debug')('airserver');\nvar router = require('router')();\n\nvar photo = require('./photo');\nvar serverInfo = require('./server-info');\n\nmodule.exports = func...
javascript
chosen
[ { "from": "system", "value": "Add plane and ambient light\n" }, { "from": "human", "value": "import React from 'react';\nimport {AppRegistry, asset, StyleSheet, Pano, Text, View} from 'react-vr';\n\nexport default class Island extends React.Component {\n render() {\n return (\n <View>\n...
javascript
chosen
[ { "from": "system", "value": "Comment out slow gas costing code\n" }, { "from": "human", "value": "var iSHA1 = artifacts.require(\"./iSHA1.sol\");\nvar SHA1 = artifacts.require(\"./SHA1.sol\");\nvar vectors = require('hash-test-vectors')\n\ncontract('SHA1', function(accounts) {\n var totalGas...
javascript
chosen
[ { "from": "system", "value": "Add callbacks to the unimplemented functions" }, { "from": "human", "value": "/*\n * Copyright (c) 2012, Joyent, Inc. All rights reserved.\n *\n * A brief overview of this source file: what is its purpose.\n */\n\n\nmodule.exports = {\n\tadd: add,\n\tmodify: modify,...
javascript
chosen
[ { "from": "system", "value": "Correct number of samples per web worker.\n" }, { "from": "human", "value": "export const simulate = (expr, inputs, numSamples) => {\n const data = {expr, numSamples: numSamples/4, inputs}\n return Promise.all(window.workers.map(worker => simulateOnWorker(worker, ...
javascript
chosen
[ { "from": "system", "value": "Optimize conditioning and improve truncation.\n\n\"tuj\" and \"ĝis\" should not be replaced.\n" }, { "from": "human", "value": "// Get selection and limit to only the first word, because vortaro.net\n// doesn't support sentences.\nfunction firstWord(text) {\n ret...
javascript
chosen
[ { "from": "system", "value": "Fix i18nPlugin issue introduced with g/277926\n\nTest Plan\n1. Pull down code\n2. `yarn storybook` should open storybook\n3. Should not throw an error for storybook regarding i18nPlugin\n\nChange-Id: I2fc15dfae332819d8e45993314f4d0529427520c\nReviewed-on: https://gerrit.instruc...
javascript
chosen
[ { "from": "system", "value": "task: Remove them cookies and maybe disable them?\n" }, { "from": "human", "value": "if (document.head.dataset.piwikHost) {\n window._paq = window._paq || [];\n /* tracker methods like \"setCustomDimension\" should be called before \"trackPageView\" */\n window._...
javascript
chosen
[ { "from": "system", "value": "Add option field on last field blur\n" }, { "from": "human", "value": "$.fn.options = function() {\n return $(this).each(function() {\n $(this).delegate(\"li input\", \"blur\", function() {\n var li = $(this).parent();\n \n if ($(this).val() == \"...
javascript
chosen
[ { "from": "system", "value": "web: Fix static path for production bundle\n" }, { "from": "human", "value": "var path = require('path'),\n webpack = require('webpack');\n\nmodule.exports = {\n cache: true,\n entry: './src/main.js',\n output: {\n path: path.join(__dirname, \"build\"),\n ...
javascript
chosen
[ { "from": "system", "value": "Change js coverage report format for jenkins\n" }, { "from": "human", "value": "module.exports = function(config) {\n config.set({\n basePath: '../../',\n\n files: [\n 'web/js/vendor/angular.js',\n 'web/js/vendor/angular-*.js',...
javascript
chosen
[ { "from": "system", "value": "Fix bug: Show Opbeat response code if error is returned\n" }, { "from": "human", "value": "var util = require('util');\n\nvar http = require('http');\nfunction HTTPTransport() {\n // Opbeat currently doesn't support HTTP\n this.defaultPort = 80;\n this.tran...
javascript
chosen
[ { "from": "system", "value": "Improve explanation and naming of variable\n\nPer @DavidRans' request.\n" }, { "from": "human", "value": "define(['underscore'], function(_) {\n /**\n * @param spec - The spec for this column's indicators\n * @param prefilter - An (optional) parent Indicator...
javascript
chosen
[ { "from": "system", "value": "Add check for websocket URI\n" }, { "from": "human", "value": "'use strict';\n\nfunction EoleWebsocketClient(autobahn, webSocketUri, $q) {\n /**\n * @param {String} accessToken\n *\n * @returns {Promise} A socket session promise.\n */\n this.op...
javascript
chosen
[ { "from": "system", "value": "Fix version typo in grunt task\n" }, { "from": "human", "value": "'use strict';\n\nvar grunt = require('grunt');\n\n\n// Check that the version we're exporting is the same one we expect in the\n// package. This is not an ideal way to do this, but makes sure that we ...
javascript
chosen
[ { "from": "system", "value": "Set errno property on error object for browsers\n" }, { "from": "human", "value": "exports.load = function(url, callback) {\n\tvar xhr = new XMLHttpRequest();\n\n\txhr.onreadystatechange = function() {\n\t\tif (xhr.readyState !== 4) {\n\t\t\treturn;\n\t\t}\n\n\t\tif...
javascript
chosen
[ { "from": "system", "value": "Reduce complexity of oBoolean function\n" }, { "from": "human", "value": "'use babel';\n'use strict';\n\nconst process = require('process');\n\nvar Common = function () {\n\tconst isWin = (/^win/.test(process.platform));\n\tconst pathSeparator = (isWin) ? ';' : ':';...
javascript
chosen
[ { "from": "system", "value": "Allow passing and inheriting a constructor method, stored as _constructor\n" }, { "from": "human", "value": "'use strict';\n\nvar common = require('./common');\n\nvar create = function (params) {\n /*\n extends -- (optional) list of object prototypes to in...
javascript
chosen
[ { "from": "system", "value": "Test: Use destroy for test clean up\n" }, { "from": "human", "value": "/* See license.txt for terms of usage */\r\n\r\n\"use strict\";\r\n\r\nconst { exist, addNewLayer, removeLayer } = require(\"./common.js\");\r\nconst { closeTab } = require(\"sdk/tabs/utils\");\r...
javascript
chosen
[ { "from": "system", "value": "Fix prependstream adding blank lines\n" }, { "from": "human", "value": "'use strict';\n\nvar Writable = require('readable-stream/writable');\nvar inherits = require('util').inherits;\n\nmodule.exports = PrependStream;\n\nfunction PrependStream(prefix, options) {\n ...
javascript
chosen
[ { "from": "system", "value": "Fix error in test-cross handling of drake submitted event\n" }, { "from": "human", "value": "import actionTypes from '../action-types';\nimport { GUIDE_CONNECTED, GUIDE_ERRORED,\n GUIDE_MESSAGE_RECEIVED, GUIDE_ALERT_RECEIVED, ADVANCE_NOTIFICATIONS } from '....
javascript
chosen
[ { "from": "system", "value": "Use env var for env instead of hardcoded env for varsnap js\n" }, { "from": "human", "value": "const process = require('process');\n\nconst LogFit = require('logfit');\nconst Rollbar = require('rollbar');\nconst varsnap = require('varsnap');\n\nfunction setupRollbar...
javascript
chosen
[ { "from": "system", "value": "Reconnect to database on disconnect\n" }, { "from": "human", "value": "const path = require('path');\nconst fs = require('fs');\nconst streamsql = require('streamsql');\nconst config = require('./config');\nconst mysql = require('mysql');\n\nfunction getDbConfig (pr...
javascript
chosen
[ { "from": "system", "value": "Add user key for names\n" }, { "from": "human", "value": "const Router = require(\"falcor-router\");\nconst $ref = require('falcor').Model.ref;\nconst User = require(\"./models/User\");\n\nconst mock = {\n content: 'content',\n sub: 'subtitle',\n};\n\nmodule.expor...
javascript
chosen
[ { "from": "system", "value": "Use Livequery on default input action.\n" }, { "from": "human", "value": "$(document).ready(function() {\n \n $('a[rel*=facebox]').facebox();\n \n $('input[type=text][default]').each(function(){\n $(this).addClass('defaulted');\n $(this).attr('value', $(th...
javascript
chosen
[ { "from": "system", "value": "Remove z-depth from detail subregions.\n" }, { "from": "human", "value": "define(['backbone.marionette', 'underscore'],\n function(Marionette, _) {\n\n return Marionette.LayoutView.extend( {\n\n template: _.template(\n \"<div id='detail-container' cl...
javascript
chosen
[ { "from": "system", "value": "Use the middleware to authenticate in place of passport\n\n -- at lease for now there is no database lookup every time\n the token is verified.\n" }, { "from": "human", "value": "\n'use strict'\nconst passport = require('../../utils/passportService')\nconst rou...
javascript
chosen
[ { "from": "system", "value": "Update constant varriables to using const\n" }, { "from": "human", "value": "const mongoose = require('mongoose')\n\nconst userSchema = new mongoose.Schema({\n id: { type: String, index: { unique: true } },\n twitter_id: String,\n twitter_credentials: mongoose.Sc...
javascript
chosen
[ { "from": "system", "value": "Use real readthedocs API again\n" }, { "from": "human", "value": "// Main Module for searchthedocs demo\ndefine(function (require) {\n var _ = require('underscore'),\n $ = require('jquery'),\n SearchTheDocsView = require('searchthedocs/src/searchthedocs');\n\...
javascript
chosen
[ { "from": "system", "value": "Set webpack devtool to false in production\n" }, { "from": "human", "value": "const path = require('path')\n\nmodule.exports = ({ actions }) => {\n actions.setWebpackConfig({\n resolve: {\n alias: {\n '@components': path.resolve(__dirname, '../../com...
javascript
chosen
[ { "from": "system", "value": "Remove pendence ngRoute on OpenMining module\n" }, { "from": "human", "value": "angular.module('OpenMining', ['ngRoute'])\n.value('API_URL', '/process.json?')\n\n.controller('Process',\n function($scope, $http, $location, API_URL) {\n for (var key in $location.s...
javascript
chosen
[ { "from": "system", "value": "Fix secretName error while getting secret\n" }, { "from": "human", "value": "const SecretsManager = require(\"./secretsmanager\");\n\nclass Secrets {\n constructor(options) {\n this.options = options;\n if(!options.isDev) {\n if(!options.r...
javascript
chosen
[ { "from": "system", "value": "Worker: Fix run from global install\n" }, { "from": "human", "value": "#!/usr/bin/gjs\n// Runs a task in a separate process.\n\nconst path = /^.*?@(.*):/.exec(new Error().stack)[1];\nconst dirname = imports.gi.Gio.File.new_for_path(path).get_parent().get_parent().ge...
javascript
chosen
[ { "from": "system", "value": "Use an absolute path to resolve wrapper.js\n\nAnother attempt at #1\n" }, { "from": "human", "value": "const staticModule = require('static-module')\nconst through = require('through2')\nconst glslify = require('glslify')\nconst nodeResolve = require('res...
javascript
chosen
[ { "from": "system", "value": "Make tooltips work on mobile.\n" }, { "from": "human", "value": "import './Tooltip.css';\nimport './themes/default.css';\nimport './animations/zoom.css';\nimport React, { Component, PropTypes } from 'react';\nimport shallowCompare from 'react-addons-shallow-compare'...
javascript
chosen
[ { "from": "system", "value": "Update the examples to explicitly exit the process\n" }, { "from": "human", "value": "\"use strict\";\n\n// Simplest way to subscribe. Start the subscription and don't listen to \"error\" events\n// from the broker. This will cause the process to crash in case of er...
javascript
chosen
[ { "from": "system", "value": "Purge from all 11ty template languages.\n" }, { "from": "human", "value": "// @see https://github.com/postcss/postcss-loader#configuration\n\n// Standard lib.\nimport { join as joinPath } from 'path';\n\n// Package modules.\nimport autoprefixer from 'autoprefixer';\...
javascript
chosen
[ { "from": "system", "value": "Fix to work with Broccoli 0.4.x and thow error when `dest` is undefined\n" }, { "from": "human", "value": "/*\n * grunt-broccoli-build\n * https://github.com/ericf/grunt-broccoli-build\n *\n * Copyright 2014 Yahoo! Inc.\n * Licensed under the Yahoo! Inc. BSD license...
javascript
chosen
[ { "from": "system", "value": "Fix missing service in lecturerFactory\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular\n .module('lecturer')\n .factory('lecturerFactory', lecturerFactory);\n\n /* @ngInject */\n function lecturerFactory(lectur...
javascript
chosen
[ { "from": "system", "value": "Fix for reading non encoded messages\n" }, { "from": "human", "value": "const zlib = require('zlib'),\n R = require('ramda');\n\nconst gunzip = (data) => zlib.gunzipSync(data);\nconst gzip = (data) => zlib.gzipSync(data);\n\nconst decode = R.cond([\n [ R.pathS...
javascript
chosen
[ { "from": "system", "value": "Use `process.nextTick` to yield instead of `setTimeout`\n\nFixes an issue with min-webdriver where it async_script calls respond\nwith a timeout error if no timeout has been configured explicitly.\n" }, { "from": "human", "value": "/*global Mocha, window*/\n/*\n * m...
javascript
chosen
[ { "from": "system", "value": "Fix leave that returns callback.\n" }, { "from": "human", "value": "var slice = [].slice\n\nfunction Vestibule () {\n this._waiting = []\n this.occupied = false\n this.open = null\n}\n\nVestibule.prototype.enter = function (timeout, callback) {\n if (cal...
javascript
chosen
[ { "from": "system", "value": "Save old and new saldo in transaction instead of amount\n" }, { "from": "human", "value": "\nexports.up = (knex, Promise) => Promise.all([\n knex.schema.createTable('users', table => {\n table.uuid('id')\n .primary()\n .defaultTo(knex...
javascript
chosen
[ { "from": "system", "value": "Set up test directory for js testing\n" }, { "from": "human", "value": "/*\n * grunt-perl-tidy\n * https://github.com/rabrooks/grunt-perl-tidy\n *\n * Copyright (c) 2014 Aaron Brooks\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nmodule.exports = funct...
javascript
chosen
[ { "from": "system", "value": "Add more logging to see what this strange user is\n" }, { "from": "human", "value": "var moment = require('moment');\nvar userCache = {};\nvar cacheTimeInMilliseconds = 1000 * 60 * 15;\n\n/**\n * Every time a user posts a message, we update their slack profile so we...
javascript
chosen
[ { "from": "system", "value": "Change object to retrieve if the tab is active or not for onUpdated.\n" }, { "from": "human", "value": "chrome.tabs.onActivated.addListener(function(info) {\n\tchrome.tabs.get(info.tabId, function(tab) {\n\t\tupdateIcon(tab.url);\n\t});\n});\n\nchrome.tabs.onUpdated...
javascript
chosen
[ { "from": "system", "value": "Rewrite in plain JS and stop using deferreds\n" }, { "from": "human", "value": "// Generated by CoffeeScript 1.6.3\nvar Q, request;\n\nQ = require('q');\n\nrequest = require('request');\n\nexports.parse = function(zip) {\n var deferred;\n deferred = Q.defer();\n ...
javascript
chosen
[ { "from": "system", "value": "Fix left navigation selector issue\n" }, { "from": "human", "value": "/**\n *\n * Docbase engine\n * Appbase\n * MIT license\n */\n\n(function($, angular) {\n /*\n * Scrollspy.\n */\n $(function() {\n $(\"h2, h3\").scrollagent(function(cid, pid,...
javascript
chosen
[ { "from": "system", "value": "Convert Non-strict to strict equality checking\nConvert non-strict equality checking, using `==`, to the strict version, using `===`." }, { "from": "human", "value": "var debug = require(\"debug\")(\"provider\"); // eslint-disable-line no-unused-vars\nvar Web3 = req...
javascript
chosen
[ { "from": "system", "value": "Fix date format in the datepicker\n" }, { "from": "human", "value": "this.gts.datePicker = (function() {\n\n return function(input) {\n $(input).datepicker();\n };\n\n}());\n" }, { "from": "gpt", "value": "this.gts.datePicker = (function() {\n\n re...
javascript
chosen
[ { "from": "system", "value": "Update constructor to match aliased foreign key\n" }, { "from": "human", "value": "const User = require('./user');\nconst {Sequelize, db} = require('../connection');\n\nconst ClanModel = db.define('clan', {\n name: {\n type: Sequelize.STRING(64),\n allowNull:...
javascript
chosen
[ { "from": "system", "value": "Allow for a zero-length atom at the end" }, { "from": "human", "value": "define(['itemObjectModel', 'mac/roman'], function(itemOM, macRoman) {\n\n 'use strict';\n \n function open(item) {\n function onAtom(item, byteSource) {\n return byteSource.slice(0, ...
javascript
chosen
[ { "from": "system", "value": "Test resolution and rejection scenarios for promisification\n" }, { "from": "human", "value": "'use strict';\n\nvar angular = require('angular');\nvar expect = require('chai').use(require('chai-as-promised')).expect;\nvar sinon = require('sinon');\n\ndescribe('an...
javascript
chosen
[ { "from": "system", "value": "Remove EsLint preloader from tests\n" }, { "from": "human", "value": "process.env.NODE_ENV = 'test';\nconst path = require('path');\nconst DefinePlugin = require('webpack/lib/DefinePlugin')\n\nvar webpackConfig = require(path.join(__dirname, './node_modules/react-sc...
javascript
chosen
[ { "from": "system", "value": "Refactor the app startup to be async\n" }, { "from": "human", "value": "require('@maxdome/env');\n\nconst logging = require('@maxdome/logging')({\n level: process.env.LOG_LEVEL,\n});\nrequire('@maxdome/exception-handling')({ logging });\nconst appLogger = logging('...
javascript
chosen
[ { "from": "system", "value": "Test fetching sub-state of appReducer.\n" }, { "from": "human", "value": "import deepFreeze from 'deep-freeze';\nimport appReducer from './appReducer';\nimport { websocketConnected, websocketDisconnected } from './AppActions';\n\nit('na začátku', () => {\n const st...
javascript
chosen
[ { "from": "system", "value": "Fix tracked-controls example camera positioning\n" }, { "from": "human", "value": "/* global AFRAME */\nAFRAME.registerComponent('camera-position', {\n schema: {\n mobile: {type: 'vec3', default: '0 1.6 3'},\n desktop: {type: 'vec3', default: '0 1.6 3'}\n },...
javascript
chosen
[ { "from": "system", "value": "Move user info to /creds\n" }, { "from": "human", "value": "import { actions } from '../config/constants';\nimport { isOrgMember } from '../helpers/github';\nimport { ref, firebaseAuth } from '../config/constants'\n\nexport function logout() {\n return dispatch => ...
javascript
chosen
[ { "from": "system", "value": "Replace markdown lib in test config\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function(config) {\n\n var files = [];\n\n [\n 'jquery-1.8.2-min.js',\n 'angular.js',\n 'angular-resource.js',\n 'angular-mocks...
javascript
chosen
[ { "from": "system", "value": "Use removeObject instead of popObject\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport DS from 'ember-data';\n\nexport default DS.Model.extend({\n vendor: DS.belongsTo('vendor'),\n location: DS.attr('string'),\n manager: DS.belongsTo('account...
javascript
chosen
[ { "from": "system", "value": "Add progress back into the reducer list\n" }, { "from": "human", "value": "import { combineReducers } from 'redux';\nimport settings from './settings';\nimport application from './application';\nimport assess...
javascript
chosen
[ { "from": "system", "value": "Extend test cases to resolver function returning a non string\n" }, { "from": "human", "value": "/* eslint comma-dangle: 0 */\nimport createCachedSelector from '../index';\n\nlet memoizedFunction;\n\nbeforeEach(() => {\n memoizedFunction = jest.fn();\n});\n\ndescri...
javascript
chosen
[ { "from": "system", "value": "Remove sku from ignored test paths\n" }, { "from": "human", "value": "module.exports = {\n testPathIgnorePatterns: [\n '<rootDir>[/\\\\\\\\](dist|node_modules|sku)[/\\\\\\\\]'\n ],\n 'moduleNameMapper': {\n '\\\\.(css|less)$': 'identity-obj-proxy'\n },\n ...
javascript
chosen
[ { "from": "system", "value": "[RN] Use same video mute indicator icon as on the web\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport Icon from 'react-native-vector-icons/FontAwesome';\n\nimport styles from './styles';\n\n/**\n * Thumbnail badge for displaying ...
javascript
chosen
[ { "from": "system", "value": "Add messages field to server response\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Module dependencies.\n */\nvar _ = require('lodash'),\n\terrorHandler = require('../errors.server.controller'),\n\tmongoose = require('mongoose'),\n\tpassport = require...
javascript
chosen
[ { "from": "system", "value": "Fix jshint warnings in benchmark\n" }, { "from": "human", "value": "/** @license MIT License (c) copyright 2010-2013 original author or authors */\n\n/**\n * Licensed under the MIT License at:\n * http://www.opensource.org/licenses/mit-license.php\n *\n * @author: B...
javascript
chosen
[ { "from": "system", "value": "Refactor to enable cypress to work locally or on circle" }, { "from": "human", "value": "// ***********************************************\n// This example commands.js shows you how to\n// create various custom commands and overwrite\n// existing commands.\n//\n// ...
javascript
chosen
[ { "from": "system", "value": "Fix onboarding library route model keys" }, { "from": "human", "value": "HB.OnboardingLibraryRoute = Ember.Route.extend({\n \n model: function() {\n return Ember.RSVP.hash({\n anime: this.store.find('anime', { 'sort_by': 'user_count', 'sort_reverse': true ...
javascript
chosen
[ { "from": "system", "value": "Revert Commit to Goals Service\n" }, { "from": "human", "value": "// goalService.getAllGoals();\n//\nangular.module('sparrowFit')\n.service('goalService',function($http){\n\n this.getAllGoals= function (){\n var allGoals=$http.get('/api/get/goals');\n return ...
javascript
chosen
[ { "from": "system", "value": "Fix a bug when you could start an already running task\n" }, { "from": "human", "value": "import _ from 'lodash'\nimport {\n TASK__START,\n TASK__PROGRESS,\n TASK__ERROR,\n TASK__SUCCESS,\n TASK__CLEAR,\n} from '../../actions'\n\nconst setTaskState = (state, { ...
javascript
chosen
[ { "from": "system", "value": "Complete dependencies, get a hold of db obj\n" }, { "from": "human", "value": "import { ref } from 'config/constants'\n\nfunction saveToDucks (duck) {\n const duckId = ref.child('ducks').push().key() // not pushing anything,\n ...
javascript
chosen
[ { "from": "system", "value": "Add ignores for certain lifecycle hooks in EventListener component\n" }, { "from": "human", "value": "import {PureComponent as Component} from 'react'\nimport PropTypes from 'prop-types'\nimport {addEventListener, removeEventListener} from '@shopify/javascript-utili...
javascript
chosen
[ { "from": "system", "value": "Check that the directory exists before creating log file.\n" }, { "from": "human", "value": "\"use strict\";\nvar fs = require('fs');\nvar util = require('util');\nvar config = require('./config');\nvar log_path = config.logDir;\nvar log_name = new Date().toISOStrin...
javascript
chosen
[ { "from": "system", "value": "Deal with case that item lines already exist before SI finalised\n" }, { "from": "human", "value": "import Realm from 'realm';\nimport {\n addLineToParent,\n generateUUID,\n getTotal,\n} from '../utilities';\n\nexport class Transaction extends Realm.Object {\n g...
javascript
chosen
[ { "from": "system", "value": "Build search results view in new div\n" }, { "from": "human", "value": "import $ from 'jquery';\nimport * as Backbone from 'backbone';\n\nclass SearchResultsView extends Backbone.View {\n\n get el() { return '.content-area.search'; }\n\n initialize() {\n window...
javascript
chosen