conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Remove redundant code breaking tests\n"
},
{
"from": "human",
"value": "/* Clearing variables */\n\nimport { getPositionIn, getPositionOut } from './offsetCalculator';\nimport getInlineOption from './getInlineOption';\n\nconst prepare = function($elements, options) ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused lines of code.\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport registerServiceWorker from './registerServiceWorker';\nimport Navbar from './compon... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor out applying function. Throw if invalid.\n"
},
{
"from": "human",
"value": "var _ = require('underscore');\n\nSYMBOL_TABLE = {}\n\nexports.define = function (sym, val) {\n SYMBOL_TABLE[sym] = val;\n}\n\nexports.eval = function eval(form, stack_frame) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Convert non-200 fetch responses into errors\n"
},
{
"from": "human",
"value": "var util = require('./util');\n\nmodule.exports = function fetchFeed(delegate) {\n // delegate.url: a url string\n // delegate.verbose: a bool\n // delegate.onError: an error handler\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove comma dangle rule from eslint rules (VueComponent methods use _comma dangle)\n"
},
{
"from": "human",
"value": "module.exports = {\n root: true,\n env: {\n 'browser': true\n },\n parser: 'babel-eslint',\n parserOptions: {\n sourceType: 'module'\n ... | javascript | chosen |
[
{
"from": "system",
"value": "ci: Fix env var name for BrowserStack user\n"
},
{
"from": "human",
"value": "const reporter = require('mocha/lib/reporters').min;\nconst bridgeTests = require('mocha-selenium-bridge');\nconst { Builder } = require('selenium-webdriver');\n\nconst bsConfig = {\n pro... | javascript | chosen |
[
{
"from": "system",
"value": "Add link to 3.2 documentation and remove 2.0 link.\n"
},
{
"from": "human",
"value": "window.docMeta = (function () {\n var version = '3.2';\n var name = 'ogm-manual';\n var href = window.location.href;\n return {\n name: name,\n version: version,\n ava... | javascript | chosen |
[
{
"from": "system",
"value": "Include view-only key in WaterButler URLs.\n"
},
{
"from": "human",
"value": "var $ = require('jquery');\nvar settings = require('settings');\n\n\nfunction getCookie() {\n match = document.cookie.match(/osf=(.*?)(;|$)/);\n return match ? match[1] : null;\n}\n\... | javascript | chosen |
[
{
"from": "human",
"value": "Add code for sum and mean to 7.8\n"
},
{
"from": "gpt",
"value": "// Release 1: Tests to User Stories\n\n/*\n\nAs as user, I want to be able to do three things:\n\n(1) I want to be able to take a list of numbers and find their sum.\n\n(2) I want to be able to take a ... | javascript | chosen |
[
{
"from": "system",
"value": "Use `$http` service to fetch stations data.\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('velo-app').controller('MainCtrl', ['$scope', 'apiService', function ($scope, apiService) {\n $scope.initialize = function () {\n var map = L.map... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Add browser: true to env map to suppress eslint errors for browser globals\"\n\nThis reverts commit b314d1b8a1c2ec7c26600b4e7f39f83083a1b835.\nSee commit 79167ab0f855beb6942d576735a19d65f0f503e2.\n"
},
{
"from": "human",
"value": "module.exports = {\n\t\"ro... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug if model is initially null.\n"
},
{
"from": "human",
"value": "angular.module('gm.typeaheadDropdown', ['ui.bootstrap'])\n.directive('typeaheadDropdown', function() {\n\treturn {\n\t\ttemplateUrl:'templates/typeaheadDropdown.tpl.html',\n\t\tscope: {\n\t\t\tmo... | javascript | chosen |
[
{
"from": "system",
"value": "Use workspace.root() instead of workspace.path()\n"
},
{
"from": "human",
"value": "var Watcher = require('large-watcher');\n\n\nmodule.exports = function(codebox) {\n var events = codebox.events;\n\n codebox.logger.log(\"Starting the file watcher\");\n\n c... | javascript | chosen |
[
{
"from": "system",
"value": "Test commit for Unity WWW\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar router = express.Router();\n\n/* GET home page. */\nrouter.get('/', function(req, res, next) {\n res.render('index', { title: \"Dito's laboratory\" });\n});\n\nmodul... | javascript | chosen |
[
{
"from": "system",
"value": "Build route for projects api\n"
},
{
"from": "human",
"value": "/*\n * Controllers\n */\n\nvar homeController = require('../controllers/home_controller');\nvar authController = require('../controllers/authentication_controller');\n\n/*\n * Routes\n */\n\nmodule.expo... | javascript | chosen |
[
{
"from": "system",
"value": "Fix beta with new sampling logic.\n"
},
{
"from": "human",
"value": "import math from 'mathjs';\nimport {Sample} from './Sampler.js'\nimport {jStat} from 'jstat'\n\nexport var Sampler = {\n sample({hits, total}, n) {\n // This treats your entry as a prior, and a... | javascript | chosen |
[
{
"from": "system",
"value": "Fix route binding for nested recipes"
},
{
"from": "human",
"value": "// This file defines all routes and function handling these routes.\n// All routes are accessible using GET and POST methods.\n\nconst routes = {\n '/item': require('../controllers/items/byId.js'... | javascript | chosen |
[
{
"from": "system",
"value": "Enable the rest of Babylon's experimental plugins, for max tolerance.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nconst babylon = require(\"babylon\");\n\nexports.options = {\n allowImportExportEverywhere: true,\n allowReturnOutsideFunction: true,\n plu... | javascript | chosen |
[
{
"from": "system",
"value": "Put time and day in separate columns\n"
},
{
"from": "human",
"value": "import moment from 'moment'\nimport textTable from 'text-table'\n\nconst find = (apiWrapper) => (search, options) => {\n const {\n startdate,\n enddate,\n businessunitids\n } = option... | javascript | chosen |
[
{
"from": "system",
"value": "Fix options param names to match their requests."
},
{
"from": "human",
"value": "var utils = require('../utils/httpUtils.js');\nvar _ = require('underscore');\nvar constants = require('../utils/constants.js');\n\nexports.create = function(options) {\n var optionsT... | javascript | chosen |
[
{
"from": "system",
"value": "Remove commented thunk code in saga\n"
},
{
"from": "human",
"value": "/** @babel */\n/** global atom */\n\nimport { delay } from 'redux-saga'\nimport { put, call, select, take, fork } from 'redux-saga/effects'\nimport { run } from 'node-jq'\nimport { ACTIONS as ACT... | javascript | chosen |
[
{
"from": "system",
"value": "Return the result of calling emit on emittery\n"
},
{
"from": "human",
"value": "const SubscriberAggregator = require(\"./SubscriberAggregator\");\nconst Emittery = require(\"emittery\");\n\nclass EventManager {\n constructor(eventManagerOptions) {\n const { log... | javascript | chosen |
[
{
"from": "system",
"value": "Move function out of the scope\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n/**\n * Handle arguments for backwards compatibility\n * @param {Object} args\n * @returns {{config: {}, cb: *}}\n */\nmodule.exports = function (args) {\n\n var config = {};\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use Promisify and add ability to get String/Array of globs in api\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* global -Promise */\nvar Promise = require('bluebird');\nvar _ = require('underscore');\nvar glob = require('glob');\n\nvar getFileList = function... | javascript | chosen |
[
{
"from": "system",
"value": "Update <Text> tests so they are not as particular about browser differences\n"
},
{
"from": "human",
"value": "import ReactDOM from 'react-dom';\nimport React from 'react';\nimport { shallow, render } from 'enzyme';\nimport { expect } from 'chai';\nimport { Text } f... | javascript | chosen |
[
{
"from": "system",
"value": "Use GET method to parse coordinates\n"
},
{
"from": "human",
"value": "/* eslint-disable new-cap */\n\nconst router = require('express').Router();\nconst jsonParser = require('body-parser').json();\n\nconst handlers = require('./handlers');\n\n// Geometry tools\n\nr... | javascript | chosen |
[
{
"from": "system",
"value": "Add uglify2 minification to build\n"
},
{
"from": "human",
"value": "({\n mainConfigFile: '../requirejs.conf.js',\n paths: {\n almond: 'lib/almond/almond'\n },\n baseUrl: '..',\n name: \"streamhub-permalink\",\n include: [\n 'almond',\n 'streamhub-per... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for automatic tagging, needs to return an empty list instead of null.\n"
},
{
"from": "human",
"value": "\n//note must be set in gulp .sh config.\nconst ServiceURL = process.env.ASSET_PROCESSING_SERVICE\n\nconst Endpoints = {\n imageTagging: ServiceURL + \"/i... | javascript | chosen |
[
{
"from": "system",
"value": "Create utilities for module generators\n\nSummary:\nThere are two operations we do in every NativeModule generator:\n- We convert the `SchemaType` into a map of NativeModule schemas\n- If the type-annotation is a TypeAliasTypeAnnotation, we resolve it by doing a lookup on the N... | javascript | chosen |
[
{
"from": "system",
"value": ":recycle: Use regex for parsing TimeString\n"
},
{
"from": "human",
"value": "export default function parseTimeString(str) {\n const regexRes = new RegExp('[0-9]{0,2}:[0-9]{0,2}').exec(str);\n let hours = null;\n let minutes = null;\n if (regexRes) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "[ADD] Add visit site link to navbar\n"
},
{
"from": "human",
"value": "import React from 'react';\n\n\nclass MainNavigation extends React.Component {\n\trender() {\n\t\treturn (\n\t\t\t<div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\n\nexport default MainNavigation;\n"
},
... | javascript | chosen |
[
{
"from": "system",
"value": "Add `date` to post meta-date-uh 😆\n"
},
{
"from": "human",
"value": "'use strict';\nconst fs = require('fs-extra');\nconst marked = require('marked');\nconst parser = require('./littlePostParser');\n\nmodule.exports = function readFiles(path) {\n const posts = [];... | javascript | chosen |
[
{
"from": "system",
"value": "Add creating gitter client and listen message\n"
},
{
"from": "human",
"value": "var Gitter = require('node-gitter');\nvar fs = require('fs');\nvar config = fs.existsSync('../config/local.js') ? require('../config/local.js') : {};\n\n/**\n * Create new instance of G... | javascript | chosen |
[
{
"from": "system",
"value": "Add quantity into edit rules.\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports =\n\n/*@ngInject*/\nfunction EditSentence(\n $scope, SentenceWritingService, $state, _\n) {\n SentenceWritingService.getSentenceWriting($state.params.id)\n .then(fu... | javascript | chosen |
[
{
"from": "system",
"value": "Allow detail to be falsy\n"
},
{
"from": "human",
"value": "const CustomEvent = ((Event) => {\n if (Event) {\n try {\n new Event(); // eslint-disable-line no-new\n } catch (e) {\n return undefined;\n }\n }\n return Event;\n})(window.CustomEvent... | javascript | chosen |
[
{
"from": "system",
"value": "Add constructor and error callback tests.\n"
},
{
"from": "human",
"value": "var bag = require('bagofholding'),\n sandbox = require('sandboxed-module'),\n should = require('should'),\n checks, mocks,\n sapi;\n\ndescribe('sapi', function () {\n\n function create... | javascript | chosen |
[
{
"from": "system",
"value": "Use our new colors constant for the 'color' prop type\n"
},
{
"from": "human",
"value": "import React, { PureComponent } from 'react';\nimport Box from '../box';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport theme from './theme.css';\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add LONGTEXT type for MySQL\n"
},
{
"from": "human",
"value": "var Sequelize = require('sequelize');\nvar inflection = require('inflection');\n\n$config.database.logging = $config.database.log ? console.log : false;\nvar sequelize = new Sequelize($config.database.na... | javascript | chosen |
[
{
"from": "system",
"value": "Use icons and titles in formSelector\n"
},
{
"from": "human",
"value": "'use strict';\nangular.module('arethusa.morph').directive('formSelector', function () {\n return {\n restrict: 'A',\n link: function(scope, element, attrs) {\n var id = scope.id;\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests to make sure each rule has a recommended setting and a description\n"
},
{
"from": "human",
"value": "import fs from 'fs';\nimport test from 'ava';\nimport pify from 'pify';\nimport index from '../';\n\ntest('every rule should defined in the index file and... | javascript | chosen |
[
{
"from": "system",
"value": "Tweak peek42 websocket node init code"
},
{
"from": "human",
"value": "import EventEmitter from 'events';\n\nconst cable = {\n __proto__: EventEmitter.prototype,\n\n init(websocket) {\n if (this._websocket) {\n this._websocket.terminate();\n }\n this... | javascript | chosen |
[
{
"from": "system",
"value": "Remove process.exit(0) when windows is closed\n"
},
{
"from": "human",
"value": "/* ---------- Electron init ------------------------------------------------- */\nimport { app, BrowserWindow } from 'electron'\n/* ---------- Requires ---------------------------------... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor API names for future use\n"
},
{
"from": "human",
"value": "import express from 'express';\nimport eventsGetAll from '../middleware/api/eventsGetAll';\n\nconst router = express.Router();\n\nrouter.get('/', (request, response) => {\n response.json({succes... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor snakeCase function to use custom compose function\n"
},
{
"from": "human",
"value": "import R from 'ramda';\nimport spaceCase from './space-case.js';\nimport uncapitalize from './uncapitalize.js';\n\n// a -> a\nconst snakeCase = R.compose(\n uncapitalize,\... | javascript | chosen |
[
{
"from": "system",
"value": "Add target to aui-button links\n"
},
{
"from": "human",
"value": "export default {\n\n render(createComponent) {\n const attrs = {\n disabled: this.disabled,\n href: this.href\n };\n const elementType = this.href ? 'a' : 'button'\n return crea... | javascript | chosen |
[
{
"from": "system",
"value": "Use `_console` instead of `console`\n\nSo that we don’t have to rely on external `console.log` presence."
},
{
"from": "human",
"value": "var util = require(\"util\");\nvar assert = require(\"assert\");\nvar now = require(\"date-now\");\n\nvar _console = {};\nvar ti... | javascript | chosen |
[
{
"from": "system",
"value": "Fix send error messages in wsProxy.\n"
},
{
"from": "human",
"value": "import assign from 'lodash.assign'\nimport createDebug from 'debug'\nimport WebSocket from 'ws'\n\nconst debug = createDebug('xo:wsProxy')\n\nconst defaults = {\n // Automatically close the clie... | javascript | chosen |
[
{
"from": "system",
"value": "Remove tags_vision field from splitting of tags -- as it is empty it will have no effect\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst fields = [\n 'tags',\n 'tags_vision',\n 'tags_verified'\n]\n\nmodule.exports = metadata => {\n fields.forEach(field... | javascript | chosen |
[
{
"from": "system",
"value": "Move build status to beginning of message\n"
},
{
"from": "human",
"value": "let Config = require('../../config');\nlet url = require('url');\nlet webHook = url.resolve(Config.app.url, '/codeship/');\n\nclass FormatterService {\n\n\tformat(type, build) {\n\t\treturn... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to actionhero based API\n"
},
{
"from": "human",
"value": "class PublicTagsAPIService {\n constructor(publicAPIRoute) {\n this.publicAPIRoute = publicAPIRoute;\n }\n\n getPopularTags() {\n return this.publicAPIRoute('tags').one('popular... | javascript | chosen |
[
{
"from": "system",
"value": "Add upstream EncryptedPromise class to Secret\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst crypto = require('crypto');\nconst Network = require('./network');\nconst Witness = require('./witness');\nconst MAX_MEMORY = Math.pow(2, 21) + (64 * 1000);\n\ncl... | javascript | chosen |
[
{
"from": "system",
"value": "Syntax: Use new assign method instead of lodash\n"
},
{
"from": "human",
"value": "var assign = require('lodash.assign');\nvar testrunner = require('../lib/testrunner').testRunner;\n\nvar es2015 = require('./es2015.json');\nvar es2016 = require('./es2016.json');\nva... | javascript | chosen |
[
{
"from": "system",
"value": "Add function to TaxonPresenter to resolve view template path from request\n\nStill uses the selected tab for the template name, but now looks for the\ntemplate in a directory names after the base path.\n\ne.g. - '/taxons/:taxonSlug' will render templates from 'app/views/taxons'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix passed id of state add\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar LocalStorageUtils = require(\"./utils/LocalStorageUtils\");\nvar StateIds = require(\"./states/States\");\n\nvar InitializeState = require(\"./states/InitializeState\");\nvar MenuSt... | javascript | chosen |
[
{
"from": "system",
"value": "Add first javascript test and make the test pass\n"
},
{
"from": "human",
"value": "/**\n * Created by sonja on 10/29/16.\n */\n"
},
{
"from": "gpt",
"value": "describe(\"The constructor is supposed a proper Captcha object\", function() {\n it('Constr... | javascript | chosen |
[
{
"from": "system",
"value": "Add test if captcha is instance of Captcha class\n"
},
{
"from": "human",
"value": "describe(\"The constructor is supposed a proper Captcha object\", function() {\n it('Constructor Captcha exists', function(){\n expect(Captcha).toBeDefined();\n });\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Move export button in all Highcharts\n"
},
{
"from": "human",
"value": "export default {\n standard: {\n credits: { enabled: false },\n chart: {\n style: {\n fontFamily: \"'proxima', 'Helvetica', sans-serif' \"\n }\n },\n title: ''\n }... | javascript | chosen |
[
{
"from": "system",
"value": "Add valid key for .map'd FeaturedGene components\n"
},
{
"from": "human",
"value": "import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport styled from \"styled-components\"\n\nimport FeaturedGene from \"./FeaturedGene\"\n\nconst propTypes = {\n f... | javascript | chosen |
[
{
"from": "system",
"value": "Remove vaccines from normal dispensing window\n"
},
{
"from": "human",
"value": "/**\n * mSupply Mobile\n * Sustainable Solutions (NZ) Ltd. 2019\n */\n\nimport { ROUTES } from '../navigation/constants';\nimport { UIDatabase } from '../database';\nimport { PRESCRIPTI... | javascript | chosen |
[
{
"from": "system",
"value": "Update for plug-in : WiReD\n"
},
{
"from": "human",
"value": "var hoverZoomPlugins = hoverZoomPlugins || [];\nhoverZoomPlugins.push({\n name:'Wired',\n version:'0.1',\n prepareImgLinks:function (callback) {\n var res = [];\n hoverZoom.urlRepl... | javascript | chosen |
[
{
"from": "system",
"value": "Add hasSidebar to LoggedInView to use the drag gesture to reveal the menu\n"
},
{
"from": "human",
"value": "import { View, __, Sidebar, ViewManager, NavBar } from 'erste';\nimport MainView from '../main-view';\n\n\nclass LoggedInView extends View {\n constructor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the funcunit-syn integration “Drag To” test\n\nDragging & dropping works because of jQuery++, so its version of jQuery had to be referenced instead of the `browser/jquery` import.\n"
},
{
"from": "human",
"value": "steal(\"../../browser/jquery\", \"jquerypp/inde... | javascript | chosen |
[
{
"from": "system",
"value": "Validate that all Connections include PageInfo\n"
},
{
"from": "human",
"value": "import 'lint-tests'; // eslint-disable-line\n"
},
{
"from": "gpt",
"value": "import 'lint-tests'; // eslint-disable-line\n\nimport assert from 'assert';\nimport Client from... | javascript | chosen |
[
{
"from": "system",
"value": "Fix marked table options setting\n"
},
{
"from": "human",
"value": "define([\n 'marked',\n 'to-markdown'\n], function (\n marked,\n tomarkdown\n) {\n 'use strict';\n return (function() {\n var toHTML = function(src) {\n marked.setOptions({\n bre... | javascript | chosen |
[
{
"from": "system",
"value": "Add examples to the endpoint documentation\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = defineRoute;\n\n// Define the route\nfunction defineRoute (server, opts) {\n\n server.route({\n method: 'GET',\n path: '/',\n hand... | javascript | chosen |
[
{
"from": "system",
"value": "Update library on finish state manual set."
},
{
"from": "human",
"value": "var Item = require('../models/item').Item;\nvar ItemTypes = require('../models/item').ItemTypes;\nvar ItemStates = require('../models/item').ItemStates;\nvar ItemTypeIcons = require('../mode... | javascript | chosen |
[
{
"from": "system",
"value": "Add switch to activate debug in tests\n\nHelpful in developing tests\n"
},
{
"from": "human",
"value": "var bs = require('../lib/beanstalk_client');\nvar net = require('net');\n\nvar port = process.env.BEANSTALK_PORT || 11333;\n\nvar mock = process.env.BEANSTALKD !=... | javascript | chosen |
[
{
"from": "system",
"value": "Use labels definied on relation if available\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar d = require('es5-ext/lib/Object/descriptor')\n , Db = require('dbjs')\n , DOMText = require('./_text')\n , getValue = Object.getOwnPropertyDescripto... | javascript | chosen |
[
{
"from": "system",
"value": "Add sign up link that shows if no user is signed in\n"
},
{
"from": "human",
"value": "{\n angular\n .module('meganote.users')\n .directive('userLinks', [\n\n 'CurrentUser',\n\n (CurrentUser) => {\n\n class UserLinksController {\n us... | javascript | chosen |
[
{
"from": "system",
"value": ":white_check_mark: Add Custom Plugin and No Compile\n\n* Make sure custom plugins are used when rendering Markdown\n* Add test for null file\n* Add test for streams that throw errors\n"
},
{
"from": "human",
"value": "import test from 'ava';\nimport {fromString} fro... | javascript | chosen |
[
{
"from": "system",
"value": "Remove some artist code in Badge component\n"
},
{
"from": "human",
"value": "import { h, Component } from 'preact';\nimport style from './style';\n\nimport Icon from '../Icon';\n\nexport default class Badge extends Component {\n render() {\n const { artist, eve... | javascript | chosen |
[
{
"from": "system",
"value": "Remove notify from dropbox fangorn [skip ci]\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar m = require('mithril');\nvar Fangorn = require('js/fangorn');\n\nfunction _fangornLazyLoadError (item) {\n item.notify.update('Dropbox couldn\\'t load, please try... | javascript | chosen |
[
{
"from": "system",
"value": "Print status at the extension's badge\n"
},
{
"from": "human",
"value": "var MoochSentinel = {\n\n render: function(status) {\n document.getElementById(\"status\").innerText = status.okay? \"Okay!\" : \"Blocked\";\n },\n\n requestStatus: function() {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add Asset mapping property (inherits from directory.mapping)\n"
},
{
"from": "human",
"value": " var fs = require('fs'),\n __bind = require('./helpers').bindFunctionToScope,\n escapeRegExp = require('./helpers').escapeRegExp,\nAssetDirectives = req... | javascript | chosen |
[
{
"from": "system",
"value": "Clarify that options takes a database parameter\n\nHi,\r\n\r\nFirst, many thanks for putting this together. \r\n\r\nI just got (stupidly) stuck on this for a bit until I read the docs a bit more closely and realized that the DB name is part of the options object. I figured I wo... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"fix(client: spec): change jasmine timeout from 120 to 180 s\"\n\nThis reverts commit a5f8f6d08b31d20dfec1cd89ada0b1b0b23c5b36.\n"
},
{
"from": "human",
"value": "'use strict';\n\n//var ScreenShotReporter = require('protractor-screenshot-reporter');\n\nexpor... | javascript | chosen |
[
{
"from": "system",
"value": "Add method to render label + input\n"
},
{
"from": "human",
"value": "export function diffObjects(prev, cur) {\r\n let newValues = Object.assign({}, prev, cur);\r\n let diff = {};\r\n\r\n for (const [key, value] of Object.entries(newValues)) {\r\n if (prev[key... | javascript | chosen |
[
{
"from": "system",
"value": "Save parameter in init function\n"
},
{
"from": "human",
"value": "var fs = require('fs')\n\nvar documents = {}\n\nmodule.exports = {\n init: (config, callback) => {\n var directories = fs.readdirSync('.')\n if (directories.indexOf(config.directory) === -1) {... | javascript | chosen |
[
{
"from": "system",
"value": "Use git tags prepended with v\n\nThis makes the script behave like other imagemin binary projects.\n\nPull Request URL:\nhttps://github.com/imagemin/gifsicle-bin/pull/56\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar path = require('path');\nvar BinWrapper ... | javascript | chosen |
[
{
"from": "system",
"value": "Handle baseDir option to resolve include paths before rendering;\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar sass = require(\"node-sass\");\nvar through = require(\"through\");\nvar path = require(\"path\");\nvar extend = require('util')._extend;\n\nmo... | javascript | chosen |
[
{
"from": "system",
"value": "Add personality (like a homepage)\n"
},
{
"from": "human",
"value": "(function() {\n 'use strict';\n\n program.prompt([\n 'Hello—I\\'m Prompt.'\n ]);\n\n}());\n"
},
{
"from": "gpt",
"value": "(function() {\n 'use strict';\n\n const stdin = docume... | javascript | chosen |
[
{
"from": "system",
"value": "Remove silence to see what happen...\n"
},
{
"from": "human",
"value": "var path = require(\"path\");\n\nmodule.exports = function (grunt) {\n grunt.loadNpmTasks('grunt-gitbook');\n grunt.loadNpmTasks('grunt-gh-pages');\n grunt.loadNpmTasks('grunt-contrib-c... | javascript | chosen |
[
{
"from": "system",
"value": "Make `@import` paths relative to `./stylesheets`\n\nThe Load path is set to\n\n `govuk_frontend_toolkit/stylesheets`\n\nso having the `@import` paths relative to\n\n `govuk_frontend_toolkit`\n\nis breaking the tests.\n"
},
{
"from": "human",
"value": "module.e... | javascript | chosen |
[
{
"from": "system",
"value": "Fix improper import of join-classnames\n"
},
{
"from": "human",
"value": "import styles from './BookList.css';\nimport classes from 'classnames';\n\nexport default ({title, zebra, children, className}) => (\n <div>\n {title ? <h3 className={styles.listTitl... | javascript | chosen |
[
{
"from": "system",
"value": "[TASK] Convert app component to function\n"
},
{
"from": "human",
"value": "/*\n * boilerplate-redux-react\n *\n * Copyright(c) 2015 André König <andre.koenig@posteo.de>\n * MIT Licensed\n *\n */\n\n/**\n * @author André König <andre.koenig@posteo.de>\n *\n */\n\nim... | javascript | chosen |
[
{
"from": "system",
"value": "Add ‘age’ to post content\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar user = module.parent.require('./user'),\n db = module.parent.require('./database'),\n plugin = {};\n\nplugin.init = function(params, callback) {\n\tvar app = params.router,\n\t... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused variable name for router\n"
},
{
"from": "human",
"value": "import * as Backbone from 'backbone';\nimport AppRouter from './routers/app-router';\n\nlet router = new AppRouter();\nBackbone.history.start({pushState: true});\n"
},
{
"from": "gpt",... | javascript | chosen |
[
{
"from": "system",
"value": "Add scss loader to webpack\n"
},
{
"from": "human",
"value": "var path = require('path');\n\nmodule.exports = {\n entry: './index.js',\n output: {\n path: path.join(__dirname, 'dist'),\n filename: 'bundle.js'\n },\n module: {\n loaders: [\n {\n\tte... | javascript | chosen |
[
{
"from": "system",
"value": "Fix problem with TOC and nested tags\n"
},
{
"from": "human",
"value": "$(document).ready(function() {\n var $toc = $('#toc');\n\n function format (title) {\n var $title = $(title),\n txt = $title.text(),\n id = $title.attr('id');\n return \"<l... | javascript | chosen |
[
{
"from": "system",
"value": "Replace browser history on roster filter update\n"
},
{
"from": "human",
"value": "define(function (require) {\n 'use strict';\n\n var Marionette = require('marionette'),\n\n LearnersRouter;\n\n LearnersRouter = Marionette.AppRouter.extend({\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove epl-plugin in development mode\n"
},
{
"from": "human",
"value": "if (process.env.NODE_ENV !== 'production') {\n // we're importing script and styles from given plugin\n // this method should be only used in development\n // for production specify your plu... | javascript | chosen |
[
{
"from": "system",
"value": "Remove useless locales from moment\n"
},
{
"from": "human",
"value": "const { join } = require('path')\nconst { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')\n\nmodule.exports = {\n webpack: function (config, { dev }) {\n if (!dev) {\n config.... | javascript | chosen |
[
{
"from": "system",
"value": "Add git src at top.\n"
},
{
"from": "human",
"value": "// Copyright 2013, odanielson@github.com\n// MIT-license\n\nvar Norm = function(v) {\n return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n}\n\nvar Normalize = function(v) {\n var norm = Norm(v);\n return [v[... | javascript | chosen |
[
{
"from": "system",
"value": "Add /register route to redirect to users/new\n"
},
{
"from": "human",
"value": "var express = require('express'),\n router = express.Router(),\n bcrypt = require('bcrypt'),\n db = require('../models/db'),\n index = {};\n\nindex.all = function(oauth){\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix canvas chart test missing colors\n"
},
{
"from": "human",
"value": "import expect from 'expect';\nimport I from 'immutable';\n\nimport {Note} from '../../../../../reducers/chart';\nimport {NOTE_HEIGHT} from '../..//constants';\n\nimport {\n WIDTH,\n HEIGHT,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Write object data to div element as a JSON string.\n"
},
{
"from": "human",
"value": "function init() {\n test();\n}\n\nfunction test() {\n const divObject = document.getElementById('content');\n\n // create database reference\n const dbRefObject = fireb... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug of the last commit\n"
},
{
"from": "human",
"value": "Template.bookmarksList.helpers({\n bookmarks: function() {\n if (Meteor.user()) {\n var searchTags = document.getElementById(\"tagSearch\").value;\n if (searchTags != undef... | javascript | chosen |
[
{
"from": "system",
"value": "Add an action to get family names by class and kingdom\n"
},
{
"from": "human",
"value": "/* global angular */\n\nangular\n .module('speciesApp')\n .factory('SpeciesService', [\n 'API_BASE_URL',\n '$resource',\n SpeciesService\n ])\n\nfunction SpeciesSer... | javascript | chosen |
[
{
"from": "system",
"value": "Change mongodb uri to be an env var.\n\n"
},
{
"from": "human",
"value": "// Main starting point of the application\nconst express = require('express');\nconst path = require('path')\nconst http = require('http');\nconst bodyParser = require('body-parser');\nconst m... | javascript | chosen |
[
{
"from": "system",
"value": "Use absolute path to .env file just in case\n"
},
{
"from": "human",
"value": "require('babel-core/register');\nrequire('dotenv').load();\n\nconst serverConfig = require('./config');\n\n// To ignore webpack custom loaders on server.\nserverConfig.webpackStylesExtens... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.