conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Load a file that actually exists on the filesystem.\n\n\n\ngit-svn-id: 87d19257dd11500985d055ec4730e446075a5f07@971 78c7df6f-8922-0410-bcd3-9426b1ad491b\n" }, { "from": "human", "value": "windmill.jsTest.require('shared.js');\n\n// Namespace obj to contain our tests...
javascript
chosen
[ { "from": "system", "value": "Allow for config outside of vendor directory\n" }, { "from": "human", "value": "module.exports = function(file, plugins) {\n if (plugins.globby.sync('./config/' + file).length) {\n return require('../config/' + file);\n }\n else {\n plugins.util.log(\n ...
javascript
chosen
[ { "from": "system", "value": "Set demo route to root\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport config from './config/environment';\n\nvar Router = Ember.Router.extend({\n location: config.locationType\n});\n\nRouter.map(function() {\n this.route('index', { path: '/i...
javascript
chosen
[ { "from": "system", "value": "Add windowId to store object on popup init\n" }, { "from": "human", "value": "import { createUIStore } from 'redux-webext';\nimport addEventListeners from './event-listeners';\nimport { populateTabList } from './dom-utils';\n\n// Initialize tabs\ncreateUIStore()\n ...
javascript
chosen
[ { "from": "system", "value": "Fix a translation bug for en -> en_US fallback\n" }, { "from": "human", "value": "import translations from './translations/accessibility-cloud.js-widget/translations';\n\nfunction findLocaleWithCountry(localeWithoutCountry) {\n const regexp = new RegExp(`^${localeW...
javascript
chosen
[ { "from": "system", "value": "Remove useless spacing in the tests\n" }, { "from": "human", "value": "var replace = require(\"../str-replace\");\nvar expect = require(\"expect.js\");\n\ndescribe(\"Replace first\", function() {\n\n it(\"should replace first occurrences\", function() {\n expect...
javascript
chosen
[ { "from": "system", "value": "Define test timeout for async tests\n" }, { "from": "human", "value": "import \"../cases/date/compare\";\nimport \"../cases/date/format\";\nimport \"../cases/dom/manipulate/remove\";\nimport \"../cases/dom/traverse/children\";\nimport \"../cases/dom/traverse/filter\...
javascript
chosen
[ { "from": "system", "value": "Hide the affiliate modal in the e2e theme download tests.\n" }, { "from": "human", "value": "/* Tests for themes generation\n */\n\ndescribe('Themes', function () {\n\n var async = function(arr, delay, done) {\n var j = 0;\n\n var runner = function() {\n ...
javascript
chosen
[ { "from": "system", "value": "Add click function in order to display a trait type by id\n" }, { "from": "human", "value": "$(document).ready(function(){\n var div = d3.select(\"body\").append(\"div\")\n .attr(\"class\", \"tooltip\")\n .style(\"opacity\", 0);\n\n var i...
javascript
chosen
[ { "from": "system", "value": "Fix indentation and remove trailing whitespaces\n" }, { "from": "human", "value": "'use strict';\n\n/* Constants */\n\n<%= angularAppName %>.constant('USER_ROLES', {\n all: '*',\n admin: 'ROLE_ADMIN',\n user: 'ROLE_USER'\n });\n\n/* \nLanguag...
javascript
chosen
[ { "from": "system", "value": "Add min and max prop\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport AgileTextField from '../AgileTextField';\nimport numberValidator from '../Utils/Validators/number';\n\nconst styles = {\n};\n\nclass NumberField extends Compone...
javascript
chosen
[ { "from": "system", "value": "Change TPPLA to gen 6" }, { "from": "human", "value": "\"use strict\";\n\nexports.BattleScripts = {\n};\n\n// Import the Mix and Mega scripts\n// require(\"../mixandmega/scripts\").inject(exports);\n" }, { "from": "gpt", "value": "\"use strict\";\n\nexpo...
javascript
chosen
[ { "from": "system", "value": "Add ability to fetch accounts\n" }, { "from": "human", "value": "var bitcoin = require('bitcoin')\n\nmodule.exports = window.bitcoin = Bitcoin\n\nfunction Bitcoin(opts) {\n if (!(this instanceof Bitcoin))\n return new Bitcoin(opts)\n\n this.opts = opts\n conso...
javascript
chosen
[ { "from": "system", "value": "Revert \"Fixed relative require of Class\"\n\nThis reverts commit f714945bbbb8f4b8b9be18f8d6c6c435f2718d85.\n" }, { "from": "human", "value": "\nrequire.paths.unshift(__dirname + '/support/ext/lib')\nrequire.paths.unshift(__dirname + '/support/haml/lib')\nrequire.pa...
javascript
chosen
[ { "from": "system", "value": "Disable holding down arrow keys to move fast.\n" }, { "from": "human", "value": "function Player(Character) {\n this.character = Character;\n this.score = document.getElementById(\"player-score\");\n this.controls = [38, 39, 40, 37]; // == Arrow keys\n}\n\n...
javascript
chosen
[ { "from": "system", "value": "Add Seven Hour mock data.\n" }, { "from": "human", "value": "const CurrentData = {\n display_location: {\n full: 'Den'\n },\n temp_f: 70\n};\n\nconst ForecastData = {\n txt_forecast: {\n forecastday:[{\n title: 'Monday',\n fcttext: 'Clear all day...
javascript
chosen
[ { "from": "system", "value": "Hotifx: Remove highly error prone datauri test\n\nThis was causing issues on normal refresh of page after initial load as it is async and fails due to some caching issue IDK\n" }, { "from": "human", "value": "/*\n* ADR Reporting\n* Copyright (C) 2017 Divay Prakash\n...
javascript
chosen
[ { "from": "system", "value": "Set min height for left hand nav.\n\nAddresses comment: https://github.com/amazeeio/lagoon/pull/1065#pullrequestreview-232241438\r\n\r\nLog viewer should have a min-height so that it's longer than the left hand navigation." }, { "from": "human", "value": "import Rea...
javascript
chosen
[ { "from": "system", "value": "Fix `externals` option of webpack config\n" }, { "from": "human", "value": "import path from 'path'\n\nconst library = 'postcss-js-loader'\nconst srcPath = path.resolve(__dirname, 'src')\nconst libPath = path.resolve(__dirname, 'lib')\n\nexport default {\n target: ...
javascript
chosen
[ { "from": "system", "value": "Fix jquery utility function of jquery-console\n" }, { "from": "human", "value": "define(['view/FillDownView', 'Tiny', 'jqueryconsole'], function (FillDownView, Tiny) {\n return FillDownView.extend({\n initialize: function (options) {\n options = options || ...
javascript
chosen
[ { "from": "system", "value": "Remove query from Sizes collection url\n\n(cherry picked from commit ca808fb15f0ce3b6da46fb2198d88b8ed807fce1)\n" }, { "from": "human", "value": "define(function (require) {\n \"use strict\";\n\n var Backbone = require('backbone'),\n _ = require('underscore'),\...
javascript
chosen
[ { "from": "system", "value": "Copy new implementation of $trWrapper and $tr from i18n.js\n" }, { "from": "human", "value": "import vue from 'vue';\nimport vuex from 'vuex';\nimport router from 'vue-router';\nimport vueintl from 'vue-intl';\n\nvue.prototype.Kolibri = {};\nvue.config.silent = true...
javascript
chosen
[ { "from": "system", "value": "Add ali namespace declaration to empty JATS template.\n" }, { "from": "human", "value": "import { DefaultDOMElement } from 'substance'\n\nconst EMPTY_JATS = `<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE article PUBLIC \"-//NLM//DTD JATS (Z39.96) Journal Arc...
javascript
chosen
[ { "from": "system", "value": "Set initial state to value injected into window\n" }, { "from": "human", "value": "import 'babel-core/polyfill';\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { ReduxRouter } from 'redux-router';\ni...
javascript
chosen
[ { "from": "system", "value": "Handle early lines with no point spreads from Bovada\n" }, { "from": "human", "value": "const crypto = require('crypto');\nconst jp = require('jsonpath');\nconst NFLWeek = require('./NFLWeek');\n\nmodule.exports.call = json => jp\n .query(JSON.parse(json), '$..item...
javascript
chosen
[ { "from": "system", "value": "Change Disqus post identifier to match old site\n" }, { "from": "human", "value": "import React from 'react'\nimport ReactDisqusComments from 'react-disqus-comments'\n\nconst Disqus = ({ postNode, siteMetadata }) => {\n const post = postNode.frontmatter\n const ur...
javascript
chosen
[ { "from": "system", "value": "Add layer to highlight the location's mobile data\n" }, { "from": "human", "value": "import { useEffect } from 'react';\nimport PropTypes from 'prop-types';\n\nimport { unusedBorderColor } from '../../utils/colors';\n\nexport default function MobilePointsLayer({ ma...
javascript
chosen
[ { "from": "system", "value": "Stop propagation from server form inputs.\n" }, { "from": "human", "value": "import bridge from '../common/bridge';\nimport React from 'react';\n\nexport default class ServerForm extends React.Component {\n render() {\n return (\n <form onSubmit={this.conne...
javascript
chosen
[ { "from": "system", "value": "Add runtime to mocha babel" }, { "from": "human", "value": "// ChaiAsPromised setup\n//\nvar chai = require('chai'),\n chaiAsPromised = require('chai-as-promised');\n\nchai.use(chaiAsPromised);\n\n// http://derpturkey.com/testing-asyncawait-with-babel-and-mocha\n...
javascript
chosen
[ { "from": "system", "value": "Fix factory interface, now uses static method\n" }, { "from": "human", "value": "'use strict'\n\nclass FactoryInterface {\n create () {\n throw new Error('Unimplemented method')\n }\n}\n\nmodule.exports = FactoryInterface\n" }, { "from": "gpt", "val...
javascript
chosen
[ { "from": "system", "value": "Add parameter pattern: url to setting file." }, { "from": "human", "value": "/* Source View | SyntaxHighlirhter | JavaScript, html5 and CSS3 Study | (c) 2014 twitter@sumo_ninja_jp\n*/\n\nvar sv = function() {\n var param = window.location.search.substring( 1 );\n ...
javascript
chosen
[ { "from": "system", "value": "Remove currently shown card when all results are filtered out.\n" }, { "from": "human", "value": "function addRowListeners(tableIdentifier) {\r\n\t$(tableIdentifier + ' tr').click(function() {\r\n\t\tselectDetailCard(this);\r\n\t});\r\n}\r\n\r\nfunction selectFirstC...
javascript
chosen
[ { "from": "system", "value": "Disable headings in forum posts\n" }, { "from": "human", "value": "// Site-specific settings\n//\n\n'use strict';\n\nconst Promise = require('bluebird');\n\n\nmodule.exports = Promise.coroutine(function* (N) {\n let store = N.settings.getStore('global');\n\n if (!...
javascript
chosen
[ { "from": "system", "value": "Handle trigger in own function\n" }, { "from": "human", "value": "var faye = require('faye')\n path = require('path');\n\nvar configPath = path.join(__dirname, '..', '..', 'shared', 'config.json'),\n config = require(configPath),\n client = new faye.Client(...
javascript
chosen
[ { "from": "system", "value": "Remove UNIQUE constraint until we're sure we need it, as it's easier to add later than remove\n" }, { "from": "human", "value": "var dbm = require('db-migrate');\nvar type = dbm.dataType;\n\nexports.up = function(db, callback) {\n db.runSql(\"CREATE TABLE IF NOT EX...
javascript
chosen
[ { "from": "system", "value": "Fix broken RegExp in Travis mentions\n" }, { "from": "human", "value": "// PiscoBot Script\n\nvar commandDescription = {\n name: 'Travis CI Build Fails',\n author: 'Daniel Gallegos [@that_taco_guy]',\n trigger: '',\n version: 1.0,\n description: 'Have the bot r...
javascript
chosen
[ { "from": "system", "value": "Fix image fallbacks for journey module\n\nNoscript & img tags were not being output when JS was disabled for certain modules (in particular journey modules).\n" }, { "from": "human", "value": "var requirejs = require('requirejs');\n\nvar View = requirejs('extensions...
javascript
chosen
[ { "from": "system", "value": "Fix Object.assign polyfill via core-js\n" }, { "from": "human", "value": "require('core-js/modules/es6.object.assign');\n\n__DEV__ = true;\n" }, { "from": "gpt", "value": "Object.assign = require('core-js/library/fn/object/assign');\n\n__DEV__ = true;\n"...
javascript
chosen
[ { "from": "system", "value": "Order CMD according to alphabet, to make /cmds easier\n" }, { "from": "human", "value": "var { createActions } = require('./helpers');\n\nmodule.exports = { \n CHATIDLEN: 18,\n STEAMIDLEN: 17,\n CMD: createActions(\n 'connect',\n 'disconnect',...
javascript
chosen
[ { "from": "system", "value": "Use static data until EmberFire works with FastBoot\n" }, { "from": "human", "value": "import Ember from 'ember';\nconst { inject: { service }, Route } = Ember;\n\nexport default Route.extend({\n fastboot: service(),\n headData: service(),\n model() {\n if (!t...
javascript
chosen
[ { "from": "system", "value": "Add loading status, and response status from errors to verification scope.\n" }, { "from": "human", "value": "(function (angular) {\n 'use strict';\n\n var module = angular.module('user_management.verification');\n\n module.directive('verify', [\n '$...
javascript
chosen
[ { "from": "system", "value": "Allow to retrieve some configuration\n" }, { "from": "human", "value": "const path = require('path');\n\nfunction createPattern(pattern) {\n return { 'pattern': pattern, 'included': true, 'served': true, 'watched': false };\n}\n\nfunction initReadJson(files) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add the new version distribution\n" }, { "from": "human", "value": "/* name: focus , version: 0.1.13 description: Klee group framework for SinglePageApplication.*/ \n (function initialization(container) {var fmk = container.Fmk || {};fmk.name = 'focus';fmk.version =...
javascript
chosen
[ { "from": "system", "value": "tests/frontend: Test that platform select has expected default value\n" }, { "from": "human", "value": "const wizard = require('../utils/wizard');\n\nconst platformPageCommands = {\n test (platformEl) {\n this.expect.element('select#platformType').to.be.visible....
javascript
chosen
[ { "from": "system", "value": "Update root URL in service worker to have utm_source\n" }, { "from": "human", "value": "// JavaScript Document\n\n// Scripts written by YOURNAME @ YOURCOMPANY\n\ntoolbox.precache([\"/\", \"../styles/modern.css\"]);\ntoolbox.router.get(\"../media/*\", toolbox.cacheFi...
javascript
chosen
[ { "from": "system", "value": "Add vertical scroll for the left navigation menu\n" }, { "from": "human", "value": "\"use strict\";\n\nvar React = require(\"react\");\nvar LeftNav = require(\"material-ui/lib/left-nav\");\nvar List = require('material-ui/lib/lists/list');\nvar ListItem = require('m...
javascript
chosen
[ { "from": "system", "value": "Hide the label component for table editing.\n" }, { "from": "human", "value": "export default [\n {\n type: 'number',\n label: 'Number of Rows',\n key: 'numRows',\n input: true,\n weight: 0,\n placeholder: 'Number of Rows',\n tooltip: 'Enter th...
javascript
chosen
[ { "from": "system", "value": "Add some potentially helpful startup console output\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nprocess.title = 'timeline_serve';\n\nvar _ = require('underscore')._;\nvar express = require('express');\nvar socket = require('socket.io');\nvar fs = requi...
javascript
chosen
[ { "from": "system", "value": "Allow jshint process to run without failing the tests\n" }, { "from": "human", "value": "module.exports = function(grunt) {\n grunt.initConfig({\n jshint: {\n all: [\n 'VotingApplication/VotingApplication.Web/Scripts/Controllers/**/*.js',\n ...
javascript
chosen
[ { "from": "system", "value": "Format and log messages to console\n" }, { "from": "human", "value": "const eris = justcord.eris;\nconst config = justcord.config;\nconst chat = justcord.chat;\n\neris.on(\"messageCreate\", (message) => {\n chat.broadcast(message.content);\n});\n" }, { "f...
javascript
chosen
[ { "from": "system", "value": "Add a helper for mapping done callbacks to Promises\n" }, { "from": "human", "value": "// If you want to enhance the Jasmine execution context, just add into this file.\n\nrequire(\"UnderscoreMatchersForJasmine\");\n\n" }, { "from": "gpt", "value": "// I...
javascript
chosen
[ { "from": "system", "value": "Make icon easier to debug\n" }, { "from": "human", "value": "import styled from 'styled-components';\nimport icons, { map } from './helpers/icons';\n\nconst Icon = styled.i.withConfig({ displayName: 'Icon' })`\n font-family: 'Bandwidth';\n font-size: ${({ theme, s...
javascript
chosen
[ { "from": "system", "value": "Fix passing of environment flag\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nconst UI = require('console-ui');\nconst cli = require('cli');\n\nconst Project = require('../models/project');\nconst CommandFactory = require('../commands/command-factory');\...
javascript
chosen
[ { "from": "system", "value": "Add support email & brand\n" }, { "from": "human", "value": "var config = {\n\n\t// Your site title (format: page_title - site_title)\n\tsite_title: 'Raneto Docs',\n\n\t// The base URL of your site (can use %base_url% in Markdown files)\n\tbase_url: '',\n\n\t// Used...
javascript
chosen
[ { "from": "system", "value": "Use localStorage.get() to set initial data.\n" }, { "from": "human", "value": "import bus from 'bus'\nimport Store from 'localstorage-ns'\n\nexport default function plugin (app) {\n const localStorage = Store('settings', {\n serverURI: 'bloxparty-server.kvnneff....
javascript
chosen
[ { "from": "system", "value": "Switch from point objects to array for easier calculations\n" }, { "from": "human", "value": "'use strict';\n\nclass FixationsDataProcessor {\n\n constructor() {\n this.fixationsData = [];\n }\n\n process(fileContentsAsArray)\n {\n for(var ...
javascript
chosen
[ { "from": "system", "value": "Update get pretty date in clienside\n" }, { "from": "human", "value": "\nmodule.exports.getPrettyDate = function(date) {\n var month = date.getMonth() + 1;\n var day = date.getDate();\n\n if (month < 10) {\n month = \"0\" + month;\n } \n if (day < 10) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add StatusBar to unpkg bundle.\n" }, { "from": "human", "value": "const Core = require('./core/index.js')\n\n// Parent\nconst Plugin = require('./plugins/Plugin')\n\n// Orchestrators\nconst Dashboard = require('./plugins/Dashboard/index.js')\n\n// Acquirers\nconst D...
javascript
chosen
[ { "from": "system", "value": "Allow passing config as lazy-evaluated function\n" }, { "from": "human", "value": "import fs from 'fs'\nimport _ from 'lodash'\nimport postcss from 'postcss'\nimport cssnext from 'postcss-cssnext'\nimport stylefmt from 'stylefmt'\n\nimport defaultConfig from './defa...
javascript
chosen
[ { "from": "system", "value": "Check for promise.then instead of using instanceof\n\nWhen using polyfills for Promise, different polyfills have different implementations of Promise. An `instanceof` check can lead to unexpected results." }, { "from": "human", "value": "const isFunction = require('...
javascript
chosen
[ { "from": "system", "value": "Replace jsx routes with json routes\n\n- add react-router-config dependency\n- replace jsx routes in src/index src/app src/routes\n\nI did this because SSR should be easier to make then.\n" }, { "from": "human", "value": "import React from 'react'\nimport ReactDOM f...
javascript
chosen
[ { "from": "system", "value": "Fix bug on start date for schedule calendar planification\n" }, { "from": "human", "value": "define([], function() {\n \n 'use strict';\n\n /**\n * Save one row\n * @param {$resource} resource\n * @returns {Promise}\n */\n var saveRow...
javascript
chosen
[ { "from": "system", "value": "Add shadowcamerafov property to spotlight descriptor\n" }, { "from": "human", "value": "import THREE from 'three.js';\nimport LightDescriptorBase from './LightDescriptorBase';\n\nimport PropTypes from 'react/lib/ReactPropTypes';\n\nclass SpotLightDescriptor extends ...
javascript
chosen
[ { "from": "system", "value": "Adjust javascript for organisation feedback form\n" }, { "from": "human", "value": "$(document).on(\"click\", \".deletefeedback\", function(e){\n e.preventDefault();\n var feedbackid = $(this).attr('data-feedback-id');\n $(\"#feedback\"+feedbackid).remove()...
javascript
chosen
[ { "from": "system", "value": "Test Keyv is an instance of Keyv\n" }, { "from": "human", "value": "import test from 'ava';\nimport Keyv from '../';\n\ntest('Keyv is a function', t => {\n\tt.is(typeof Keyv, 'function');\n});\n\ntest('Keyv cannot be invoked without \\'new\\'', t => {\n\tt.throws(()...
javascript
chosen
[ { "from": "system", "value": "Reset the url hash when we click to reload the page\n\nWe want to clear out that kind of state so things can load completely.\n" }, { "from": "human", "value": "/*\n * @flow\n */\n\nimport * as React from 'react';\n\nexport default function Navbar() {\n return (\n ...
javascript
chosen
[ { "from": "system", "value": "Update action item distribution alert text to better reflect current application logic\n" }, { "from": "human", "value": "export default {\n \"prime-directive\": {\n alert: null,\n confirmationMessage: \"Are you sure want to proceed to the Idea Generation sta...
javascript
chosen
[ { "from": "system", "value": "Fix a few CS issues\n" }, { "from": "human", "value": "'use strict';\n\nvar NavbarDirective = function ($window, eehNavigation) {\n return {\n restrict: 'AE',\n templateUrl: 'template/eeh-navigation/decoupled/eeh-navigation-navbar.html',\n li...
javascript
chosen
[ { "from": "system", "value": "Migrate tslint block to webpack 2\n" }, { "from": "human", "value": "/**\n * Tslint webpack block.\n *\n * @see https://github.com/wbuchwalter/tslint-loader\n */\n\nmodule.exports = tslint\n\n/**\n * @param {object} [options] See https://github.co...
javascript
chosen
[ { "from": "system", "value": "Fix issue that did not render avatar when user logged in successfully\n" }, { "from": "human", "value": "const router = require('express').Router();\nconst data = require(\"../data\");\nconst forumsData = data.forums;\n\nrouter.get('/', (req, res) => {\n\tlet userIn...
javascript
chosen
[ { "from": "system", "value": "Replace group, team, userMembers,and subdivisionMembers with isTwoPeople and group\n" }, { "from": "human", "value": "\"use strict\";\n\nmodule.exports = function(imports) {\n\n let mongoose = imports.modules.mongoose;\n\n let Schema = mongoose.Schema;\n l...
javascript
chosen
[ { "from": "system", "value": "fix: Make running tests work off the bat\n" }, { "from": "human", "value": "\n/*!\n * Common test dependencies.\n */\n\n// expose the globals that are obtained through `<script>` on the browser\nexpect = require('../expect')\n" }, { "from": "gpt", "value...
javascript
chosen
[ { "from": "system", "value": "Add client ID to API requests" }, { "from": "human", "value": "var API_URL = \"https://domai.nr/api/json/search?q=\";\n\nfunction run() {\n LaunchBar.openURL(\"https://domai.nr/\");\n}\n\nfunction runWithString(string) {\n LaunchBar.openURL(string.indexOf(\"ht...
javascript
chosen
[ { "from": "system", "value": "Fix router behaviour for manually changed URLs\n" }, { "from": "human", "value": "class RcdHistoryRouter {\n constructor() {\n this.routes = {};\n this.defaultRoute;\n window.onpopstate = (event) => this.setState(event.state);\n }\n\n i...
javascript
chosen
[ { "from": "system", "value": "Add addTemplate() which help send template of a user to the database\n" }, { "from": "human", "value": "angular.module('sparrow')\n.controller('TimedCtrl', function() {\n this.workout = [];\n //workout contain template created by user.\n this.addWorkout = functi...
javascript
chosen
[ { "from": "system", "value": "Add hidden files (.*) to forever watch ignore patterns\n" }, { "from": "human", "value": "#!/usr/bin/env node\nvar forever = require('forever-monitor');\n\n// TODO: Use official forever repo as dependency once\n// ignorePattern bug has been fixed\nvar server = new f...
javascript
chosen
[ { "from": "system", "value": "Add preloaded state fallback value\n" }, { "from": "human", "value": "import thunk from 'redux-thunk';\nimport {\n applyMiddleware,\n combineReducers,\n createStore,\n} from 'redux';\nimport { composeWithDevTools } from 'redux-devtools-extension/logOnlyInProducti...
javascript
chosen
[ { "from": "system", "value": "Revert calendar logo config name update\n\nCP-2476\n" }, { "from": "human", "value": "module.exports = {\n logo: 'src/assets/protoncalendar.svg',\n favicons: {\n appName: 'Proton Calendar',\n appDescription:\n 'Keep your plans private ...
javascript
chosen
[ { "from": "system", "value": "Use environment to detect gecko in mouse wheel\n" }, { "from": "human", "value": "(function() {\n var bound = false;\n var target = document.body;\n \n var synthesizer = function(e) {\n var delta;\n\n if (e.wheelDelta) {\n delta = e.wheelDelta / 120;\...
javascript
chosen
[ { "from": "system", "value": "Use secure url for cloudinary\n" }, { "from": "human", "value": "var path = require('path'),\n config;\n\nconfig = {\n production: {\n url: process.env.BASE_URL || 'http://blog.ertrzyiks.pl/',\n\n mail: {},\n\n database: {\n cli...
javascript
chosen
[ { "from": "system", "value": "fix(ts2dart): Adjust to new ts2dart API.\n" }, { "from": "human", "value": "// Transpiles JavaScript and TypeScript code to Dart using ts2dart.\n\nvar ts2dart = require('ts2dart');\nvar rundartpackage = require('../build/rundartpackage.js');\n\nmodule.exports = {\n ...
javascript
chosen
[ { "from": "system", "value": "Hide starting dots when n/a\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Dots from './Dots';\nimport StartingDots from './StartingDots';\nimport dotSelector from '../utils/dotSelector';\nim...
javascript
chosen
[ { "from": "system", "value": "Add ability to specify email_check_hash for createUser\n" }, { "from": "human", "value": "import uuid from 'uuid';\nimport bcrypt from 'bcrypt';\nimport { Factory } from 'rosie';\nimport faker from 'faker';\n\nimport { bookshelf } from '../db';\n\n\nconst User = boo...
javascript
chosen
[ { "from": "system", "value": "Handle different movie release date estimation formats.\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('mementoMovieApp')\n .filter('ordinalDate', function ($filter) {\n var suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n\n return function(...
javascript
chosen
[ { "from": "system", "value": "Implement IntersectionObserver for lazy loading images.\n" }, { "from": "human", "value": "(function($){\n\tconsole.log('ready!');\n\tif ( $('.owl-carousel').length > 0 ) {\n\t\t$('.owl-carousel').owlCarousel({\n\t\t\titems: 1,\n\t\t\tlazyLoad: true,\n\t\t\tloop: tr...
javascript
chosen
[ { "from": "system", "value": "Change the IP to the new elastic IP\n" }, { "from": "human", "value": "'use strict';\n/*\n * App config overrides for staging.\n */\n\nmodule.exports = {\n environment: 'staging',\n api: 'http://52.91.217.210:4000'\n};\n" }, { "from": "gpt", "value": "...
javascript
chosen
[ { "from": "system", "value": "Save compiled JavaScript into the build/js directory\n" }, { "from": "human", "value": "/* browserify task\n ---------------\n Bundle javascripty things with browserify!\n\n If the watch task is running, this uses watchify instead\n of browserify for faster ...
javascript
chosen
[ { "from": "system", "value": "Update animated counter example to use generator function to animate\n" }, { "from": "human", "value": "import makeOrganism from '../../../src'\nimport nextFrame from '../../../src/nextFrame'\nimport Counter from '../components/Counter'\n\nexport default makeOrganis...
javascript
chosen
[ { "from": "system", "value": "Move the insertion to the class performing the action.\n" }, { "from": "human", "value": "import NodePatcher from './../../../patchers/NodePatcher.js';\nimport type { Editor, Node, ParseContext } from './../../../patchers/types.js';\n\nexport default class ArrayInit...
javascript
chosen
[ { "from": "system", "value": "emojiRow: Create `handlePress` function to to call onPress with param.\n\nSo that, instead of creating new arrow function for each emojiRow,\nthere can be a single function which can be called with corresponding\nemoji name to autocomplete.\n" }, { "from": "human", ...
javascript
chosen
[ { "from": "system", "value": "Create main App component structure\n" }, { "from": "human", "value": "import React from 'react';\nimport { render } from 'react-dom';\n\nconst App = () => (\n\t<div className=\"container\">\n\t\t{/* add components here */}\n\t</div>\n);\n\nexport default App;\n" ...
javascript
chosen
[ { "from": "system", "value": "Update device revoke icon margin\n" }, { "from": "human", "value": "// @flow\n\nimport React from 'react'\nimport type {Props} from './index.render'\nimport {Confirm, Box, Text, Icon} from '../../common-adapters'\nimport {globalStyles, globalColors} from '../../styl...
javascript
chosen
[ { "from": "system", "value": "Allow the user to override the whole configuration\n\nFixes #1860" }, { "from": "human", "value": "/* global hexo */\n\nvar merge = require('./merge');\n\n/**\n * Merge configs in _data/next.yml into hexo.theme.config.\n * Note: configs in _data/next.yml will overri...
javascript
chosen
[ { "from": "system", "value": "Revert CreatedAware fpr now as adds complexity to proxy delegate replacement on rollup.\n" }, { "from": "human", "value": "/**\n * @license\n * Copyright 2019 The FOAM Authors. All Rights Reserved.\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfoam.CLASS({\...
javascript
chosen
[ { "from": "system", "value": "feat: Set role dialog for modal\n\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport $ from 'jquery';\n\nexport default Ember.Component.extend({\n didInsertElement () {\n const $emEl = this.$();\n const $modalBtn = $('[em-modal-open]');\n\n...
javascript
chosen
[ { "from": "system", "value": "Create maylog channel for punishments\n" }, { "from": "human", "value": "const config = require('../config/config.json').PREFIX\nexports.run = async (client, guild) => {\n\n let Id = guild.channels.get(guild.channels.filter(i=> i.type === \"text\").map(i => i)[0].i...
javascript
chosen
[ { "from": "system", "value": "Remove findIndex in Nashorn polyfill\n" }, { "from": "human", "value": "var global = this;\nvar window = global;\n\nvar console = {};\nconsole.debug = print;\nconsole.warn = print;\nconsole.log = print;\nconsole.error = print;\n\nif (!Array.prototype.findIndex) {\n ...
javascript
chosen
[ { "from": "system", "value": "BUGFIX: Allow the fetch API to be used since we polyfill it globally" }, { "from": "human", "value": "module.exports = {\n\tparser: 'babel-eslint',\n\textends: [\n\t\t'xo',\n\t\t'xo-react',\n\t\t'plugin:jsx-a11y/recommended',\n\t\t'plugin:promise/recommended',\n\t\t...
javascript
chosen
[ { "from": "system", "value": "Support variables with - and _ symbols\n" }, { "from": "human", "value": "import * as postcss from 'postcss';\nimport * as _ from 'underscore';\n\nexport default postcss.plugin('postcss-themeize', (options = {}) => {\n const themesOptions = options.themes || {};\...
javascript
chosen
[ { "from": "system", "value": "Allow other versions of ember-getowner-polyfill\n\nThe 2.0 update simply removes a deprecated way of calling this addon. We\ncan allow both since it seems like addons have updated to not use the\nbad syntax.\n" }, { "from": "human", "value": "/* eslint-env node */\n...
javascript
chosen