conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Set 'darkest' as default tint\n" }, { "from": "human", "value": "import React, { PureComponent } from 'react';\nimport Box from '../box';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport { COLORS, TINTS } from '../../constants';\nimport the...
javascript
chosen
[ { "from": "system", "value": "Attach js to the turbolink load event\n" }, { "from": "human", "value": "// This is a manifest file that'll be compiled into application.js, which will include all the files\n// listed below.\n//\n// Any JavaScript/Coffee file within this directory, lib/assets/javas...
javascript
chosen
[ { "from": "system", "value": "Send master password when pressing enter\n" }, { "from": "human", "value": "// Copyright (c) 2015 Alejandro Blanco <alejandro.b.e@gmail.com>\n// MIT License\n\n/* global sjcl */\n\nimport Ember from 'ember';\n\nexport default Ember.Component.extend({\n errorMessa...
javascript
chosen
[ { "from": "system", "value": "Add control for number of spaces in JSON output.\n" }, { "from": "human", "value": "function Category(name) {\n this.category = name;\n this.features = [];\n}\n\nCategory.prototype.addFeature = function(name) {\n this.features.push({\"name\": name, \"suppor...
javascript
chosen
[ { "from": "system", "value": "Make cookie expire after 6 months, not 10 days.\n" }, { "from": "human", "value": "\n/*\n * GET home page.\n */\n\nexports.index = function(req, res){\n res.render('index');\n};\n\nexports.partials = function (req, res) {\n var name = req.params.name;\n res.rende...
javascript
chosen
[ { "from": "system", "value": "Add a basic dumb card in a ScrollView\n\nThese should be...nicer. But it's a start and it's more material-y than\nour existing styles ever were.\n" }, { "from": "human", "value": "import React, { PropTypes, Component } from 'react'\nimport { View, Text, StyleSheet,...
javascript
chosen
[ { "from": "system", "value": "Fix callback on docker gulp task\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar exec = require('child_process').exec;\n\nvar IMAGE_TAG = process.env.DOCKER_IMAGE_TAG || 'ottogiron/hapiseed';\n\ngulp.task('build-docker', function(callback){\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add support to react 15.4.0\n" }, { "from": "human", "value": "'use strict';\n\nexports.__esModule = true;\n\nvar _ReactUpdates = require('react/lib/ReactUpdates');\n\nvar _ReactUpdates2 = _interopRequireDefault(_ReactUpdates);\n\nvar _createUncontrollable = require...
javascript
chosen
[ { "from": "system", "value": "Move AnswerAreaRenderer export after functions\n\nAuditors: alex\n" }, { "from": "human", "value": "require(\"./all-widgets.js\");\n\nmodule.exports = {\n AnswerAreaRenderer: require(\"./answer-area-renderer.jsx\"),\n fixupJSON: require(\"./fixup-json...
javascript
chosen
[ { "from": "system", "value": "Correct load in home page\n\n\nFormer-commit-id: 84774fafb65ee054ef6599d001313f0c85f59c91" }, { "from": "human", "value": "function loadPageDataIntoEditor(path, collectionId) {\n\n checkPathSlashes(path);\n\n var pageUrlData = path + \"/data.json\";\n var pageUrl...
javascript
chosen
[ { "from": "system", "value": "test: Add react prop types simple\n" }, { "from": "human", "value": "/* global describe, it, expect */\nimport React from 'react'\nimport * as Schemative from '../src/schemative'\nimport * as mocks from './mocks'\n\nclass Foo extends React.Component {\n render () {...
javascript
chosen
[ { "from": "system", "value": "Add corrected destructure of a transactions other party\n" }, { "from": "human", "value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport { createRecord } from '../../../database/utilities';\nimport { UIDatabase } from '../../../datab...
javascript
chosen
[ { "from": "system", "value": "Remove useless 'arrangedContent'. The controller it itself sorted\n" }, { "from": "human", "value": "//= require test_helper\n\ndescribe(\"App.ContactsController\", function() {\n var controller,\n store;\n\n beforeEach(function() {\n store = lookupStore()...
javascript
chosen
[ { "from": "system", "value": "Fix console.log statement to display century number in Ch.5 HLE exercise\n" }, { "from": "human", "value": "import ANCESTRY_FILE from './ancestry-json';\nconst ancestry = JSON.parse(ANCESTRY_FILE);\n\n// When we looked up all the people in our data set that lived mo...
javascript
chosen
[ { "from": "system", "value": "Correct scroll on menu click\n" }, { "from": "human", "value": "function generateMenu(nodes) {\n let output = [];\n nodes.forEach((node) => {\n output.push(generateMenuFromNode(node));\n });\n return output.join('');\n}\n\nfunction generateMenuFro...
javascript
chosen
[ { "from": "system", "value": "Stop the event chain when we have handled the event.\n" }, { "from": "human", "value": "goog.provide('ol.control.Navigation');\n\ngoog.require('ol.control.Control');\n\n\n/**\n * @constructor\n * @extends {ol.control.Control}\n * @param {boolean|undefined} opt_autoA...
javascript
chosen
[ { "from": "system", "value": "Include body with GitHub issues.\n" }, { "from": "human", "value": "module.exports = {\n name: \"GitHub\",\n\n async matches(url) {\n return url.hostname == \"github.com\";\n },\n\n async parse(url) {\n let path = url.pathname.split(\"/\");\n let bugNum...
javascript
chosen
[ { "from": "system", "value": "Make it not too boring." }, { "from": "human", "value": "// 21: spread - with-strings\n// To do: make all tests pass, leave the assert lines unchanged!\n\ndescribe('spread with strings', () => {\n\n it('simply spread each char of a string', function() {\n const ...
javascript
chosen
[ { "from": "system", "value": "Add basic Book GET controller\n" }, { "from": "human", "value": "'use strict';\n\nconst app = require('express')();\nconst mongoose = require('mongoose');\n\nconst port = 8080;\n\n// Mongo\nmongoose.connect('mongodb://localhost/biblys');\n\nvar Book = mongoose.model...
javascript
chosen
[ { "from": "system", "value": "Add useAnyThenable option; don't reject if a synchronous function for returning an Error\n\n* The synchronous equivalent to rejecting a promise should really just be throwing an error. Returning an instanceof Error might not be a valid reason to reject a promise -- what if the ...
javascript
chosen
[ { "from": "system", "value": "Allow for Doctype to get passed through\n\nThis helps on compilation of partials" }, { "from": "human", "value": "/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Scott Beck @bline\n*/\nvar loaderUtils = require(\"loader-utils\");\nmodu...
javascript
chosen
[ { "from": "system", "value": "Make compatible with node 4\n" }, { "from": "human", "value": "'use strict';\n\nconst uuid = require('uuid');\nconst cls = require('continuation-local-storage');\n\nconst store = cls.createNamespace('1d0e0c48-3375-46bc-b9ae-95c63b58938e');\n\nfunction withId (work) ...
javascript
chosen
[ { "from": "system", "value": "Add method isDirectory to File model\n" }, { "from": "human", "value": "define([\n \"hr/hr\",\n \"hr/utils\",\n \"core/rpc\"\n], function(hr, _, rpc) {\n var File = hr.Model.extend({\n defaults: {\n path: null,\n name: null,\...
javascript
chosen
[ { "from": "system", "value": "Use a class function to reformat the stack\n" }, { "from": "human", "value": "'use strict';\n\nvar v8StyleErrors = require('./lib/v8-style')()\nvar reformat = require('./lib/reformat')\n\nfunction defaultInspect() {\n return this.message\n ? '[' + this.name + ':...
javascript
chosen
[ { "from": "system", "value": "Fix windows babel path bug\n" }, { "from": "human", "value": "#!/usr/bin/env node --harmony\nvar path = require( \"path\" );\nvar dir = path.basename( __dirname ); // directory this file is in\n\nrequire( \"babel-register\" )( {\n\tignore: false,\n\tonly: new RegExp...
javascript
chosen
[ { "from": "system", "value": "Fix for 'no writecb in Transform' error.\n\nThe clue came from the discussion here:\nhttps://github.com/rvagg/through2/issues/1\n" }, { "from": "human", "value": "'use strict';\n\nvar jest = require('jest-cli'),\n gutil = require('gulp-util'),\n through = requ...
javascript
chosen
[ { "from": "system", "value": "Fix frame hiding for electron v1\n" }, { "from": "human", "value": "const {app, BrowserWindow} = require('electron')\nvar path = require('path')\n\nvar main = null\n\napp.on('ready', function () {\n main = new BrowserWindow({\n height: 720,\n resizable: true,...
javascript
chosen
[ { "from": "system", "value": "Update version string to 2.6.0-rc.1\n" }, { "from": "human", "value": "'use strict';\n\nvar\n\tplatform = require('enyo/platform'),\n\tdispatcher = require('enyo/dispatcher'),\n\tgesture = require('enyo/gesture');\n\nexports = module.exports = require('./src/options...
javascript
chosen
[ { "from": "system", "value": "Add method to get Sass files from other Mojular modules\n" }, { "from": "human", "value": "require('./assets/scripts/mojular');\n" }, { "from": "gpt", "value": "var isArray = require('lodash/lang/isArray');\nvar util = require('util');\n\ntry {\n requir...
javascript
chosen
[ { "from": "system", "value": "Fix the \"should name define\" test in configCases/target/amd-unnamed\n" }, { "from": "human", "value": "it(\"should run\", function() {\n\n});\n\nit(\"should name define\", function() {\n\tvar fs = require(\"fs\");\n\tvar source = fs.readFileSync(__filename, \"utf-...
javascript
chosen
[ { "from": "system", "value": "Remove focus on one test\n" }, { "from": "human", "value": "fdescribe('BinaryTree', function () {\n beforeAll(function (done) {\n System.import('BinaryTree').then((a) => {\n this.BinaryTree = a.BinaryTree;\n done();\n });\n ...
javascript
chosen
[ { "from": "system", "value": "Exclude external module from code coverage\n" }, { "from": "human", "value": "module.exports = function(wallaby) {\n return {\n files: [\n \"importmap.js\",\n \"src/**/*.ts\",\n \"node_modules/@browser-modules/dictionary/li...
javascript
chosen
[ { "from": "system", "value": "Add \"find your chapter\" link, add analytics\n" }, { "from": "human", "value": "import React from 'react'\nimport { getEvents, logHit } from './utils/api'\nimport './thirdparty/bootstrap/css/bootstrap.min.css';\nimport EventList from './EventList';\n\nclass App ex...
javascript
chosen
[ { "from": "system", "value": "Fix RegExp to `$` for all targets rather than node\n" }, { "from": "human", "value": "'use strict';\n\nvar commander = require('commander');\nvar path = require('path');\nvar Queue = require('gear').Queue;\nvar registry = require('./tasks');\n\nvar build, ...
javascript
chosen
[ { "from": "system", "value": "Fix import name case error\n\nrepl.js imports \"./tinyLisp\", but the actual file is called\n\"tinylisp\" (note lowercase L). This breaks on Linux since\nthe file system is case-sensitive.\n" }, { "from": "human", "value": "var repl = require(\"repl\");\nvar tinyLis...
javascript
chosen
[ { "from": "system", "value": "Save the values of the instructions to concept results if available \n\n" }, { "from": "human", "value": "import {hashToCollection} from './hashToCollection'\n\nexport function getConceptResultsForSentenceCombining(question) {\n const directions = \"Combine the sen...
javascript
chosen
[ { "from": "system", "value": "Configure to work in 5T\n" }, { "from": "human", "value": "window.OTP_config = {\n\n initLatLng: [42.703632059618045, -73.7948226928711],\n\n osmMapKey: 'conveyal.ikck6888', // temporary -- do not use in production, provide your own\n aerialMapKey: 'conveyal.map-...
javascript
chosen
[ { "from": "system", "value": "Increase mocha timeout to 90000ms\n\nFix #13090\n" }, { "from": "human", "value": "module.exports = {\n recursive: true,\n reporter: 'spec',\n slow: 0,\n timeout: 60000,\n ui: 'bdd',\n extension: 'js',\n};\n" }, { "from": "gpt", "value"...
javascript
chosen
[ { "from": "system", "value": "Add support for gooddata submodules\n\nNow you can import particular module of gooddata-js.\n\nFor example to import only users module, you can use:\n```js\nimport user from 'gooddata/user';\n```\n" }, { "from": "human", "value": "/* globals gooddata */\n\ndefine('g...
javascript
chosen
[ { "from": "system", "value": "Patch AppRegistry to support dynamic app entry\n" }, { "from": "human", "value": "import React, { Component } from 'react'\nimport { AppRegistry } from 'react-native'\n\n// modify this variable to move around components and screens\nlet Entry = require('./index')\n\...
javascript
chosen
[ { "from": "system", "value": "Bring `this` back into scope\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport RestUtils from 'moviematcher/utils/rest';\nimport Cookie from 'moviematcher/utils/cookies';\n\nexport default Ember.Controller.extend({\n queryParams: ['redirect'],\n...
javascript
chosen
[ { "from": "system", "value": "Switch order of next trip and totals\n" }, { "from": "human", "value": "/* global fetch */\n\nimport React from 'react';\nimport TotalWidget from './TotalWidget';\nimport NextTripWidget from './NextTripWidget';\nimport TripTable from './TripTable';\nimport VisitedMa...
javascript
chosen
[ { "from": "system", "value": "Support fallback font when Verdana isn't available\n" }, { "from": "human", "value": "'use strict';\n\nvar path = require('path');\nvar PDFDocument = require('pdfkit');\n\nvar doc = (new PDFDocument({size:'A4', layout:'landscape'}))\n .font(path.join(__dirname, 'Ve...
javascript
chosen
[ { "from": "system", "value": "routes/flights/base: Reset \"page\" to 1 after leaving the route\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Route.extend({\n ajax: Ember.inject.service(),\n\n queryParams: {\n page: { refreshModel: true },\n column:...
javascript
chosen
[ { "from": "system", "value": "Move require into comment, to avoid unused global eslint warning\n" }, { "from": "human", "value": "const express = require(\"express\");\nconst reactrender = require(\"../../reactrender\");\nconst { Shot } = require(\"../../servershot\");\nconst { addDeviceActivity...
javascript
chosen
[ { "from": "system", "value": "Use id, do not assemble it manually\n" }, { "from": "human", "value": "var MutationTable = function ()\n{\n var element\n var mutations\n\n function detailFormatter(index, row_data, element)\n {\n var mutation_id = row_data._id\n var mutati...
javascript
chosen
[ { "from": "system", "value": "Convert select list to list view mode\n" }, { "from": "human", "value": "import declare from 'dojo/_base/declare';\nimport lang from 'dojo/_base/lang';\nimport Memory from 'dojo/store/Memory';\nimport List from 'argos/List';\n\n/**\n * @class crm.Views.SelectList\n ...
javascript
chosen
[ { "from": "system", "value": "Fix browser-aliased require to point to unaliased\n" }, { "from": "human", "value": "/**\n* @license Apache-2.0\n*\n* Copyright (c) 2020 The Stdlib Authors.\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except i...
javascript
chosen
[ { "from": "system", "value": "Make it tagless by default\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport layout from '../templates/components/power-datepicker';\nimport moment from 'moment';\nimport computed from 'ember-computed';\n\nfunction fallbackAction(fallback) {\n r...
javascript
chosen
[ { "from": "system", "value": "Fix bug with port change\n" }, { "from": "human", "value": "var express = require('express');\nvar bodyParser = require('body-parser');\nvar ipcMain = require('electron').ipcMain;\nvar notificationListener = express();\nconst path = require('path');\n\n// Load all e...
javascript
chosen
[ { "from": "system", "value": "Stop menu music when game starts\n" }, { "from": "human", "value": "/*\n * mainmenu.js\n * Handles main menu\n */\n\nYINS.MainMenu = function(game) {\n\tthis.music = null;\n\tthis.spacebar = null;\n};\n\nYINS.MainMenu.prototype = {\n\tcreate: function() {\n\t\...
javascript
chosen
[ { "from": "system", "value": "Change the specs for front page\n" }, { "from": "human", "value": "describe('should do sth useful than this', function() {\n var ptor = protractor.getInstance();\n it('should have class plain', function() {\n ptor.get('/#');\n expect(ptor.getTitl...
javascript
chosen
[ { "from": "system", "value": "Add no-save flag to installPackage\n" }, { "from": "human", "value": "const rimraf = require('rimraf')\nconst tmp = require('tmp');\nconst childProcess = require('child_process');\nconst { promisify } = require('util');\n\nconst InstallationUtils = {\n async getI...
javascript
chosen
[ { "from": "system", "value": "Save locale per user in local storage.\n" }, { "from": "human", "value": "import mutations from './mutations'\nimport localStorage from '../../../api/localStorage'\nimport { locale } from './getters'\n\nconst subscriptions = {\n [mutations.SET_LOCALE]: ({state}) ...
javascript
chosen
[ { "from": "system", "value": "Remove white flashes when changing URL\n" }, { "from": "human", "value": "$(document).ready(function(){$(\"body\").hide().fadeIn(1000);});\n\nvar slinkyRosDisplay = new ROSLIB.Ros({\n url: 'wss://42-b:9090'\n});\n\nvar displaySwitchTopic = new ROSLIB.Topic({\n ros...
javascript
chosen
[ { "from": "system", "value": "[minor] Remove useless calls to `Error` constructor\n" }, { "from": "human", "value": "'use strict';\n\nvar util = require('util');\n\n/**\n * Generic Primus error.\n *\n * @constructor\n * @param {String} message The reason for the error\n * @param {EventEmitter} l...
javascript
chosen
[ { "from": "system", "value": "Use HTTP(S) port per default when serving from a server and no queryparam 'port' is set. If being served from a different protocol scheme fall back to 8086\n" }, { "from": "human", "value": "// load global styling\nrequire(\"../theme/index.scss\");\n\nimport Mira fr...
javascript
chosen
[ { "from": "system", "value": "Fix emptying empty deploymentBucket bug\n\n" }, { "from": "human", "value": "'use strict';\n\nconst BbPromise = require('bluebird');\n\nmodule.exports = {\n emptyDeploymentBucket() {\n return BbPromise.bind(this)\n .then(this.getObjectsToRemove)\n .the...
javascript
chosen
[ { "from": "system", "value": "Send token on change password\n" }, { "from": "human", "value": "import { inject as service } from '@ember/service'\nimport Controller from '@ember/controller'\nimport { badRequest } from '../utils/request'\n\nexport default Controller.extend({\n pilasBloquesApi: s...
javascript
chosen
[ { "from": "system", "value": "Add array sort for node 0.8\n" }, { "from": "human", "value": "var dirGlob = require('../../../lib/fs/dir-glob');\nrequire('chai').should();\n\ndescribe('lib', function () {\n describe('fs', function () {\n describe('dir-glob', function () {\n v...
javascript
chosen
[ { "from": "system", "value": "Add the searchVirtualMachine promise method.\n" }, { "from": "human", "value": "var VirtualMachine = require('../models/virtualMachine');\nvar ErrorHelper = require('../lib/error_helper');\nvar virtualMachine = new VirtualMachine();\n\nfunction saveVirtualMachine(mo...
javascript
chosen
[ { "from": "system", "value": "Fix telescope-search route for iron:router 1.0\n\nThe ``onBeforeAction`` in ``PostsSearchController`` isn't calling ``this.next()``, and so is never dispatching." }, { "from": "human", "value": "adminNav.push({\n route: 'searchLogs',\n label: 'Search Logs'\n});\n\...
javascript
chosen
[ { "from": "system", "value": "Add sweet alert with timer when performing reorder\n" }, { "from": "human", "value": "import UserProfileStore from '../../stores/UserProfileStore';\n\n\nexport default function moveTreeNode(context, payload, done) {\n let userid = context.getStore(UserProfileStor...
javascript
chosen
[ { "from": "system", "value": "Remove file extension from `require` call.\n" }, { "from": "human", "value": "'use strict';\n\n// Dependencies.\nvar csslint = require('csslint');\n\n/**\n * A module for applying CSSLint to LESS.\n *\n * @augments csslint\n * @module csslint\n */\nmodule.exports = ...
javascript
chosen
[ { "from": "system", "value": "Fix item method arguements and replace item string\n" }, { "from": "human", "value": "/**\n *\n */\n\nvar battleNetApiRequest = require('../common/battleNetApiRequest');\n\nmodule.exports = (function() {\n 'use strict';\n\n return {\n\n item: function () {\n ...
javascript
chosen
[ { "from": "system", "value": "Disable node/no-deprecated-api for Buffer constructor\n\nThe use is deprecated since Node 6 but we still support Node 4 so we can't replace it yet.\n" }, { "from": "human", "value": "'use strict';\n\nconst got = require('got');\n\nclass Request {\n constructor (o...
javascript
chosen
[ { "from": "system", "value": "Change returns None to returns undefined" }, { "from": "human", "value": "/*\n * Copyright (c) 2016 Carleton Stuberg - http://imcpwn.com\n * BrowserBackdoorServer by IMcPwn.\n * See the file 'LICENSE' for copying permission\n *\n * Info: Plays the system beep.\n * P...
javascript
chosen
[ { "from": "system", "value": "Add API route that lists todos saved in the db\n" }, { "from": "human", "value": "const express = require(\"express\");\nconst bodyParser = require(\"body-parser\");\n\nconst { mongoose } = require(\"./db/mongoose\");\nconst { Todo } = require(\"./models/todo\");\nc...
javascript
chosen
[ { "from": "system", "value": "Revert \"add twitter card md\"\n" }, { "from": "human", "value": "var map;\nvar layer;\n\nmap = L.map('map', {\n center: [0, 0],\n crs: L.CRS.Simple,\n zoom: 0\n});\n\nvar url = window.location.search.replace('?url=', '');\n\n// http://stackoverflow.com/a/1822230...
javascript
chosen
[ { "from": "system", "value": "Update example to be easier to talk about\n" }, { "from": "human", "value": "// <<: timeout\nfor (var i=0; i<5; ++i) {\n setTimeout(function() {\n console.log(i);\n }, i*1000);\n}\n// :>>\n\n// <<: new-scope\nfor (var i=0; i<5; ++i) {\n (function(j) {\n set...
javascript
chosen
[ { "from": "system", "value": "Clear screen before displaying results\n" }, { "from": "human", "value": "#! /usr/bin/env node\n\n/*\n * pilot-fish\n * https://github.com/jeffminnear/pilot-fish\n *\n * Copyright (c) 2016 Jeff Minnear\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar...
javascript
chosen
[ { "from": "system", "value": "Add emberfire to default blueprint\n" }, { "from": "human", "value": "module.exports = {\n normalizeEntityName: function() {\n },\n\n afterInstall: function() {\n return this.addBowerPackageToProject('ember-simple-auth', '0.7.3');\n }\n};" }, { "from"...
javascript
chosen
[ { "from": "system", "value": "Make the form action redirect to the products.index page with the correct params\n" }, { "from": "human", "value": "// Dependencies\nimport Ember from 'ember';\nimport layout from '../templates/components/yebo-search';\n\n/**\n The search form\n\n @class YeboDetai...
javascript
chosen
[ { "from": "system", "value": "Fix path to partials + layouts\n" }, { "from": "human", "value": "// Watch project files for and spawn associated tasks upon changes\nmodule.exports = function(grunt) {\n grunt.config('watch', {\n options: {\n spawn: false\n },\n /...
javascript
chosen
[ { "from": "system", "value": "Fix Firefox where 'onstorage' in window === false. Reversing the check works in all browsers\n" }, { "from": "human", "value": "var support = module.exports = {\n // http://peter.michaux.ca/articles/feature-detection-state-of-the-art-browser-scripting\n has: funct...
javascript
chosen
[ { "from": "system", "value": "Drop down the fire rate\n" }, { "from": "human", "value": "import AbstractTower from '../AbstractTower';\n/**\n * MasterChef class\n * Master tower\n */\nexport default class MasterChef extends AbstractTower {\n\n constructor() {\n\n console.log('MasterChef -> c...
javascript
chosen
[ { "from": "system", "value": "Make tooltip enabling observe `popover` and `title`\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Mixin.create({\n\n /**\n * Attribute bindings for mixin's component element\n * @property {array} attributeBindings\n...
javascript
chosen
[ { "from": "system", "value": "Fix access denied page styling\n" }, { "from": "human", "value": "import React from 'react';\n\nimport AuthStore from '../stores/AuthStore';\nimport AlertPanel from './AlertPanel';\nimport Config from '../config/Config';\nimport MetadataStore from '../stores/Metadat...
javascript
chosen
[ { "from": "system", "value": "Add default type to declarations\n\n" }, { "from": "human", "value": "import {\n CREATE_DECLARATION, REMOVE_DECLARATION, EDIT_DECLARATION\n} from '../actions/declaration'\n\nimport {\n LOAD_QUESTIONNAIRE_SUCCESS\n} from '../actions/questionnaire'\n\nconst emptyDec...
javascript
chosen
[ { "from": "system", "value": "Add core-js polyfill for Promise.finally()\n" }, { "from": "human", "value": "// ECMAScript polyfills\nimport 'core-js/fn/array/fill';\nimport 'core-js/fn/array/find';\nimport 'core-js/fn/array/find-index';\nimport 'core-js/fn/array/from';\nimport 'core-js/fn/array/...
javascript
chosen
[ { "from": "system", "value": "Change checkbox values using prop()\n\n* With `.prop()` we can pass in true or false, rather than a “checked”\nstring\n" }, { "from": "human", "value": "$(document).ready(function() {\n $.each([\"business_size\", \"business_type\", \"location\", \"purpose\", \"sect...
javascript
chosen
[ { "from": "system", "value": "Support either DOM elements or ids in dynamicEllipsis script" }, { "from": "human", "value": "(function() {\n\n var ellipsisIntervals = {};\n\n this.dynamicEllipsis = {\n start: function(elementId, durationBetween, maxEllipsis) {\n var element = document.g...
javascript
chosen
[ { "from": "system", "value": "Move functions around, to logical order.\n" }, { "from": "human", "value": "import path from 'path';\nimport {\n convertOneFile, NoValidJsonStringError\n} from './one-file';\n\nfunction convertAllFiles(fromPath, fileNames, destPath) {\n const fromFileName = fileNa...
javascript
chosen
[ { "from": "system", "value": "Use Promise.reduce to guarantee order\n" }, { "from": "human", "value": "const fs = require('fs')\nconst path = require('path')\n\nexports.seed = function (knex, Promise) {\n return knex('knex_migrations').del()\n .then(() => {\n const files = fs.readdirSyn...
javascript
chosen
[ { "from": "system", "value": "Use getter to access instance values\n" }, { "from": "human", "value": "'use strict';\n\nvar bcrypt = require('bcrypt');\n\nmodule.exports = function (sequelize, DataTypes) {\n var User = sequelize.define('User', {\n username: {\n type: DataType...
javascript
chosen
[ { "from": "system", "value": "Move some tasks from qlight to qhard\n" }, { "from": "human", "value": "// Generate sitemap\n//\n'use strict';\n\n\nmodule.exports = function (N) {\n N.wire.on('init:jobs', function sitemap_generate() {\n const task_name = 'sitemap_generate';\n\n if (!N.confi...
javascript
chosen
[ { "from": "system", "value": "Fix not required let statment\n" }, { "from": "human", "value": "const Report = require('./Report');\nconst Notification = require('./Notification');\n\nasync function Reporter( request, reply ) {\n // Params https://sites.google.com/a/webpagetest.org/docs/advanced...
javascript
chosen
[ { "from": "system", "value": "Add JSDoc to MongoDB wrapper\n" }, { "from": "human", "value": "\nlet SakuyaDb = class {\n constructor (db) {\n this.db = db\n this.isOpen = false\n this.db.open( (err) => {\n if (err) {\n console.error(err)\n return\n }\n\n th...
javascript
chosen
[ { "from": "system", "value": "Remove redundant check for `role`.\n\nThis functionality was moved upstream into `isInteractiveElement`.\n" }, { "from": "human", "value": "'use strict';\n\nvar buildPlugin = require('./base');\nvar isInteractiveElement = require('../helpers/is-interactive-element')...
javascript
chosen
[ { "from": "system", "value": "Allow time to be positive offset if position is not set\n" }, { "from": "human", "value": "var utils = require('radiodan-client').utils;\n\nmodule.exports = function(options) {\n var validOptions = {};\n\n validOptions.time = parseInt(options.time);\n if (isNaN(v...
javascript
chosen
[ { "from": "system", "value": "Add an event emitter to I/O.\n" }, { "from": "human", "value": "var stream = require('stream'),\n run = require('./run'),\n exit = require('./exit'),\n slice = [].slice\n\nfunction createStream (s) {\n return s || new stream.PassThrough\n}\n\nmodule.expo...
javascript
chosen
[ { "from": "system", "value": "Add proptype validation to TextBlock\n" }, { "from": "human", "value": "import React from 'react';\n\nconst TextBlock = (props) => (\n <div className=\"container\">\n <h4 className=\"heading\">{props.title}</h4>\n <p>{props.content}</p>\n </div>\n);\n\n\nexp...
javascript
chosen
[ { "from": "system", "value": "Add missing semi-colon/fix image gallery unload\n" }, { "from": "human", "value": "import { RouteHandler } from 'wee-routes';\nimport $ from 'wee-dom';\nimport $events from 'wee-events';\nimport classes from '../../scripts/classes';\n\nfunction bindEvents() {\n\tcon...
javascript
chosen
[ { "from": "system", "value": "Validate so programmer errors don't fail quietly\n" }, { "from": "human", "value": "import sinon from 'sinon'\nimport ChunkifyOptions from './options'\n\n\nlet ChunkifyOptionsSpy = (callback) => {\n callback(sinon.spy(ChunkifyOptions, 'of'));\n ChunkifyOptions.of....
javascript
chosen
[ { "from": "system", "value": "Allow replace() to return strings or nothing,\nor arrays of strings, nodes and jq objects.\nCombine runs of strings into single text nodes.\n" }, { "from": "human", "value": "(function($){\n var textNode = function(node, search, replace, capturing) {\n var token...
javascript
chosen
[ { "from": "system", "value": "Make sure we're actually in a p5 context before capturing `this`, so createVector can be used as a general function in other contexts\n" }, { "from": "human", "value": "/**\n * @module Math\n * @submodule Math\n * @for p5\n * @requires core\n */\ndefine(function (re...
javascript
chosen
[ { "from": "system", "value": "Revert commit that accidentally checked in master" }, { "from": "human", "value": "module.exports = [\n 'https://broad-shibboleth-prod.appspot.com',\n 'https://all-of-us-workbench-test.appspot.com',\n 'https://all-of-us-rw-staging.appspot.com',\n 'https://all-of...
javascript
chosen
[ { "from": "system", "value": "Add library name to QUnit modules\n" }, { "from": "human", "value": "steal('can/util/mvc.js')\n.then('funcunit/qunit', \n\t 'can/test/fixture.js')\n.then(function() {\n\t// Set the test timeout to five minutes\n\tQUnit.config.testTimeout = 300000;\n})\n.then('./mvc...
javascript
chosen
[ { "from": "system", "value": "Fix JSLint error, use camelCase for functions\n" }, { "from": "human", "value": "Gratipay.giving = {}\n\nGratipay.giving.init = function() {\n Gratipay.giving.activate_tab('active');\n $('.giving #tab-nav a').on('click', Gratipay.giving.handle_click);\n}\n\nGr...
javascript
chosen
[ { "from": "system", "value": "Use grunt options for task configuration\n\nSee grunt-wiredep #92 for more information. This will be a breaking\nchange for current configurations. To upgrade the configuration: wrap\nall options for the wiredep task in Gruntfile.js (except for the src\noption) in an options ob...
javascript
chosen