conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Add refreshTokenLifetime and accessTokenLifetime for token lifetime\n" }, { "from": "human", "value": "// Reference : http://danialk.github.io/blog/2013/02/23/authentication-using-passportjs/\nvar CONFIG = module.exports = {};\nvar LocalStrategy = require('passport-...
javascript
chosen
[ { "from": "system", "value": "Add update method to coupon resource for metadata\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = require('../StripeResource').extend({\n path: 'coupons',\n includeBasic: ['create', 'list', 'retrieve', 'del']\n});\n\n" }, { "from": "gp...
javascript
chosen
[ { "from": "system", "value": "Add the Optimizely activation code\n" }, { "from": "human", "value": "window.openWithRiot = function(tag, opts) {\n console.log('OPEN', tag);\n riot.compile(\"tags/\" + tag + \".html\", function() {\n riot.mount(\"div#app\", tag, opts);\n });\n};\n\n/// Routes...
javascript
chosen
[ { "from": "system", "value": "Load css files from a list\n" }, { "from": "human", "value": "command: 'echo \"nothing\"',\n\nupdateFrequency: 600000,\n\nstyle: '@import \"/stolaf-base/base.css\"',\n\nrender: function(output) {\n\treturn ''\n}\n" }, { "from": "gpt", "value": "command: ...
javascript
chosen
[ { "from": "system", "value": "Fix jshint and jscs errors.\n" }, { "from": "human", "value": "/*jshint node: true*/\n\n'use strict';\n\nmodule.exports = {\n options: {\n indent: ' '\n },\n npm: {\n src: '<%= meta.cwd %>package.json',\n dest: '<%= meta.build %>packag...
javascript
chosen
[ { "from": "system", "value": "Extend visualization period to Oct 2015\n" }, { "from": "human", "value": "\nvar moment = require('moment');\n\n// note that month indices are zero-based\n\nmodule.exports.DATA_START_YEAR = 2012;\nmodule.exports.DATA_START_MONTH = 0;\n\nmodule.exports.DATA_END_YEAR ...
javascript
chosen
[ { "from": "system", "value": "fix: Use includes correctly in parseConfig\n" }, { "from": "human", "value": "// @flow\nimport _ from 'lodash'\nimport program from 'commander'\n\nimport info from '../package.json'\n\nexport type Options = {\n command: ?string,\n files: Array<string>,\n format: ...
javascript
chosen
[ { "from": "system", "value": "Comment out require statement -- throwing on deploy\n" }, { "from": "human", "value": "const functions = require('firebase-functions');\n\n// // Create and Deploy Your First Cloud Functions\n// // https://firebase.google.com/docs/functions/write-firebase-functions\n...
javascript
chosen
[ { "from": "system", "value": "Remove unused css buld task\n" }, { "from": "human", "value": "'use strict';\n\nvar path = require('path');\nvar gulp = require('gulp');\nvar less = require('gulp-less');\nvar prefix = require('gulp-autoprefixer');\n\nvar config = require('../../project.config');\n\...
javascript
chosen
[ { "from": "system", "value": "Add comment to `hasBeenNotified` flag\n" }, { "from": "human", "value": "'use strict';\nconst pkg = require('../../package.json');\nconst Generator = require('yeoman-generator');\nconst updateNotifier = require('update-notifier');\n\nlet hasBeenNotified = false;\n\n...
javascript
chosen
[ { "from": "system", "value": "Fix the event handler input->button\n" }, { "from": "human", "value": "// Set up a collection to contain player information. On the server,\n// it is backed by a MongoDB collection named \"players\".\n\nPlayers = new Meteor.Collection(\"players\");\n\nif (Meteor.isC...
javascript
chosen
[ { "from": "system", "value": "Add failing test for most recent datum in destroy\n" }, { "from": "human", "value": "var tape = require(\"tape\"),\n jsdom = require(\"jsdom\"),\n d3_transition = require(\"d3-transition\"),\n d3_selection = require(\"d3-selection\"),\n d3_component = re...
javascript
chosen
[ { "from": "system", "value": "Make container more appropriate for small screen\n" }, { "from": "human", "value": "import React from 'react';\nimport Paper from 'material-ui/lib/paper';\n\nexport default class App extends React.Component {\n render() {\n return (\n <div style={{ width: '...
javascript
chosen
[ { "from": "system", "value": "Fix to use single quotes instead of double quotes\n" }, { "from": "human", "value": "const binding = require('bindings')('contextify');\nconst ContextifyContext = binding.ContextifyContext;\nconst ContextifyScript = binding.ContextifyScript;\n\nfunction Contextify (...
javascript
chosen
[ { "from": "system", "value": "Swap out the bulky react-youtube for a basic iframe embed\n\nFix the aspect ratio of the video so it's always 16:9\n" }, { "from": "human", "value": "import React from 'react';\nimport YouTube from 'react-youtube';\n\nconst VideoInstruction = React.createClass({\n ...
javascript
chosen
[ { "from": "system", "value": "Fix Authorization header not clearing on logout\n" }, { "from": "human", "value": "import axios from 'axios';\nimport queryString from 'query-string';\n\nexport const endpoint = axios.create({\n baseURL: 'http://localhost:5000/api/2',\n headers: {},\n // Use non-...
javascript
chosen
[ { "from": "system", "value": "Test for Array.prototype case in isPlainArray\n" }, { "from": "human", "value": "'use strict';\n\nvar SubArray = require('../../array/_sub-array-dummy-safe');\n\nmodule.exports = function (t, a) {\n\tvar arr = [1, 2, 3];\n\ta(t(arr), true, \"Array\");\n\ta(t(null), ...
javascript
chosen
[ { "from": "system", "value": "Add data and content in KiteError message\n" }, { "from": "human", "value": "module.exports = class KiteError extends Error {\n constructor(type, data, content) {\n super(type);\n this.name = this.constructor.name;\n this.message = type;\n this.type = t...
javascript
chosen
[ { "from": "system", "value": "Use standalone() to run tests.\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Run package tests.\n * (C) 2015 Alex Fernández.\n */\n\n// requires\nvar testing = require('testing');\nvar Log = require('log');\n\n// globals\nvar log = new Log('info');\n\n...
javascript
chosen
[ { "from": "system", "value": "Remove broken backward compatibility hack\n" }, { "from": "human", "value": "---\n---\n\nvar Collections = (function(window, undefined) {\n /*\n * Listing of all the collections and documents. Generated\n * automatically by Jekyll and used e.g for the aut...
javascript
chosen
[ { "from": "system", "value": "Fix API documentation test fail\n" }, { "from": "human", "value": "import express from 'express';\nimport logger from 'morgan';\nimport bodyParser from 'body-parser';\n\nimport routes from './routes';\n\nconst app = express();\nconst port = process.env.PORT || 3001;...
javascript
chosen
[ { "from": "system", "value": "[ux] Allow `j` and `k` to switch slides as well\n" }, { "from": "human", "value": "(function (exports) {\n var Controls = exports.Controls = {};\n\n Controls.attach = function (options) {\n var self = this;\n\n document.addEventListener('keypress', function ...
javascript
chosen
[ { "from": "system", "value": "Add more starter code options\n" }, { "from": "human", "value": "const updateCode = newCode => {\n return { type: 'UPDATE_CODE', newCode };\n};\n\nconst swapCode = () => {\n return { type: 'TOGGLE_TREE_TYPE' };\n};\n\nconst darken = () => {\n return { type: 'DARK...
javascript
chosen
[ { "from": "system", "value": "Add pointers to postMessage info\n" }, { "from": "human", "value": "/*\n * This script adds cross-document messaging (postMessage) support, to allow\n * embedding one or many instances of the Tree Illustrator UI in an\n * IPython notebook. This lets us provide tree ...
javascript
chosen
[ { "from": "system", "value": "Add the auth interceptor to the app.\n" }, { "from": "human", "value": "var askaway = angular.module('askaway', [ 'infinite-scroll', 'ngAnimate' ]);\n\naskaway.config(function($httpProvider) {\n var authToken = $(\"meta[name=\\\"csrf-token\\\"]\").attr(\"content\")...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"fix: Adds missing qunit-dom setup invocation\"\"\n\nThis reverts commit 892641416b64d66dff488ef1eb23331c76845c6a.\n" }, { "from": "human", "value": "import Application from '<%= modulePrefix %>/app';\nimport config from '<%= modulePrefix %>/config/...
javascript
chosen
[ { "from": "system", "value": "Print PhantomJS errors and console.logs.\n" }, { "from": "human", "value": "// A PhantomJS sript that simply opens the web page passed as the command line parameter\nvar page = require('webpage').create();\npage.open(phantom.args[0], function (status) {\n});\n" },...
javascript
chosen
[ { "from": "system", "value": "Make sure Placed Symbol test uses a strokeWidth on Paper too.\n" }, { "from": "human", "value": "module('Placed Symbol');\n\ntest('placedSymbol bounds', function() {\n\tvar doc = new Document();\n\tvar path = new Path.Circle([50, 50], 50);\n\tvar symbol = new Symbol...
javascript
chosen
[ { "from": "system", "value": "Check action type for duplicate definition\n" }, { "from": "human", "value": "class ActionRegistry {\n reducers = {}\n\n register(actionType, reducer, actionCreator = () => ({})) {\n this.reducers[actionType] = reducer\n return (...args) => Objec...
javascript
chosen
[ { "from": "system", "value": "Fix indentation in example plugin comments\n" }, { "from": "human", "value": "bespoke.plugins.<%= pluginNameCamelized %> = function(deck) {\n\n /*\n Interact with the deck\n https://github.com/markdalgleish/bespoke.js#deck-instances\n */\n deck.next();\n d...
javascript
chosen
[ { "from": "system", "value": "Make rPartial test description more specific\n" }, { "from": "human", "value": "(function() {\n module(\"R.rPartial\");\n\n var rPartial = require('eigensheep/r_partial')['default'];\n var multiply = function(a, b) { return a * b; };\n var greet = function(salut...
javascript
chosen
[ { "from": "system", "value": "Use proper formatting for `options.outputPaths.testSupport.js`\n\nFixes #5852" }, { "from": "human", "value": "/* global require, module */\n\nvar EmberApp = require('ember-cli/lib/broccoli/ember-app');\n\nmodule.exports = function (defaults) {\n var app = new Embe...
javascript
chosen
[ { "from": "system", "value": "Add checks for function names.\n" }, { "from": "human", "value": "'use strict';\n\nvar _ = require('lodash');\nvar RSVP = require('rsvp');\nvar resolveProjectPath = require('../../resolveProjectPath');\nvar fs = require('fs');\nvar utils = require('../../utils');\n\...
javascript
chosen
[ { "from": "system", "value": "Set cursor position to 1 after new a line\n" }, { "from": "human", "value": "import is from 'is_js';\nimport appState from '../core/state';\nimport { AT, COLON, DOLLAR } from '../constants';\n\nimport logout from './logout';\n\nconst myCommands = [\n logout,\n];\n\...
javascript
chosen
[ { "from": "system", "value": "Add performance exception for IE9\n" }, { "from": "human", "value": "'use strict';\ndescribe('basic mark in large documents', function() {\n var $ctx, err, start, end, diff;\n beforeEach(function(done) {\n loadFixtures('basic/large-document.html');\n\n $ctx ...
javascript
chosen
[ { "from": "system", "value": "Allow for SSL for api url\n" }, { "from": "human", "value": "export default {\n host: process.env.HOST || 'localhost',\n port: process.env.PORT || 8080,\n apiUrl: `http://${process.env.API_URL || 'step-up-api.dev'}`,\n app: {\n name: 'StepUp',\n ...
javascript
chosen
[ { "from": "system", "value": "Select all blocks with the same selector for speed\n" }, { "from": "human", "value": "scratchblocks.renderMatching(\"pre.blocks\", {languages: [\"en\", \"de\", \"es\", \"el\", \"nl\", \"pt\", \"zh_CN\", \"tr\", \"nb\", \"ko\", \"it\", \"id\", \"ru\", \"ca\", \"ja\",...
javascript
chosen
[ { "from": "system", "value": "Use an actual url for backpack host so storage doesnt explode\n" }, { "from": "human", "value": "import path from 'path';\nimport SeleniumHelper from '../helpers/selenium-helper';\n\nconst {\n clickText,\n getDriver,\n getLogs,\n loadUri\n} = new Seleniu...
javascript
chosen
[ { "from": "system", "value": "Fix area order. Algorithm is direction sensitive\n" }, { "from": "human", "value": "iD.svg.Areas = function(projection) {\n return function drawAreas(surface, graph, entities, filter) {\n var areas = [];\n\n for (var i = 0; i < entities.length; i++)...
javascript
chosen
[ { "from": "system", "value": "Increase timeouts in attempt to get windows CI build working!\n" }, { "from": "human", "value": "\"use strict\";\n\nvar path = require(\"path\");\nvar _ = require(\"lodash\");\nvar assert = require(\"chai\").assert;\nvar request = require(\"supertest\");\n...
javascript
chosen
[ { "from": "system", "value": "Add localadmin to locality layer\n\nIt was missing previously.\n" }, { "from": "human", "value": "/* Look up which admin fields should be populated for a record in a given layer.\n *\n * The logic is: look up eveything above in the WOF heirarchy, ignoring things lik...
javascript
chosen
[ { "from": "system", "value": "Use hashrouter due to s3 limitations\n" }, { "from": "human", "value": "import React from 'react';\nimport { BrowserRouter, Route, Switch } from 'react-router-dom';\n\nimport TopBar from './top-bar/top-bar';\nimport LandingPage from './landing-page/landing-page';\ni...
javascript
chosen
[ { "from": "system", "value": "Add comments to make two-tier command clearer\n" }, { "from": "human", "value": "module.exports = {\n commands: {\n random: {\n help: 'Selects a random choice or number',\n command: function (bot, msg) {\n if (msg.args.length > 2) {\n m...
javascript
chosen
[ { "from": "system", "value": "Fix issue with ember-encore used in global\n" }, { "from": "human", "value": "var EmberEncore = {};\n\nEmber.onLoad('Ember.Application', function(Application) {\n Application.initializer({\n name: 'EmberEncore',\n after: 'ember-data',\n initialize: functio...
javascript
chosen
[ { "from": "system", "value": "Fix path to meteor app for PHM deploy\n" }, { "from": "human", "value": "var secret = require('./mup-secrets.json');\n\nmodule.exports = {\n servers: {\n one: {\n host: '167.71.2.39',\n username: 'deploy',\n password: secret.password,\n }\n },...
javascript
chosen
[ { "from": "system", "value": "Update FlightLocationEditor on map click events\n\nEvent populates location input box with clicked latitude and longitude.\nAdd 'Map:Click' event handler on view 'onShow', remove on 'onClose'.\n" }, { "from": "human", "value": "App.module(\"Predictor\", function(Mod...
javascript
chosen
[ { "from": "system", "value": "Add hmTouchEvents dependency for Angular-Hammer\n" }, { "from": "human", "value": "(function() {\n 'use strict;'\n\n angular.module('app', ['ng', 'ngTouch', 'restangular', 'ui.router', 'LocalStorageModule', 'matchmedia-ng', 'SignalR', 'ui.bootstrap', 'ngSaniti...
javascript
chosen
[ { "from": "system", "value": "title: Clean up logic a bit in getTitleBackgroundColor.\n\nHopefully this makes it easier to see what's happening.\n" }, { "from": "human", "value": "/* @flow */\nimport { createSelector } from 'reselect';\n\nimport type { Narrow, Selector } from '../types';\nimport...
javascript
chosen
[ { "from": "system", "value": "Add 200 on update db\n" }, { "from": "human", "value": "// response manager\nvar response = function(req, res, err, rsp){\n if(err){ return res.json(500, {message: err}); }\n if(!rsp){ return res.send(404); }\n res.json(rsp);\n};\n\nmodule.exports.response = resp...
javascript
chosen
[ { "from": "system", "value": "Add another property to the model.\n" }, { "from": "human", "value": "var mongoose = require(\"mongoose\");\n\nvar ArtworkSchema = new mongoose.Schema({\n \"P43_has_dimension\": [\n {\n \"@type\": String,\n \"P90_has_value\": String,\...
javascript
chosen
[ { "from": "system", "value": "Add raw-loader resolver for .sql files\n\n" }, { "from": "human", "value": "const CleanWebpackPlugin = require(\"clean-webpack-plugin\")\nconst fs = require(\"fs\")\nconst path = require(\"path\")\nconst webpack = require(\"webpack\")\n\nconst dist = path.join(proce...
javascript
chosen
[ { "from": "system", "value": "Make r.js logging maximally verbose\n" }, { "from": "human", "value": "{\n mainConfigFile: 'output/javascripts/common.js',\n optimize: 'none',\n baseUrl: 'output/javascripts', // was full canonical path\n findNestedDependencies: true,\n include: [ 'co...
javascript
chosen
[ { "from": "system", "value": "Add route component for 404 status\n" }, { "from": "human", "value": "import React from 'react';\nimport { Route } from 'react-router';\n\n/* containers */\nimport { App } from 'containers/App';\nimport { Home } from 'containers/Home';\nimport { List } from 'contain...
javascript
chosen
[ { "from": "system", "value": "Add Vuex to externals on build\n" }, { "from": "human", "value": "/* eslint-env node */\nconst path = require('path');\n\nmodule.exports = {\n context: path.resolve(__dirname, 'src'),\n entry: './index.js',\n output: {\n path: path.resolve(__dirname, 'dist'),\...
javascript
chosen
[ { "from": "system", "value": "Test work of API communication\n" }, { "from": "human", "value": "(function () {\n 'use strict';\n\n angular\n .module('scrum_retroboard')\n .controller('UserController', ['$scope', '$http', 'sessionService', 'userService', UserController]);\n\n ...
javascript
chosen
[ { "from": "system", "value": "Use implicit paths to predefined conf files\n" }, { "from": "human", "value": "\"use strict\";\n\nangular.module('arethusa.core').constant('MAIN_ROUTE', {\n controller: 'MainCtrl',\n template: '<div ng-include=\"template\"></div>',\n resolve: {\n loadConfigura...
javascript
chosen
[ { "from": "system", "value": "Use local scope, stop the spinner when loaded\n" }, { "from": "human", "value": "'use strict';\n\nfunction FeedErrorOverview51Ctrl($scope, $rootScope, $routeParams, $feedDataPaths, $location) {\n var publicId = $routeParams.vipfeed;\n $scope.publicId = publicId;\...
javascript
chosen
[ { "from": "system", "value": "Fix mis-implementation of jsdom check\n\nGoing with @domenic's suggestion from:\nhttps://github.com/tmpvar/jsdom/issues/1537\n" }, { "from": "human", "value": "// Shim to avoid requiring Velocity in Node environments, since it\n// requires window. Note that this jus...
javascript
chosen
[ { "from": "system", "value": "Clean up the model a bit\n" }, { "from": "human", "value": "var Q = require('Q');\nvar request = Q.denodeify(require('request'));\nvar _ = require('underscore');\n\nfunction CampaignModel(name) {\n // @todo Can probably clean this up?\n _.bindAll.a...
javascript
chosen
[ { "from": "system", "value": "Add root route content and content type tests.\n" }, { "from": "human", "value": "/* eslint-disable func-names, no-use-before-define */\n\nimport co from 'co';\nimport test from 'blue-tape';\nimport agent from 'promisify-supertest';\n\nimport createApplication from ...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary logging and increase timeout.\n" }, { "from": "human", "value": "\"use strict\";\n\nvar fs = require('fs');\nvar should = require('chai').should();\nvar pdf2img = require('../index.js');\n\nvar input = __dirname + '/test.pdf';\n\npdf2img.s...
javascript
chosen
[ { "from": "system", "value": "Make sure warnings cannot cause crash\n\nFixes `Cannot read property 'start' of undefined` crash in case there is no `node.loc`, which might happen when using lebab's node API." }, { "from": "human", "value": "/**\n * Passed to transforms so they can log warnings.\n...
javascript
chosen
[ { "from": "system", "value": "Fix merge conflict with origin branch\n" }, { "from": "human", "value": "/**\n * Has Vowels\n * \n * hasVowel tests if the String calling the function has a vowels\n * \n * @param {void}\n * @return {Boolean} returns true or false indicating if the string\n * has a ...
javascript
chosen
[ { "from": "system", "value": "Bring back line highlighting & numbering\n" }, { "from": "human", "value": "import React from 'react';\n\nexport default function SourceCode({\n def,\n start,\n end,\n}) {\n return (\n <pre>\n <span>\n {def.slice(0, start)}\n </span>\n <...
javascript
chosen
[ { "from": "system", "value": "Remove leading zero from schedule date day\n" }, { "from": "human", "value": "import React from 'react';\nimport {\n\tView,\n\tText,\n\tStyleSheet,\n} from 'react-native';\nimport moment from 'moment';\n\nimport {\n\tCOLOR_LGREY,\n\tCOLOR_BLACK,\n} from '../../style...
javascript
chosen
[ { "from": "system", "value": "Change on account id for enablestudents\n" }, { "from": "human", "value": "EnableStudentController.$inject = ['$rootScope', 'toaster', 'TbUtils', '$state', 'students'];\n\nfunction EnableStudentController ($rootScope, toaster, TbUtils, $state, students) {\n\tconst v...
javascript
chosen
[ { "from": "system", "value": "Use security token interface for encoding access tokens.\n" }, { "from": "human", "value": "exports = module.exports = function(negotiateTokenContent, negotiateTokenType, Tokens) {\n \n return function issueToken(ctx, options, cb) {\n console.log('ISSUE TOKEN!'...
javascript
chosen
[ { "from": "system", "value": "Handle case when the form loads with an error\n" }, { "from": "human", "value": "$(document).ready(function() {\n $switcherFieldGroup = $(\"#request_personal_switch\");\n\n if ($switcherFieldGroup.length) {\n $switcherFieldGroup.addClass(\"personal_request_swit...
javascript
chosen
[ { "from": "system", "value": "Change minimum value of minimum content width\n" }, { "from": "human", "value": "'use babel';\n\nimport Controller from './controller.js';\n\nexport default {\n config: {\n grammars: {\n order : 1,\n type : 'array',\n default: ['source.gfm', 't...
javascript
chosen
[ { "from": "system", "value": "Update dnnGrid paint script to work on tables with\nor without tbody tags\n\n" }, { "from": "human", "value": "$(function () {\r\n // paint tables with dnnGrid classes\r\n var table = \".employeeDetails #employeeDisciplines table\";\r\n $(table).addClass (...
javascript
chosen
[ { "from": "system", "value": "feat: Allow to use a function in static methods\n" }, { "from": "human", "value": "import matreshkaError from './matreshkaerror';\n\n// checks type of a variable and throws an error if its type is not an object\nexport default function checkObjectType(object, method...
javascript
chosen
[ { "from": "system", "value": "Add sizing to API call query\n" }, { "from": "human", "value": "class ImageFactory {\n constructor($http, baseURLConfig) {\n 'ngInject';\n\n this.getList = function(query, count) {\n query = query.replace(' ', '+');\n return $http.get(baseURLConfig....
javascript
chosen
[ { "from": "system", "value": "Set correct type for setMatrixArrayType\n" }, { "from": "human", "value": "/**\n * Common utilities\n * @module glMatrix\n */\n\n// Configuration Constants\nexport const EPSILON = 0.000001;\nexport let ARRAY_TYPE = (typeof Float32Array !== 'undefined') ? Float32Arra...
javascript
chosen
[ { "from": "system", "value": "Make it clear that you should never access this._private_data directly.\n" }, { "from": "human", "value": "var _ = require('underscore');\n\nvar deepSet = function (obj, pathString, value) {\n var path = pathString.split('.');\n var len = path.length;\n for (var ...
javascript
chosen
[ { "from": "system", "value": "[feat]: Add placeholder text to resumer header\n" }, { "from": "human", "value": "import React, {PropTypes} from 'react';\nimport Paper from 'material-ui/lib/paper';\n\nexport default class ResumeHeader extends React.Component {\n static propTypes = {\n body: Pr...
javascript
chosen
[ { "from": "system", "value": "Add comments to solution to better understand\n" }, { "from": "human", "value": "// Sieve of Eratosthenes\n\n/*RULES:\n Function takes one parameter\n Return an array of all prime numbers from 0-parameter\n*/\n\n/*PSEUDOCODE:\n 1) Find square root of parameter\n ...
javascript
chosen
[ { "from": "system", "value": "Remove unneeded call to toString()\n\n" }, { "from": "human", "value": "import React, { PropTypes } from 'react'\nimport { connect } from 'react-redux'\n\nimport { incrementCounter, decrementCounter } from '../../actions/counter'\n\nimport {} from './app.css'\n\nlet...
javascript
chosen
[ { "from": "system", "value": "Include .jpeg in extensions that should trigger a save dialog.\n" }, { "from": "human", "value": "// Stopgap atom.js file for handling normal browser things that atom\n// does not yet have stable from the browser-side API.\n// - Opening external links in default web...
javascript
chosen
[ { "from": "system", "value": "Change require to use current dir: mocha runs node\n" }, { "from": "human", "value": "var TrieNode = require('trie-node');\n\nvar Trie = (function() {\n function Trie() {\n this.root = new TrieNode();\n }\n\n Trie.prototype.add = function(string) {\n this.r...
javascript
chosen
[ { "from": "system", "value": "Make wand plugin cleanup after itself.\n\nIf you disabled the wand plugin, the currently outlined element would\nstay outlined. This change fixes that.\n" }, { "from": "human", "value": "/**\n * Allows users to see what screen readers would see.\n */\n\nlet $ = requ...
javascript
chosen
[ { "from": "system", "value": ":bug: Remove href attribute from link decorator of WysiwygEditor\n" }, { "from": "human", "value": "import React, { useState } from 'react';\nimport { IconExternalLinkSmallOutline } from '@teamleader/ui-icons';\n\nimport Box from '../../box';\nimport Link from '../....
javascript
chosen
[ { "from": "system", "value": "Update curve path from points util\n" }, { "from": "human", "value": "/*\r\n Extension helper for generating a CurvePath from an array of supplied points.\r\n Accepts an array of [Vector3] points to contruct the path from.\r\n ---\r\n\r\n points Arr...
javascript
chosen
[ { "from": "system", "value": "Make db console errors consistant\n" }, { "from": "human", "value": "import _ from 'lodash'\n\nexport { removeEntries }\n\nfunction removeEntries (db, ids) {\n if (!db) throw new Error('Please provide a couchdb instance')\n if (!ids) throw new Error('Please provid...
javascript
chosen
[ { "from": "system", "value": "Refactor to follow style guides\n" }, { "from": "human", "value": "import Ember from 'ember';\n\n/**\n * @module components\n * @class sl-loading-icon\n */\nexport default Ember.Component.extend({\n\n /**\n * Class name bindings for the root element\n *\n...
javascript
chosen
[ { "from": "system", "value": "Fix legacy kernel config usage" }, { "from": "human", "value": "import * as path from 'path'\n\nimport { Loader } from './loader'\n\nvar loader\n\nconst system = () => {\n if (typeof loader === 'undefined') {\n let scope = new URL(self.registration.scope)\n l...
javascript
chosen
[ { "from": "system", "value": "Revert \"fix util.js usage and use utils.Adapter\"\n\nThis reverts commit 6bfb11f7f626735a63202ec846b3aaf49dbb9898.\n" }, { "from": "human", "value": "var srcDir = __dirname + \"/../\";\n\nmodule.exports = {\n all: {\n src: [\n srcDir + \"...
javascript
chosen
[ { "from": "system", "value": "Fix eslint ts override tsx matching\n" }, { "from": "human", "value": "module.exports = {\n extends: [\"matrix-org\"],\n plugins: [\n \"babel\",\n ],\n env: {\n browser: true,\n node: true,\n },\n\n rules: {\n \"no-var\"...
javascript
chosen
[ { "from": "system", "value": "Undo async decorator to attempt fix to About page\n" }, { "from": "human", "value": "/**\n * React Starter Kit (https://www.reactstarterkit.com/)\n *\n * Copyright © 2014-present Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT ...
javascript
chosen
[ { "from": "system", "value": "Allow specification of test suite via command line arg.\n" }, { "from": "human", "value": "require('./fake.js')\nrequire('./api.js')\nrequire('./transactionRunner.js')\n" }, { "from": "gpt", "value": "const argv = require('minimist')(process.argv.slice(2...
javascript
chosen
[ { "from": "system", "value": "Add beforeAll to setup redisPool\n" }, { "from": "human", "value": "var config = require('../config.json');\nvar RedisPool = require('../../index');\n\n" }, { "from": "gpt", "value": "var config = require('../config.json');\nvar RedisPool = require('../....
javascript
chosen
[ { "from": "system", "value": "Update errorHandler's tests to take into account new functionality\n" }, { "from": "human", "value": "'use strict';\nlet expect = require('chai').expect;\nlet errorHandler = require('../Utils/errorHandler.js');\ndescribe('Error handling', function() {\n it('convert...
javascript
chosen
[ { "from": "system", "value": "Remove an unnecessary condition check\n" }, { "from": "human", "value": "import {\n isArray,\n validateIsArray,\n combine,\n createValidateMinCount,\n createValidateMaxCount,\n} from '../validators.js';\n\nconst pluginArray = {\n compile(compiler, schemaDef, s...
javascript
chosen
[ { "from": "system", "value": "Repair Table js - some bugs from ext to jquery update\n" }, { "from": "human", "value": "Kwf.Utils.ResponsiveEl('.kwcBasicTable.responsiveFlipScroll', function(el) {\n var addArrow = function(el) {\n if (el.hasClass('flipScroll')) {\n var tbody ...
javascript
chosen
[ { "from": "system", "value": "Use better name and fix undefined references\n" }, { "from": "human", "value": "import cli from 'cli';\nimport {Gpio} from 'chip-gpio';\nimport temp from 'ds18x20';\n\nvar options = cli.parse();\n\nvar interval = 2000;\nvar threshold = 25;\n\nvar heater = new Gpio(0...
javascript
chosen
[ { "from": "system", "value": "Allow development server to be accessible from any IP" }, { "from": "human", "value": "import express from 'express'\nimport webpack from 'webpack'\nimport { logError, log } from '../util/log'\n\n\nexport default function startDevelop (webpackConfig) {\n const app ...
javascript
chosen
[ { "from": "system", "value": "Add toCompareWith custom matcher for comparing DateTimes\n" }, { "from": "human", "value": "define(function(require) {\n var DateTime = require('../main/DateTime')\n var DateFormat = require('../main/DateFormat')\n var jQuery = $ = require('jquery')\n\n return {...
javascript
chosen
[ { "from": "system", "value": "Fix fetching content for paths without dashes\n" }, { "from": "human", "value": "import React, { Component, PropTypes } from 'react';\nimport { connect } from 'react-redux';\nimport { init } from './redux/page';\nimport Page from './components/Page';\n\nclass Fronte...
javascript
chosen
[ { "from": "system", "value": "Mark ol.format.filter.Spatial as abstract class\n\nAdd missing abstract class description for class ol.format.filter.Spatial like in all other abstract classes." }, { "from": "human", "value": "goog.provide('ol.format.filter.Spatial');\n\ngoog.require('ol');\ngoog.r...
javascript
chosen
[ { "from": "system", "value": "Connect loading and error events to UI\n" }, { "from": "human", "value": "// Main script\n// -----------\n\nvar blackbird = blackbird || {};\n\nblackbird.player = {};\n\n$(document).ready(function() {\n\n blackbird.player = new blackbird.Player(blackbird.api_root...
javascript
chosen
[ { "from": "system", "value": "Clean up the configuration object passed to init func\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\n\nconst minimist = require('minimist');\n\nconst init = require('../lib/init');\nconst { showHelp, showVersion } = require('../lib/interactio...
javascript
chosen