conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Add toArray to plain sets\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar d = require('d')\n , setPrototypeOf = require('es5-ext/object/set-prototype-of')\n , Set = require('es6-set/polyfill')\n\n , PlainSet;\n\nmodule.exports = Pl... | javascript | chosen |
[
{
"from": "system",
"value": "Add .filter() call on this.props.children\n\nI was encountering a problem, where if a null value was passed as a child to Component, it threw a few errors.\r\nThis .filter() removes all falsey values from this.props.children, preventing the errors, and returning the correct res... | javascript | chosen |
[
{
"from": "system",
"value": "Return project configuration in the polygulp factory method\n"
},
{
"from": "human",
"value": "'use strict';\n\n/* global module, require */\n\nvar customMedia = require(\"postcss-custom-media\");\nvar nested = require('postcss-nested');\nvar autoprefixer = require(... | javascript | chosen |
[
{
"from": "human",
"value": "Add event listener for start button\nAdd a click event listener to the start button that displays a countdown when the start button is clicked\n"
},
{
"from": "gpt",
"value": "// Back-end\n\n// Front-end\n$(document).ready (function() {\n\n $('#start').click(functio... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure ESLint covers all JS unit tests\n"
},
{
"from": "human",
"value": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla... | javascript | chosen |
[
{
"from": "system",
"value": "Fix compiling static error pages\n"
},
{
"from": "human",
"value": "// JS and CSS bundles\n//\n//= link application.js\n//= link application.css\n//= link_tree ../images\n//= link_tree ../html\n"
},
{
"from": "gpt",
"value": "// JS and CSS bundles\n//\n/... | javascript | chosen |
[
{
"from": "system",
"value": "Add Cordova deviceready to Meteor.startup()\n"
},
{
"from": "human",
"value": "var queue = [];\nvar loaded = document.readyState === \"loaded\" ||\n document.readyState == \"complete\";\n\nvar ready = function() {\n loaded = true;\n while (queue.length)\n (que... | javascript | chosen |
[
{
"from": "system",
"value": "Handle errors possibly thrown from .showAlertNotification().\n"
},
{
"from": "human",
"value": "\n// JSM exported symbols\nvar EXPORTED_SYMBOLS = [\"GM_notification\"];\n\nconst alertsServ = Components.classes[\"@mozilla.org/alerts-service;1\"]\n .getService(Comp... | javascript | chosen |
[
{
"from": "system",
"value": "Move all PPL* records to locality\n\nLooking at localadmins vs localities, this is the right choice.\n"
},
{
"from": "human",
"value": "var through2 = require('through2');\n\nfunction featureCodeToLayer(featureCode) {\n switch (featureCode) {\n case 'PCLI':\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove redundant registering of cumulus plugins\n\nThey are already reigstered inside the ./plugins register call\n"
},
{
"from": "human",
"value": "'use strict';\n// Requiring collections-online and loading configuration\nconst co = require('./collections-online');... | javascript | chosen |
[
{
"from": "system",
"value": "Update messaging in the uploader form element\n"
},
{
"from": "human",
"value": "// @flow\nimport * as React from 'react';\nimport { Row, Col } from 'react-bootstrap';\nimport Box from '../../../components/box';\n\nclass Files extends React.PureComponent<any, any> {... | javascript | chosen |
[
{
"from": "system",
"value": "Fix legacy routes & add placeholders\n"
},
{
"from": "human",
"value": "import Vue from 'vue'\nimport Router from 'vue-router'\nimport Resource from 'vue-resource'\nimport Home from '../views/Home'\n\nVue.use(Router)\nVue.use(Resource)\n\nexport default new Router({... | javascript | chosen |
[
{
"from": "system",
"value": "Fix template helper errors for accounts with no payments or donations arrays in their profiles\n"
},
{
"from": "human",
"value": "import { Meteor } from 'meteor/meteor';\nimport { Template } from 'meteor/templating';\n\nimport './receipts.html';\n\nMeteor.subscribe(... | javascript | chosen |
[
{
"from": "system",
"value": "Admin: Fix adding stock products to the order\n\n.toFixed in ensureNumericValue was returning a string instead of an int or a float,\nthat's what was breaking the addition of stock products to the order in admin.\n\nRefs #1431\n"
},
{
"from": "human",
"value": "/**\... | javascript | chosen |
[
{
"from": "system",
"value": "Make logs folder creation smarter\n"
},
{
"from": "human",
"value": "var config = require('./config/config_server');\nvar fs = require('fs');\n\n// external libraries\nvar winston = require('winston');\n\nfs.mkdirSync('./logs');\n\nvar logger = new (winston.Logger)(... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Brick Draw function from game js file, place in Brick js\n"
},
{
"from": "human",
"value": "\nvar Brick = function(x, y){\n this.x = x || 50,\n this.y = y || 50,\n this.height = 20,\n this.width = 80,\n this.colour = \"blue\"\n}\n"
},
{
"from": "... | javascript | chosen |
[
{
"from": "system",
"value": "Remove some no-longer needed console.log()'s\n"
},
{
"from": "human",
"value": "/**\n * The Turnpike router.\n */\nvar Routes = require('routes');\n\nRouter = {};\n\nRouter.routes = function(routes) {\n delete Router.router;\n Router.router = Routes();\n\n Router... | javascript | chosen |
[
{
"from": "system",
"value": "Return early from main fn instead of using conditionals\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar toArray = require('stream-to-array')\nvar Promise = require('bluebird')\n\nmodule.exports = streamToPromise\n\nfunction streamToPromise (stream) {\n var p... | javascript | chosen |
[
{
"from": "system",
"value": "Include the body of what we are parsing when we get an error\n"
},
{
"from": "human",
"value": "\nvar express = require('express')\nvar bodyParser = require('body-parser')\nvar manifestParser = require('./lib/manifest-parser')\nvar app = express()\nvar port = proces... | javascript | chosen |
[
{
"from": "system",
"value": "Enable the new collections UI on stage\n"
},
{
"from": "human",
"value": "import { amoStageCDN } from './lib/shared';\n\nconst staticHost = 'https://addons-amo-cdn.allizom.org';\n\nmodule.exports = {\n staticHost,\n\n CSP: {\n directives: {\n fontSrc: [\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Set registration deadline to 2016-05-16\n"
},
{
"from": "human",
"value": "// Half days, used for discount calculation\nhalfDays = [\"Monday\", \"Saturday\"];\n\n// Early registration deadline\n// May 19th, 2015 PDT (UTC - 7)\n// \"postmarked & paid in full on or be... | javascript | chosen |
[
{
"from": "system",
"value": "Fix query string on the client\n"
},
{
"from": "human",
"value": "const axios = require('axios')\nconst createHistory = require('history').createBrowserHistory\nconst { buildQueryString } = require('../../../src/lib/url-helpers')\n\nconst history = createHistory()\n... | javascript | chosen |
[
{
"from": "system",
"value": "Move client creation/selection to an object to prepare for one day abstracting this.\n"
},
{
"from": "human",
"value": "// #TODO: change the whole `fieldspec` thing to just operate on the schema in place?\n// #TODO: clean up the Base.Schema methods\n// #TODO: chaina... | javascript | chosen |
[
{
"from": "system",
"value": "Support creating build with hashed filenames.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar gulp = require('./parent-gulp');\nvar del = require('del');\n\nvar defineTask = require('./define-task');\nrequire('./browserify-compile');\nrequire('./s... | javascript | chosen |
[
{
"from": "system",
"value": "[Server][Router] Fix missing middleware in instrument delete route declaration.\n"
},
{
"from": "human",
"value": "const express = require('express')\nconst router = express.Router()\n\nconst {Instrument, InstrumentMapping} = require('../../models/index')\nconst {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use 'errors' instead of 'result'\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gonzales = require('gonzales-pe');\nvar linters = [\n require('./linters/space_before_brace')\n];\n\nexports.lint = function (data, path, config) {\n var ast = this.parseA... | javascript | chosen |
[
{
"from": "system",
"value": "Add mime to main module\n"
},
{
"from": "human",
"value": "'use strict';\n\n\n// internal\nvar mixin = require('./mincer/common').mixin;\nvar prop = require('./mincer/common').prop;\n\n\nmodule.exports = {\n VERSION: '0.0.0',\n\n EngineTemplate: require('.... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to client side redirect"
},
{
"from": "human",
"value": "Router.configure({\n layoutTemplate: 'layout',\n notFoundTemplate: 'notFound'\n});\n\n\nRouter.route('/', {name: 'home'});\nRouter.route('/why');\nRouter.route('/how');\n\nRouter.route('/what');\nRout... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused list replaced item\n"
},
{
"from": "human",
"value": "module.exports = function listShortCode (data) {\n return `\n${data.host == undefined ? '' : '<h2>' + data.host + '</h2>'}\n<ol reversed>\n${data.list.map(entry => \n `<li>\n ${entry.re... | javascript | chosen |
[
{
"from": "system",
"value": "Add hotkey info to placeholder text\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport debounce from 'lodash/debounce'\n\nconst searchFor = debounce(term => window.routerHistory.push(`/search/${term}`), 500)\n\nexport default class SearchBox extend... | javascript | chosen |
[
{
"from": "system",
"value": "Remove isModel check as it was introduced in Ember Data 2.12+\n"
},
{
"from": "human",
"value": "/* global requirejs */\n\nimport _find from 'lodash/find';\n\nfunction _hasEmberData() {\n let matchRegex = /^ember-data/i;\n return !!_find(Object.keys(requirejs.entr... | javascript | chosen |
[
{
"from": "system",
"value": "Fix build setting to bundle babel-runtime\n"
},
{
"from": "human",
"value": "'use strict';\nvar gulp = require('gulp'),\n babel = require('gulp-babel'),\n plumber = require('gulp-plumber'),\n shell = require('gulp-shell'),\n source = require('vinyl-sourc... | javascript | chosen |
[
{
"from": "system",
"value": "Use native streams in sitemap\n"
},
{
"from": "human",
"value": "// Collect urls to include in sitemap\n//\n\n'use strict';\n\nconst pumpify = require('pumpify');\nconst through2 = require('through2');\n\n\nmodule.exports = function (N, apiPath) {\n\n N.wire.on(ap... | javascript | chosen |
[
{
"from": "system",
"value": "Update with reference to global nav partial\n"
},
{
"from": "human",
"value": "var _ = require('lodash')\nvar fs = require('fs')\nvar gzip = require('gzip-size')\nvar filesize = require('filesize')\nvar cssstats = require('cssstats')\n\nvar module = require('tachyon... | javascript | chosen |
[
{
"from": "system",
"value": "Change body to qs in params\n"
},
{
"from": "human",
"value": "/**\n * Application\n * @constructor\n * @param {Object} client Catapult client\n */\n\nvar Application = function (client) {\n\t/**\n\t * Get information about the specified applications\n\t * @param {... | javascript | chosen |
[
{
"from": "system",
"value": "Update Live-reload syntax for newer version.\n"
},
{
"from": "human",
"value": "// Load gulp and Plugins\nvar gulp = require('gulp'),\n sass = require('gulp-ruby-sass'),\n autoprefixer = require('gulp-autoprefixer'),\n rename = require('gulp-rename'),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update Gulp Test to run automatically before Gulp Serve runs. If tests fail, Gulp Serve will not run.\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\nvar browserSync = require('browser-sync');\nvar reload = browserSync.reload;\nvar karma = require('k... | javascript | chosen |
[
{
"from": "system",
"value": "Call the function vs return the function\n"
},
{
"from": "human",
"value": "'use strict'\n\nlet Promise = require('bluebird')\nlet Request = Promise.promisify(require('request'))\nlet _ = require('underscore')\nlet VerifyAlexaSignature = require('verify_alexa_signat... | javascript | chosen |
[
{
"from": "system",
"value": "Remove database name from generate-custom-token"
},
{
"from": "human",
"value": "var admin = require(\"firebase-admin\");\n\nvar serviceAccount = require(\"./serviceAccountKey.json\");\nvar databaseName = \"custom-token-rule\";\nadmin.initializeApp({\n credential: ... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure `multi` returns a promise\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Pipeline = require('./pipeline');\nvar utils = require('./utils');\n\nexports.addTransactionSupport = function (redis) {\n redis.pipeline = function () {\n var pipeline =... | javascript | chosen |
[
{
"from": "system",
"value": "Remove default global name from loadClient\n"
},
{
"from": "human",
"value": "/**\n * Treasure Client Loader\n */\n\n// Modules\nvar _ = require('./utils/lodash')\n\n// Helpers\nfunction applyToClient (client, method) {\n var _method = '_' + method\n if (client[_m... | javascript | chosen |
[
{
"from": "system",
"value": "Convert mapstate bounds to mapboxgl-friendly format\n"
},
{
"from": "human",
"value": "import Ember from 'ember'; // eslint-disable-line\nconst DEFAULT_BOUNDS = [[40.690913, -74.077644], [40.856654, -73.832692]];\n\n\nexport default Ember.Service.extend({\n init() ... | javascript | chosen |
[
{
"from": "system",
"value": "Use new AccountCreate component for setup.\n"
},
{
"from": "human",
"value": "/**\n * Analytics common components.\n *\n * Site Kit by Google, Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use thi... | javascript | chosen |
[
{
"from": "system",
"value": "Convert foreign modules to try bundling with esbuild\n"
},
{
"from": "human",
"value": "\"use strict\";\n\n// Alias require to prevent webpack or browserify from actually requiring.\nvar req = typeof module === \"undefined\" ? undefined : module.require;\nvar util =... | javascript | chosen |
[
{
"from": "system",
"value": "Make clicking a song play it."
},
{
"from": "human",
"value": "const songs = [...document.querySelectorAll('.songList li')];\nconst currentSong = document.querySelector('#currentSong');\nsongs.map((s) => {\n s.addEventListener('click', () => {\n currentSong.setA... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for token query-param as fallback\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar authHeader = require('auth-header');\nvar tokenUtils = require('./token');\n\nmodule.exports = function (options) {\n return function (req, res, next) {\n var a... | javascript | chosen |
[
{
"from": "system",
"value": "Change != to !=== in Rule.channelMatches\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = Rule;\n\nfunction Rule(configRule) {\n for (var property in configRule) {\n if (configRule.hasOwnProperty(property)) {\n t... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor API to single-line functions\n"
},
{
"from": "human",
"value": "var pg = require('pg');\n\n\nexports.createSubscription = function(req, res) {\n res.send(JSON.stringify(req));\n/*\n pg.connect(process.env.DATABASE_URL, function(err, client) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use more human-friendly hour strings\n\nStill only 24h clock, but I'll get to am/pm later.\n"
},
{
"from": "human",
"value": "const hours = [];\nfor (let i = 0; i < 24; i++) {\n hours.push(i);\n}\n\nexport default hours;\n"
},
{
"from": "gpt",
"value": ... | javascript | chosen |
[
{
"from": "system",
"value": "Rollback spawn api change. Guess it isn't there yet.\n"
},
{
"from": "human",
"value": "\nvar log = require(\"../utils/log\")\n\nmodule.exports = function exec (cmd, args, env, pipe, cb) {\n if (!cb) cb = pipe, pipe = false\n if (!cb) cb = env, env = process.env\n... | javascript | chosen |
[
{
"from": "system",
"value": "Add key vars to pepper effect\n"
},
{
"from": "human",
"value": "// entry point file\n"
},
{
"from": "gpt",
"value": "// lib\nimport R from 'ramda';\nimport { PerspectiveCamera, Vector3, Quaternion } from 'three';\n\n/**\n * Constructor for peppers ghost... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure data is an exact equal to undefined to treat it as nonexistent\n"
},
{
"from": "human",
"value": "'use strict';\n\nclass Keyv {\n\tconstructor(opts) {\n\t\tthis.opts = opts || {};\n\t\tthis.opts.store = this.opts.store || new Map();\n\t}\n\n\tget(key) {\n\... | javascript | chosen |
[
{
"from": "system",
"value": "Print a null-symbol for unset shortcuts\n"
},
{
"from": "human",
"value": "import {\n SHIFT,\n ALT,\n CONTROL,\n CTRL,\n META,\n} from './constants';\n\nconst isKeyModifier = m =>\n m === CONTROL || m === ALT || m === META || m === CTRL || m === SHIFT;\n\n// R... | javascript | chosen |
[
{
"from": "system",
"value": "Fix indentation in js tests\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar assert = require('assert');\n\ndescribe('Note', function () {\n\n var Note = require('../models/note')\n\n describe('model', function () {\n var Project = require('../models/p... | javascript | chosen |
[
{
"from": "system",
"value": "Implement behavior for a non-existent file\n"
},
{
"from": "human",
"value": "#! /usr/bin/env node\n\nconst {stdout, stderr, exit, argv} = process;\n\nconst mv = require('mv');\n\nconst flags = require('minimist')(argv.slice(2));\nconst files = flags._;\n\nif (flags... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typ0 in calling .preventDefault() on prevented file upload\n"
},
{
"from": "human",
"value": "GLClient.controller('WBFileUploadCtrl', ['$scope', function($scope) {\n $scope.disabled = false;\n\n $scope.onFileAdded = function($event, $file, $flow) {\n if ($f... | javascript | chosen |
[
{
"from": "system",
"value": "Allow for protractor to run when self signed cert is in use with ssl\n\nChange-Id: I66ff79370ddac771edce45089fb11976173316f8\n"
},
{
"from": "human",
"value": "require('ts-node/register');\nvar helpers = require('./helpers');\n\nexports.config = {\n baseUrl: 'http:... | javascript | chosen |
[
{
"from": "system",
"value": "Modify export of FileIcons singleton\n"
},
{
"from": "human",
"value": "'use babel';\n\nimport fs from 'fs-plus';\nimport path from 'path';\n\nclass FileIcons {\n constructor() {\n this.service = null;\n }\n\n setService(service) {\n this.service = service;... | javascript | chosen |
[
{
"from": "system",
"value": "Fix stylint on first render.\n"
},
{
"from": "human",
"value": "// @flow\nimport React from 'react'\nimport Document, {Head, Main, NextScript} from 'next/document'\nimport flush from 'styled-jsx/server'\n\ntype ctx = {\n renderPage: () => {\n head: Object,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Create markdown file from terminal\n"
},
{
"from": "human",
"value": "var gulp = require('gulp');\n"
},
{
"from": "gpt",
"value": "var gulp = require('gulp'),\n prompt = require('gulp-prompt'),\n rename = require('gulp-rename'),\n file = req... | javascript | chosen |
[
{
"from": "system",
"value": "Move logout button to Settings page and add slight layout adjustment\n"
},
{
"from": "human",
"value": "import * as togglActions from '../../actions/toggl';\nimport React, { Component } from 'react';\nimport Toggl from './Toggl';\nimport { connect } from 'react-redu... | javascript | chosen |
[
{
"from": "system",
"value": "Add whitespace at end of classname strings in order to separate color classes\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\n\nimport colorByCharacter from '~/constants/colorByCharacter';\n\nfunction WordCard(props) {\n const { word, ... | javascript | chosen |
[
{
"from": "system",
"value": "prettier: Disable embedded language formatting for Markdown.\n\nSigned-off-by: Anders Kaseorg <dfdb7392591db597bc41cf266a9c3bc12a2706e5@zulip.com>\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = {\n bracketSpacing: false,\n trailingComma... | javascript | chosen |
[
{
"from": "system",
"value": "Add some feedback to theGitGo\n"
},
{
"from": "human",
"value": "'use strict'\n\nmodule.exports = {\n global: {\n timeLimit: Infinity\n },\n\n machine: {\n startState: 'done',\n done: null\n },\n\n viewer: {\n title: 'Getti... | javascript | chosen |
[
{
"from": "system",
"value": "Put back code that does not reset the front-end if the server goes down, but only on development environments\n"
},
{
"from": "human",
"value": "'use strict';\n\nwindow.ss = require('socketstream')\n\nss.server.on('ready', function () {\n $(function () {\n requi... | javascript | chosen |
[
{
"from": "system",
"value": "Add environment output on application boot.\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n // Initialise RequireJS module loader\n require.config({\n urlArgs: 'm=' + (new Date()).getTime(),\n baseUrl: '/app/',\n p... | javascript | chosen |
[
{
"from": "system",
"value": "Remove '_id' from expected and get rid of slice\n\nNot sure why we init the array to contain '_id' and then remove it?\nAnyway as 'steps' was added to the array the slice index was wrong\ncausing an issue. So I have removed '_id' from the array.\n"
},
{
"from": "human",... | javascript | chosen |
[
{
"from": "system",
"value": "Add a sidebar story with a filled out explorer\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nimport Sidebar from './Sidebar';\nimport * as SidebarHeadingStories from './SidebarHeading.stories';\nimport * as NotificationsListStories from './Notific... | javascript | chosen |
[
{
"from": "system",
"value": "Add email to send objects during registration\n"
},
{
"from": "human",
"value": "'use strict';\n\n\nexport default class UserService {\n\n static get $inject(){\n return ['$http', '$window','API_URL'];\n }\n\n constructor($http,$window,API_URL) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add console message telling user on which port the app will served\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\nvar path = require('path');\n\nvar port = 8080;\n\napp.use(express.static(__dirname + '/client'));\n\n// vi... | javascript | chosen |
[
{
"from": "system",
"value": "Remove tr after approving/rejecting accounts\n"
},
{
"from": "human",
"value": "var approves = document.querySelectorAll(\".approve\");\nfor (var i = 0; i < approves.length; i++) {\n approves[i].addEventListener(\"click\", function(e) {\n e.preventDefault(... | javascript | chosen |
[
{
"from": "system",
"value": "Make label in hovers unified\n"
},
{
"from": "human",
"value": "define([\n 'vehicle-licensing/collections/services',\n 'extensions/views/timeseries-graph/timeseries-graph',\n 'extensions/views/tabs',\n 'extensions/views/graph/headline',\n],\n function (Services... | javascript | chosen |
[
{
"from": "system",
"value": "Remove test code. Ready for prod\n"
},
{
"from": "human",
"value": "var helpful_yes = document.querySelector( '.helpful_yes' );\nvar helpful_no = document.querySelector( '.helpful_no' );\nvar helpful_text = document.querySelector( '.helpful__question' );\n\nfunction... | javascript | chosen |
[
{
"from": "system",
"value": "Improve integration of websocket upgrades and express.js\n"
},
{
"from": "human",
"value": "var http = require('http');\nvar url = require('url');\n\nvar ServerResponse = http.ServerResponse;\nvar WebSocketServer = require('ws').Server;\n\nvar wsHandledPath = functi... | javascript | chosen |
[
{
"from": "system",
"value": "Make webpack compilation (a little) faster\n"
},
{
"from": "human",
"value": "var path = require('path');\nvar webpack = require('webpack');\n\nvar gulp = require('gulp');\nvar gutil = require('gulp-util');;\n\nvar config = {\n entry: [\n // Set up an ES6-ish en... | javascript | chosen |
[
{
"from": "system",
"value": "Remove print styles fix for Windows Safari\n\nThe print styles no longer include the New\nTransport font so this fix isn't required.\n\nSee this commit for details:\n\nhttps://github.com/alphagov/govuk_frontend_toolkit/commit/55b7ac72ebe5a0057285cebd5ab48511be3facb4\n"
},
{... | javascript | chosen |
[
{
"from": "system",
"value": "Test ´wordbreakerRussian´: fix code style\n"
},
{
"from": "human",
"value": "'use strict'\n\nimport chai from 'chai'\nimport wordbreakerRussian from '@/wordbreaker-russian/index'\n\ndescribe(\n 'wordbreakerRussian', () => {\n it(\n 'Это функция'... | javascript | chosen |
[
{
"from": "system",
"value": "Return array as score value for build list\n"
},
{
"from": "human",
"value": "define(['utils/sortArray'], function(sortArray) {\n 'use strict';\n\n return function sortBuildList(arr) {\n function getBuildScore(object) {\n return new Date(object.dateCreated... | javascript | chosen |
[
{
"from": "system",
"value": "Allow to plug another implementation of scope() on top of scope bootstrap\n"
},
{
"from": "human",
"value": "// Static synchronous definition in global context\n// Implementation of scopeornot API\n// https://github.com/eric-brechemier/scopeornot\n\n/*\n Function: ... | javascript | chosen |
[
{
"from": "system",
"value": "Add spaces around === to clarify intent\n"
},
{
"from": "human",
"value": "// Static synchronous definition in global context\n// Implementation of scopeornot API\n// https://github.com/eric-brechemier/scopeornot\n\n/*\n Function: scope(code,needs,name)\n Run code... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug if number is null\n"
},
{
"from": "human",
"value": "export const formatNumber = (number = 0, settings) => {\n const x = 3;\n\n const re = '\\\\d(?=(\\\\d{' + x + '})+' + (settings.decimal_number > 0\n ? '\\\\D'\n : '$') + ')';\n\n let num = number.... | javascript | chosen |
[
{
"from": "system",
"value": "Remove pass and fail assertion templates for Tape.\n"
},
{
"from": "human",
"value": "// UTILITY TEMPLATES\nvar tempRequire = \"var {{=it.varName}} = require('{{=it.module}}');\";\n\n// BASE TEMPLATE FOR TESTS (deliberately missing ending syntax - closed in util fx)... | javascript | chosen |
[
{
"from": "system",
"value": "Add test to make sure the render callback is called, even if a custom render callback returned false to not execute IAS default render code.\n"
},
{
"from": "human",
"value": "describe(\"IAS\", function () {\n before(function() {\n this.timeout = 10000;\n\n w... | javascript | chosen |
[
{
"from": "system",
"value": "Change api for better semantics\n"
},
{
"from": "human",
"value": "class SimpleTest {\n constructor() {\n this.passed = 0;\n this.failed = 0;\n this.total = 0;\n }\n\n assert(condition, label = 'Unknown') {\n this.total++;\n if (!condition) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove unused lodash.find reference in duplicateProperty\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar find = require('lodash.find');\nvar path = require('path');\n\nmodule.exports = function (options) {\n var filename = path.basename(options.path);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Make the throttle time configurable\n"
},
{
"from": "human",
"value": "import { get } from '@ember/object';\nimport RSVP from 'rsvp';\nimport { task } from 'ember-concurrency';\nimport wait from 'nomad-ui/utils/wait';\n\nexport function watchRecord(modelName) {\n r... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug: heroku quote for VSB is 0\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst request = require('request');\nconst { makeUrl } = require('../utils');\n\n/**\n * GET /api\n * List of API examples.\n */\nexports.getApi = (req, res) => {\n res.render('a... | javascript | chosen |
[
{
"from": "system",
"value": "Rework fields for new config changes\n"
},
{
"from": "human",
"value": "/*jslint browser: true, undef: true *//*global Ext*/\nExt.define('Jarvus.ace.field.KeyboardHandlerComboBox', {\n extend: 'Jarvus.ace.field.AceOptionComboBox',\n xtype: 'jarvus-ace-field-ke... | javascript | chosen |
[
{
"from": "system",
"value": "Switch props to data, as they aren't passed in\n\n"
},
{
"from": "human",
"value": "Vue.component('spark-kiosk-notify', {\n props: [\n 'notifications',\n 'users',\n 'createNotification'\n ],\n ready(){\n this.getNotifications();\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix tests: logs needed config before it was created in first launch\n"
},
{
"from": "human",
"value": "'use strict'\n\nconst _ = require('lodash')\n\nconst generateEnv = require('./generateEnv.js')\n\nconst features = {\n config: require('./config'),\n env: requir... | javascript | chosen |
[
{
"from": "system",
"value": "Fix dbl click firing single click evt\n"
},
{
"from": "human",
"value": "const elements = document.querySelectorAll('bracket-less');\n\nfunction expandBrackets() {\n this.innerHTML = this.dataset.bracketless;\n this.classList.toggle('bracket-less');\n}\nfunction c... | javascript | chosen |
[
{
"from": "system",
"value": "Fix `npm run-script example` compilation.\n\nnpm run-scripts are always run from the root.\nwebpack does not resolve paths relative to the config but instead from the cwd.\n\nAs a result the npm run-script will always fail.\n\nThe simple fix for this is to include __dirname in ... | javascript | chosen |
[
{
"from": "system",
"value": "Make page 1024px wide so table fits comfortably\n"
},
{
"from": "human",
"value": "export default {\n sideMargin: '4rem',\n pageWidth: '960px'\n};\n"
},
{
"from": "gpt",
"value": "export default {\n sideMargin: '4rem',\n pageWidth: '1024px'\n};\n"
... | javascript | chosen |
[
{
"from": "system",
"value": "Replace native method with a polyfill\n"
},
{
"from": "human",
"value": "/**\n * Filters the passed value and returns `undefined` if either:\n * – An [array] or an {object} is empty.\n * – `null` has been passed.\n * – `NaN` has been passed.\n *\n * @flow\n * @param... | javascript | chosen |
[
{
"from": "system",
"value": "Change order of PostCSS plugins to fix build error\n"
},
{
"from": "human",
"value": "import lost from 'lost'\nimport postcssImport from 'postcss-import'\nimport postcssCssnext from 'postcss-cssnext'\nimport resolveStyleImport from '../util/resolveStyleImport'\n\nex... | javascript | chosen |
[
{
"from": "system",
"value": "Add a non-breaking space in front of name\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport ExperienceList from \"../components/ExperienceList\";\nimport ProjectsList from \"../components/ProjectsList\";\nimport OssList from \"../components/Os... | javascript | chosen |
[
{
"from": "system",
"value": "Disable gray for foreground on BW devices"
},
{
"from": "human",
"value": "module.exports = [\n { \n \"type\": \"heading\", \n \"defaultValue\": \"Preferences\" ,\n \"size\": 3\n }, \n { \n \"type\": \"section\",\n \"items... | javascript | chosen |
[
{
"from": "system",
"value": "Move \"action\" field into \"data\" field\n"
},
{
"from": "human",
"value": "'use strict';\n\n/**\n\nGCM helper\n----------\n\nUsage:\nlet push = require('./helpers/push')('/messages');\npush.send('create', message);\n\n*/\n\nlet gcm = require('node-gcm');\nlet conf... | javascript | chosen |
[
{
"from": "system",
"value": "Mark areas outdated when no synced\n"
},
{
"from": "human",
"value": "// @flow\nimport type { State } from 'types/store.types';\n\nimport { connect } from 'react-redux';\nimport { bindActionCreators } from 'redux';\nimport Dashboard from 'components/dashboard';\nimp... | javascript | chosen |
[
{
"from": "system",
"value": "Allow ember-data to work when `host` is not defined\n\nThis uses the headers/request from express to figure out where to make\nthe najax request to.\n"
},
{
"from": "human",
"value": "/* globals najax */\n\nvar nodeAjax = function(options) {\n najax(options);\n};\n... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.