conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Make sure button is before all other children\n" }, { "from": "human", "value": "HNSpecial.settings.registerModule(\"mark_as_read\", function () {\n function editLinks() {\n var subtexts = _.toArray(document.getElementsByClassName(\"subtext\"));\n\n subtexts....
javascript
chosen
[ { "from": "system", "value": "Tidy doc representation into swappable one-liner.\n" }, { "from": "human", "value": "var peer = require('./peer');\n\nvar textOT = require('ottypes').text\nvar gulf = require('gulf');\nvar bindEditor = require('gulf-textarea');\nvar textarea = document.querySelector...
javascript
chosen
[ { "from": "system", "value": "Fix logout link on IE\n\nCloses #213.\n" }, { "from": "human", "value": "import 'babel-core/polyfill';\n\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { createStore } from 'redux';\nimport { ReduxRo...
javascript
chosen
[ { "from": "system", "value": "Add util function to convert a JS date to locale string\n" }, { "from": "human", "value": "import { DateUtils } from 'react-day-picker/lib/src/index';\n\nexport const convertModifiersToClassnames = (modifiers, theme) => {\n if (!modifiers) {\n return {};\n }\n\...
javascript
chosen
[ { "from": "system", "value": "Add support for single param instead of array/object.\n" }, { "from": "human", "value": "var route = function(name, params = {}, absolute = true) {\n var domain = (namedRoutes[name].domain || baseUrl).replace(/\\/+$/,'') + '/',\n url = (absolute ? domain :...
javascript
chosen
[ { "from": "system", "value": "Sort by key now confirms both inputs are objects before comparing keys.\n" }, { "from": "human", "value": "\nexports.sort = function (Handlebars) {\n\treturn function (array, field, options) {\n\t\tif (arguments.length === 1) {\n\t\t\tthrow new Error('Handlebars Hel...
javascript
chosen
[ { "from": "system", "value": "Drop support of HTML for indexIndicatorSep option\n" }, { "from": "human", "value": "export const counterIndicator = {\n name: 'counter',\n order: 5,\n onInit: (counterElement, pswp) => {\n pswp.on('change', () => {\n counterElement.innerHTML = (pswp.curr...
javascript
chosen
[ { "from": "system", "value": "Fix wrong links when listing multiple apps\n" }, { "from": "human", "value": "/*\n * Copyright 2014 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the 'License');\n * you may not use this file except in compliance with the Li...
javascript
chosen
[ { "from": "system", "value": "Configure using an ENV variable\n" }, { "from": "human", "value": "module.exports = function() {\n return require('./embedly').apply(null, arguments);\n};\n" }, { "from": "gpt", "value": "const { RESIZING_SERVICE } = process.env;\n\nmodule.exports = fun...
javascript
chosen
[ { "from": "system", "value": "Add js funtion that maps tab-content to sidebar-menu.\n" }, { "from": "human", "value": "$('.sidebar a').on('click', function(){\n $('.sidebar a').attr('class','');\n $(this).toggleClass('active');\n});" }, { "from": "gpt", "value": "$('.sidebar a'...
javascript
chosen
[ { "from": "system", "value": "Save the state in localStorage\n" }, { "from": "human", "value": "(function () {\n /*global jsbin, $, $body*/\n 'use strict';\n\n if (jsbin.settings.gui === undefined) {\n jsbin.settings.gui = {};\n }\n if (jsbin.settings.gui.toppanel === undefined) {\n j...
javascript
chosen
[ { "from": "system", "value": "Correct error in client for streaming\n" }, { "from": "human", "value": "define([\n \"Underscore\",\n \"yapp/yapp\",\n \"vendors/socket.io\"\n], function(_, yapp, io) {\n var logging = yapp.Logger.addNamespace(\"updates\");\n var Updates = new (yapp.C...
javascript
chosen
[ { "from": "system", "value": "Remove layout dependency in candlestick visual\n" }, { "from": "human", "value": "define(function (require) {\n\n var positiveBorderColorQuery = ['itemStyle', 'normal', 'borderColor'];\n var negativeBorderColorQuery = ['itemStyle', 'normal', 'borderColor0'];\n...
javascript
chosen
[ { "from": "system", "value": "Update to DigitalLines. Taking a slight mental transition to learn about Bezier Curves.\n" }, { "from": "human", "value": "/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */\n\nimport React, { PropTypes } from 'react';\n\n\n\nclass DigitalLines...
javascript
chosen
[ { "from": "system", "value": "Remove \"correct\" word from test titles\n" }, { "from": "human", "value": "const assert = require('assert');\nconst parse = require('../app/shared/database/parse');\n\ndescribe('database', () => {\n describe('parse.js', () => {\n const testQuery = 'Learn someth...
javascript
chosen
[ { "from": "system", "value": "Update for plug-in : KnowYourMeme\n" }, { "from": "human", "value": "var hoverZoomPlugins = hoverZoomPlugins || [];\nhoverZoomPlugins.push({\n name:'Know Your Meme',\n version:'0.1',\n prepareImgLinks:function (callback) {\n var res = [];\n h...
javascript
chosen
[ { "from": "system", "value": "Change search field type to \"search\"\n\nThis is like \"text\" except that a little \"x\" button appears so that one can\neasily clear the field. Also, on mobile browsers, the action button on the\nkeyboard will display \"Search\" instead of just \"Go\".\n\nOld browsers will g...
javascript
chosen
[ { "from": "system", "value": "Add top offset to prevent top bar from cropping the top stack\n" }, { "from": "human", "value": "'use strict'\nconst fg = require('d3-fg')\nconst render = require('nanohtml')\nconst morphdom = require('morphdom')\nconst debounce = require('debounce')\nconst createAc...
javascript
chosen
[ { "from": "system", "value": "Add option.until to prevent extra deprecation" }, { "from": "human", "value": "import Ember from 'ember';\n\nEmber.deprecate(\"ember-getowner-polyfill is now a true polyfill. Use Ember.getOwner directly instead of importing from ember-getowner-polyfill\", false, {\n...
javascript
chosen
[ { "from": "system", "value": "Introduce compact prop for media component\n" }, { "from": "human", "value": "import React from 'react';\nimport classnames from 'classnames';\n\nconst Media = (props) => {\n const children = props.children;\n\n return (\n <div className={classnames('ui-media')...
javascript
chosen
[ { "from": "system", "value": "Initialize rollbar before mongoose in worker\n" }, { "from": "human", "value": "'use strict';\n\nconst config = require('config');\nconst logger = require('../modules').logger;\nconst rollbarHelper = require('../modules').rollbarHelper;\n\nconst invalidator = requir...
javascript
chosen
[ { "from": "system", "value": "Add some jsdoc to _childDidSuspend\n" }, { "from": "human", "value": "import { Component } from './component';\nimport { createElement } from './create-element';\n\n// having a \"custom class\" here saves 50bytes gzipped\nexport function s(props) {}\ns.prototype = n...
javascript
chosen
[ { "from": "system", "value": "Remove commented code from agriculture selectors\n" }, { "from": "human", "value": "import { createSelector } from 'reselect';\n// import omit from 'lodash/omit';\n// import qs from 'query-string';\n\nconst getSections = routeData => routeData.route.sections || null...
javascript
chosen
[ { "from": "system", "value": "Add chapter 11, exercise 2\n" }, { "from": "human", "value": "function Promise_all(promises) {\n return new Promise((resolve, reject) => {\n let ctr = promises.length;\n let resArray = [];\n if (ctr === 0) resolve(resArray);\n for (let...
javascript
chosen
[ { "from": "system", "value": "Fix for vm list ordering" }, { "from": "human", "value": "$(function() {\n\t\n\t$(\"form :button\").each(function(){\n\t\t\n\t\tvar button = $(this);\n\t\t\n\t\tif ($(button).attr('id') == 'cancel') {\n\t\t\t$(button).click(function(e){\n\t\t\t\te.preventDefault();\...
javascript
chosen
[ { "from": "system", "value": "Fix greate/less than HTML entity in problem description\n" }, { "from": "human", "value": "var fs = require('fs');\nvar path = require('path');\nvar md = require('cli-md');\n\nmodule.exports = function (filepath) {\n return md(fs.readFileSync(filepath, 'utf8'))\n ...
javascript
chosen
[ { "from": "system", "value": "Apply CodeMirror to output textarea.\n" }, { "from": "human", "value": "var socket = io.connect('/'); \nvar waitMilliSec = 1000;\nvar oldJavaCode = '';\nvar oldClassName = '';\n\n\nsocket.on('byte_code', function(data) {\n\t$('#output_bc').val(data.code);\n});\n\nso...
javascript
chosen
[ { "from": "system", "value": "Make copy before setting current lesson\n" }, { "from": "human", "value": "export function SET_CLASS_LESSONS(state, lessons) {\n state.pageState.lessons = lessons;\n}\n\nexport function SET_CURRENT_LESSON(state, lesson) {\n state.pageState.currentLesson = lesson;\...
javascript
chosen
[ { "from": "system", "value": "Fix for error reporting email\n" }, { "from": "human", "value": "var Log = require(\"log4js\");\nvar Utils = require(\"./Utils\");\n\nLog.configure({\n \"replaceConsole\": true,\n \"appenders\": process.env.DEBUG ? [{\"type\": \"console\"}] :\n [\n ...
javascript
chosen
[ { "from": "system", "value": "Set gulp task as default\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar nodemon = require('gulp-nodemon');\n\ngulp.task('mock-server', function() {\n nodemon({\n script: 'server.js'\n , ext: 'js json'\n , env: { 'NODE_ENV...
javascript
chosen
[ { "from": "system", "value": "Use same syntax for all assets\n" }, { "from": "human", "value": "var elixir = require('laravel-elixir');\n\n/*\n |--------------------------------------------------------------------------\n | Elixir Asset Management\n |---------------------------------------------...
javascript
chosen
[ { "from": "system", "value": "1.2.2: Update default task for compile prod code\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar uglify = require('gulp-uglify');\n\ngulp.task('default', function() {\n gulp.src('lib/fs.js')\n \t.pipe(uglify())\n \t.pipe(gulp.dest('build'));\n...
javascript
chosen
[ { "from": "system", "value": "Rename lint task to hint\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp')\n , jshint = require('gulp-jshint')\n , nodemon = require('gulp-nodemon')\n , paths\n ;\n\npaths = {\n projectScripts: ['./bin/www', '**/*.js', '!node_module...
javascript
chosen
[ { "from": "system", "value": "Update tests with new API\n" }, { "from": "human", "value": "import addons from '@storybook/addons';\nimport { withNotes } from '..';\n\njest.mock('@storybook/addons');\n\ndescribe('Storybook Addon Notes', () => {\n it('should inject info', () => {\n const chann...
javascript
chosen
[ { "from": "system", "value": "Fix using old map format\n" }, { "from": "human", "value": "import { treeGrow as growChance } from '../../../game-data/chances';\nimport { tryChance } from '../../../utils';\nimport { fastMap } from '../../../world';\nimport objectPool from '../../../object-pool';\n...
javascript
chosen
[ { "from": "system", "value": "Replace single with double quotes\n" }, { "from": "human", "value": "var SecretsUtil = {\n /**\n * This function checks if the environment value is a reference to a secret\n * and if yes, it cross-references the secret with the `secrets` property\n * in `allF...
javascript
chosen
[ { "from": "system", "value": "Add ASF license headers to filter tests\n" }, { "from": "human", "value": "'use strict';\n\ndescribe('Filter: ISODateToMiddleEndian', function () {\n\n // load the filter's module\n beforeEach(module('ocwUiApp'));\n\n // initialize a new instance of the filter be...
javascript
chosen
[ { "from": "system", "value": "Add element binding to touch input\n" }, { "from": "human", "value": "function TouchInput(inputController) {\n this.inputController = inputController;\n}\n\nTouchInput.prototype.listen = function() {\n document.addEventListener('touchstart', this.startTouch.bi...
javascript
chosen
[ { "from": "system", "value": "Fix album art retrieved from Spotify\n\nRemove double quotes around image URL retrieved from Spotify\nby slicing one character more from left and one character\nmore from right.\nAlso, remove redundant code and null errors to console when\nelement is not found.\n\nSigned-off-by...
javascript
chosen
[ { "from": "system", "value": "[form-builder] Use link icon for link button\n" }, { "from": "human", "value": "import React, {PropTypes} from 'react'\nimport ToggleButton from 'part:@sanity/components/toggles/button'\n\nimport LinkIcon from 'part:@sanity/base/sanity-logo-icon'\nimport styles from...
javascript
chosen
[ { "from": "system", "value": "Update the named of a renamed React check\n" }, { "from": "human", "value": "module.exports = {\n \"extends\": \"justinlocsei/configurations/es6\",\n \"ecmaFeatures\": {\n \"jsx\": true\n },\n \"env\": {\n \"browser\": true\n },\n \"plugins\": [\n \"r...
javascript
chosen
[ { "from": "system", "value": "Fix search problem (but how??)\n" }, { "from": "human", "value": "module.exports = function($scope, $state, $location, $http, GlobalService,\n DocumentService, DocumentApiService, MathJaxService, QueryParser) {\n $scope.doSearch = fu...
javascript
chosen
[ { "from": "system", "value": "Add result page information in feathers format\n\n" }, { "from": "human", "value": "'use strict';\n\nconst request = require('request-promise-native');\nconst querystring = require('querystring');\nconst hooks = require('./hooks');\n\nclass Service {\n\tconstructor(...
javascript
chosen
[ { "from": "system", "value": "Add command-line option to change port\n" }, { "from": "human", "value": "var config = module.exports = exports = {}\n\nconfig.items =\n\t{ tmpDir:\n\t\t{ def: 'tmp' }\n\t, outDir:\n\t\t{ def: 'out' }\n\t, originalsPath:\n\t\t{ def: 'originals' }\n\t, maxCols:\n\t\t...
javascript
chosen
[ { "from": "system", "value": "Fix to ensure that tokens is not undefined on the next iteration when the previous file was empty\n" }, { "from": "human", "value": "'use strict';\n\nvar glob = require('glob'),\n _ = require('lodash'),\n async = require('async'),\n fs = require('fs'),\n ...
javascript
chosen
[ { "from": "system", "value": "Fix typo on getOptions response\n" }, { "from": "human", "value": "/**\n * General functions\n */\nvar general = {};\n\n//General 404 error\ngeneral.send404 = function(res){\n\tres.status(404);\n\tres.jsonp({error: 'Not found'});\n\tres.end();\n};\n\n//General 500 e...
javascript
chosen
[ { "from": "system", "value": "Add polling for system stats\n" }, { "from": "human", "value": "define([\n 'app'\n], function(app) {\n 'use strict';\n\n return {\n parent: 'admin_layout',\n url: '',\n templateUrl: 'partials/admin/home.html',\n controller: function($scope, $http, fla...
javascript
chosen
[ { "from": "system", "value": "Change the console log to show proper port\n" }, { "from": "human", "value": "'use strict';\nconst app = require('./app');\nconst db = require('../db');\nconst PORT = process.env.PORT || 3000;\nconst path = require('path');\n\napp.listen(PORT, () => {\n console.log...
javascript
chosen
[ { "from": "system", "value": "Add location and expense strings to pastTrip model\n" }, { "from": "human", "value": "// Todo Implement and export schema using mongoose\n// Reference angular sprint\nvar mongoose = require('mongoose');\n//var User = require('../users/UserModel.js');\n\nvar Schema =...
javascript
chosen
[ { "from": "system", "value": "Fix ignore tests for travis\n" }, { "from": "human", "value": "\"use strict\";\n\nvar TravisFilter = function(name) {\n console.dir(process.env)\n name = name || \"ON_TRAVIS\";\n // Get environmental variables that are known\n this.filter = function(test) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add 'npm bin' to uglifyjs command.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar colors = require('colors'),\n\texec = require('child_process').exec,\n\tpkg = require('../package.json'),\n\tpreamble = '/*!\\n' +\n\t\t' * RadioRadio ' + pkg.version +...
javascript
chosen
[ { "from": "system", "value": "Enable face culling by default" }, { "from": "human", "value": "const Signal = require('signals')\n\nlet MaterialID = 0\n\nfunction Material (opts) {\n this.type = 'Material'\n this.id = 'Material_' + MaterialID++\n this.changed = new Signal()\n\n this._uniforms...
javascript
chosen
[ { "from": "system", "value": "Fix error with invalid error message while sending e-mail\n" }, { "from": "human", "value": "var util = require('util'),\n\n _ = require('lodash'),\n vow = require('vow'),\n nm = require('nodemailer'),\n transport = require('nodemailer-smtp-transport'),\...
javascript
chosen
[ { "from": "system", "value": "Increase timeout slightly to avoid failing\n" }, { "from": "human", "value": "describe('Operations', function () {\n var isNode = typeof module !== 'undefined' && module.exports;\n var Parallel = isNode ? require('../../lib/parallel.js') : self.Parallel;\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add addType method to content\n" }, { "from": "human", "value": "var express = require('express');\n\nmodule.exports = function setup(options, imports, register) {\n var backend = imports.backend.app,\n frontend = imports.frontend.app;\n\n var plugin...
javascript
chosen
[ { "from": "system", "value": "Use port 3000 for testing\n" }, { "from": "human", "value": "const express = require('express');\n\nconst app = express();\n\napp.use(express.static('dist'));\n\napp.listen(8080, function() {\n console.log('App started on port 8080!');\n});" }, { "from": ...
javascript
chosen
[ { "from": "system", "value": "Use request-promise to manage OpenFisca calls\n" }, { "from": "human", "value": "/*\n** Module dependencies\n*/\nvar config = require('../../config/config');\nvar http = require('http');\nvar mapping = require('./mapping');\nvar url = require('url');\n\nvar openfisc...
javascript
chosen
[ { "from": "system", "value": "Define paddle object and a basic render function. Also capitalise width and height constants to easily distinguish them from object properties or parameters\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n var canvas = document.getElementById('ga...
javascript
chosen
[ { "from": "system", "value": "Handle when container is undefined.\n" }, { "from": "human", "value": "(function() {\n var clientid;\n\n jive.tile.onOpen(function(config, options, other, container ) {\n osapi.jive.corev3.systemExtProps.get({}).execute(function (resp) {\n if...
javascript
chosen
[ { "from": "system", "value": "Remove sort button, as we sort by default now\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport Item from './Item';\nimport sortByScore from './sorter';\n\nvar TopItems = React.createClass({\n sortByScore: function() {\n this.s...
javascript
chosen
[ { "from": "system", "value": "Disable redirect when browsing files from browser\n" }, { "from": "human", "value": "/**\n * Copyright (c) ActiveState 2013 - ALL RIGHTS RESERVED.\n */\n\ndefine([\n './collection'],\n function (Collection) {\n\n var apps = function (api) {\n ...
javascript
chosen
[ { "from": "system", "value": "Revert \":bug: Fix stylesheets issue when changing subtheme\"\n\nThis reverts commit a9b1f3c3e9932fc0d049a6be64c3c8ecc01c7f4f.\n" }, { "from": "human", "value": "\"use babel\";\n\"use strict\";\n\nimport fs from \"fs\";\nimport path from \"path\";\nimport {Composite...
javascript
chosen
[ { "from": "system", "value": "Remove unneeded div around tile element\n\nSigned-off-by: Max Brunsfeld <78036c9b69b887700d5846f26a788d53b201ffbb@gmail.com>\n" }, { "from": "human", "value": "'use babel';\n\nlet lineEndingTile = null;\n\nexport function activate() {\n atom.workspace.observeActive...
javascript
chosen
[ { "from": "system", "value": "test: Use new test action function\n" }, { "from": "human", "value": "import UserStore from 'new-dashboard/store/user';\nimport { testAction } from '../helpers';\n\njest.mock('carto-node');\n\nconst mutations = UserStore.mutations;\nconst actions = UserStore.actions...
javascript
chosen
[ { "from": "system", "value": "Improve tolerance when matching url-paths for router-navigation.\n" }, { "from": "human", "value": "/* @flow */\nimport type { State } from '../../common/types';\nimport React from 'react';\nimport AddrListByRoom from './AddressListByRoom';\nimport AddrList from './...
javascript
chosen
[ { "from": "system", "value": "Use internal player history instead of emitted status\n" }, { "from": "human", "value": "import PlayerController from './PlayerController'\nimport { connect } from 'react-redux'\nimport { ensureState } from 'redux-optimistic-ui'\nimport getOrderedQueue from 'routes/...
javascript
chosen
[ { "from": "system", "value": "Add code to error object\n" }, { "from": "human", "value": "exports = module.exports = require('util');\n\nexports.formatDate = function(date){\n if (typeof date === 'string') return date;\n date = new Date(date);\n\n var month = date.getMonth() + 1,\n day = d...
javascript
chosen
[ { "from": "system", "value": "Use AnchorButton for anchor button\n" }, { "from": "human", "value": "import React from 'react';\nimport {FormattedMessage} from \"react-intl\";\nimport queryString from \"query-string\";\n\nconst OAuthLogin = ({providers, onLogin}) => {\n const location = window.l...
javascript
chosen
[ { "from": "system", "value": "Add columnsStore and rowsStore configs\n" }, { "from": "human", "value": "Ext.define('Jarvus.aggregrid.Aggregrid', {\n extend: 'Ext.Component',\n\n html: 'Hello World'\n});" }, { "from": "gpt", "value": "Ext.define('Jarvus.aggregrid.Aggregrid', {\n...
javascript
chosen
[ { "from": "system", "value": "Add Image to ENTITY_TYPE Enum\n\nUseful for rich text editor inline image support" }, { "from": "human", "value": "export const BLOCK_TYPE = {\n // This is used to represent a normal text block (paragraph).\n UNSTYLED: 'unstyled',\n HEADER_ONE: 'header-one',\n H...
javascript
chosen
[ { "from": "system", "value": "Reduce button padding in PaymentInfoScreen\n" }, { "from": "human", "value": "import { StyleSheet } from 'react-native';\n\nconst paymentInfoStyle = StyleSheet.create({\n addCardButton: {\n padding: 20,\n },\n});\n\nmodule.exports = paymentInfoStyle;\n" }, ...
javascript
chosen
[ { "from": "system", "value": "Clear payment type form data after succesfully saving a modified payment type\n" }, { "from": "human", "value": "import { takeLatest, call, put } from 'redux-saga/effects';\nimport axios from 'axios';\nimport {\n MODIFY_PAYMENTTYPE_REQUEST,\n MODIFY_PAYMENTTYP...
javascript
chosen
[ { "from": "system", "value": "Refactor user model to broadcast changes to login state\n" }, { "from": "human", "value": "(function(){\n'use strict';\n\nangular\n .module('secondLead')\n \n .factory('UserModel',['Auth', 'Restangular', 'store', function(Auth, Restangular, store) {\n var base...
javascript
chosen
[ { "from": "system", "value": "Check for correct folder before copying subtitle file\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2014-2020 Bjoern Kimminich.\n * SPDX-License-Identifier: MIT\n */\n\nconst glob = require('glob')\nconst path = require('path')\nconst fs = require('fs')\nc...
javascript
chosen
[ { "from": "system", "value": "Remove the for-loop in favor of mapping the array into event components\n" }, { "from": "human", "value": "import Event from './event';\n\nconst Day = ({ events }) => {\n\n let id = 0;\n let eventList = [];\n\n for (let e of events) {\n eventList.push(<Event t...
javascript
chosen
[ { "from": "system", "value": "Fix let bug on older node\n" }, { "from": "human", "value": "const LDAP = require('ldap-client'),\n config = require('./config');\n\nlet protocol = config.get('ssl') ? 'ldaps://' : 'ldap://';\nlet host = config.get('ldap').hostname;\nlet port = config.get('ldap').p...
javascript
chosen
[ { "from": "system", "value": "Clean up store using compose\n" }, { "from": "human", "value": "import {applyMiddleware, createStore} from 'redux';\nimport rootReducer from '../reducers';\nimport thunkMiddleware from 'redux-thunk';\n\nexport default function configureStore (initialState) {\n cons...
javascript
chosen
[ { "from": "system", "value": "Fix the things Jordan didn't\n" }, { "from": "human", "value": "import express from 'express';\nimport {addAction} from '../lib/database';\nimport ModelStore from '../store/model-store';\n\nlet app = express();\n\napp.get('/', (req, res) => {\n let model = ModelS...
javascript
chosen
[ { "from": "system", "value": "Convert currency name to currency iso code\n" }, { "from": "human", "value": "/* eslint class-methods-use-this: [\"error\", { \"exceptMethods\": [\"scraper\"] }] */\n\nimport cheerio from 'cheerio';\n\nimport Bank from './Bank';\n\nconst banksNames = require('./bank...
javascript
chosen
[ { "from": "system", "value": "Use cloudfront link to store drawings\n" }, { "from": "human", "value": "import cuid from 'cuid';\r\nimport tinify from 'tinify';\r\nimport awsConfig from '@/config/tinify-aws';\r\nimport firebase from '@/config/firebase-admin';\r\n\r\ntinify.key = process.env.TINYP...
javascript
chosen
[ { "from": "system", "value": "[BPK-1716] Add dynamic text to Link buttons\n" }, { "from": "human", "value": "/*\n * Backpack - Skyscanner's Design System\n *\n * Copyright 2018 Skyscanner Ltd\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file ...
javascript
chosen
[ { "from": "system", "value": "Fix deprecation warning from moment\n" }, { "from": "human", "value": "var _ = require('lodash'),\n moment = require('moment');\n\nfunction RelativeTimeExtension() {\n moment.locale('en', {\n relativeTime : {\n future: \"in %s\",\n ...
javascript
chosen
[ { "from": "system", "value": "Fix nav test utils export\n" }, { "from": "human", "value": "var fs = require('fs');\n\nmodule.exports = (function() {\n\n const PATH_COOKIES = '/tmp/cookies.txt';\n\n function setUp() {\n casper.options.viewportSize = {width: 1280, height: 768};\n ...
javascript
chosen
[ { "from": "system", "value": "Change path tot adminlte less file\nCopy the fonts to build folder because we will be using elixir\n" }, { "from": "human", "value": "var elixir = require('laravel-elixir');\n\nelixir(function(mix) {\n\n mix.copy(\n 'node_modules/bootstrap/dist/fonts',\n ...
javascript
chosen
[ { "from": "system", "value": "Index will include scales during compilation\n" }, { "from": "human", "value": "Elm.Native.D3 = {};\n\nimport \"JavaScript\"\n\nimport \"Render\"\n\nimport \"Color\"\nimport \"Selection\"\nimport \"Event\"\nimport \"Transition\"\nimport \"Voronoi\"\n" }, { "...
javascript
chosen
[ { "from": "system", "value": "Use `meld` to override markdown image handling.\n" }, { "from": "human", "value": "import MarkdownIt from 'markdown-it';\nimport gh from 'github-url-to-object';\n\nfunction toAbsolute(baseUrl, src) {\n try {\n return new URL(src, baseUrl).toString();\n } catch ...
javascript
chosen
[ { "from": "system", "value": "Fix to default cron time\n" }, { "from": "human", "value": "\nimport 'babel-polyfill';\n\nimport { existsSync } from 'fs';\nimport { resolve } from 'path';\nimport merge from 'lodash.merge';\nimport TipsBot from './Tipsbot';\n\nconst tokenPath = resolve(__dirname, '...
javascript
chosen
[ { "from": "system", "value": "Change widget attribute to string\n\nIn Django 1.8, widget attribute data-date-picker=True will be rendered\nas 'data-date-picker'. This patch will just look for the presence of the\nattribute, ignoring the actual value.\n\nChange-Id: I0beabddfe13c060ef2222a09636738428135040a\n...
javascript
chosen
[ { "from": "system", "value": "Fix for getting mutable attributes in glimmer" }, { "from": "human", "value": "import Ember from 'ember';\n\nvar getMutValue = Ember.__loader.require('ember-htmlbars/hooks/get-value')['default'];\n\nexport default function getMutableAttributes(attrs) {\n return Obj...
javascript
chosen
[ { "from": "system", "value": "Fix options loading and turn into MultiTask\n" }, { "from": "human", "value": "\n'use strict';\n\nvar glob = require('glob'),\n _ = require('underscore'),\n ParallelExec = require('./lib/ParallelExec'),\n BehatTask = require('./lib/BehatTask'),\n default...
javascript
chosen
[ { "from": "system", "value": "Add support for unkeyed params array.\n" }, { "from": "human", "value": "var route = function(name, params = {}, absolute = true) {\n var domain = (namedRoutes[name].domain || baseUrl).replace(/\\/+$/,'') + '/',\n url = (absolute ? domain : '') + namedRout...
javascript
chosen
[ { "from": "system", "value": "Change var names and use save endpoint\n" }, { "from": "human", "value": "var app\n\nvar project\nvar checkout\nvar host\nvar session\n\nwindow.addEventListener('load', () => {\n project = substance.getQueryStringParam('project');\n checkout = substance.getQuerySt...
javascript
chosen
[ { "from": "system", "value": "Remove lingering but unneeded requirement call\n" }, { "from": "human", "value": "'use strict';\n\nvar stringToNum = require( '../utils/handle-string-input' );\n\nvar getSchoolValues = {\n\n var values = {};\n\n init: function( ) {\n values.programLength = this...
javascript
chosen
[ { "from": "system", "value": "Add test for double quotes\n" }, { "from": "human", "value": "import test from \"ava\";\nimport {newUnibeautify, Beautifier} from \"unibeautify\";\nimport beautifier from \"../dist\";\ntest.beforeEach((t) => {\n t.context.unibeautify = newUnibeautify();\n});\ntest(...
javascript
chosen
[ { "from": "system", "value": "Add tests for existing functionality\n" }, { "from": "human", "value": "(function () {\n\n 'use strict';\n\n describe('Unit: angular-reverse-url', function () {\n\n beforeEach(module('angular-reverse-url'));\n\n describe('reverseUrl filter', func...
javascript
chosen
[ { "from": "system", "value": "Fix existing item recognition in \"Code\" widget.\n" }, { "from": "human", "value": "import DashboardWidgetComponent from 'appkit/components/dashboard-widget';\n\nvar GithubTeamNotices = DashboardWidgetComponent.extend({\n\n init: function() {\n this._super();\n...
javascript
chosen
[ { "from": "system", "value": "Add failing test for login\n" }, { "from": "human", "value": "var should = require('chai').should(),\n expect = require('chai').expect,\n supertest = require('supertest'),\n config = require('config'),\n port = config.get('port'),\n testingUrl = 'http...
javascript
chosen
[ { "from": "system", "value": "Support per-sculpture overrides in local storage\n" }, { "from": "human", "value": "import 'babel-polyfill';\n\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport MainScreen from './react/MainScreen';\n\nimport config from './config';\nimport Sc...
javascript
chosen
[ { "from": "system", "value": "Fix JS bug caused by previous commit\n" }, { "from": "human", "value": "var extend = require('extend');\nvar path = require('path');\nvar cleanDist = require('./tasks/clean_dist');\nvar copy = require('./tasks/copy');\nvar sass = require('./tasks/sass');\nvar javasc...
javascript
chosen
[ { "from": "system", "value": "Fix 'body-parser deprecated urlencoded' warning\n" }, { "from": "human", "value": "var express = require('express'),\n path = require('path'),\n cookieParser = require('cookie-parser'),\n bodyParser = require('body-parser');\n\nvar routes = require('./routes');\n...
javascript
chosen