conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix bound value for week of\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport moment from 'moment';\nimport layout from '../templates/components/ilios-calendar-week';\n\nconst {computed, run} = Ember;\n\nexport default Ember.Component.extend({\n ...
javascript
chosen
[ { "from": "system", "value": "Include Aspell JavaScript in initial load to save extra request\n" }, { "from": "human", "value": "//= requires \"editor\"\n\n/*\n * Includes the Aspell plugin (kindly ported from FCKeditor by Christian\n * Boisjoli) which provides spell checking without relying on ...
javascript
chosen
[ { "from": "system", "value": "Delete init vertices from the polygon entity.\n" }, { "from": "human", "value": "define(\n [\n 'polygonjs/Entity',\n 'polygonjs/geom/Vector3'\n ],\n function (Entity, Vector3) {\n\n \"use strict\";\n\n var Polygon = function (opt...
javascript
chosen
[ { "from": "system", "value": "Fix bug in how events are unloaded\n" }, { "from": "human", "value": "'use strict';\n\nvar glimpse = require('glimpse');\n\nmodule.exports = {\n addListener: function (event, listener) {\n if (!this.events) {\n this.events = {};\n }\n\n ...
javascript
chosen
[ { "from": "system", "value": "Remove old style parsing implementation\n" }, { "from": "human", "value": "const { map, isFunction } = require(\"lodash/fp\");\nconst { hasOwn } = require(\"../util\");\n\nconst transformAttrKey = require(\"./transform-attr-key\");\nconst { renderStyleAttribute } = ...
javascript
chosen
[ { "from": "system", "value": "Use new options for dummy/docs app\n" }, { "from": "human", "value": "/*jshint node:true*/\n/* global require, module */\nvar EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function(defaults) {\n var app = new EmberAddon(defaults, {...
javascript
chosen
[ { "from": "system", "value": "Remove crypto config from packagerOptions options to fix CI\n" }, { "from": "human", "value": "'use strict';\n\nconst EmberAddon = require('ember-cli/lib/broccoli/ember-addon');\n\nmodule.exports = function (defaults) {\n const self = defaults.project.findAddonByNa...
javascript
chosen
[ { "from": "system", "value": "Fix header shifting to also shift closing tags\n\nCloses #55\n" }, { "from": "human", "value": "var fs = require(\"fs\")\nvar markdown = (require(\"markdown-it\")({html: true})).use(require(\"markdown-it-deflist\"))\nvar Mold = require(\"mold-template\")\n\nmodule.e...
javascript
chosen
[ { "from": "system", "value": "Improve CLI test mocking using sinon\n" }, { "from": "human", "value": "/**\n* Copyright 2012 Microsoft Corporation\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may...
javascript
chosen
[ { "from": "system", "value": "Fix TS to not be parsed as TSX\n" }, { "from": "human", "value": "const konan = require(\"konan\");\nconst path = require(\"path\");\nconst localRequire = lib => {\n return require(require(\"path\").join(\n process.env.PROJECTPATH,\n \"node_modules\",\n li...
javascript
chosen
[ { "from": "system", "value": "[examples] Add an example of sending a handled error\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport bugsnag, { Client } from 'bugsnag-react-native';\nimport {\n AppRegistry,\n StyleSheet,\n Text,\n View\n} from 'react-native...
javascript
chosen
[ { "from": "system", "value": "Make it an ES6 class and remove usage of self." }, { "from": "human", "value": "function KeyPressEmulation(keyboardEventUtil, sinon) {\n this._keyDownListeners = [];\n this._keyUpListeners = [];\n var self = this;\n sinon.stub(keyboardEventUtil, 'addKeyDownListe...
javascript
chosen
[ { "from": "system", "value": "Correct CSS class for forum view\n" }, { "from": "human", "value": "/*\n Copyright 2018 Carmilla Mina Jankovic\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a...
javascript
chosen
[ { "from": "system", "value": "Fix slick gallery buttons in Chrome\n\nKB-459\n" }, { "from": "human", "value": "$(function(){\n const GALLERY_SLICK_SELECTOR = '.gallery--slick';\n\n $(GALLERY_SLICK_SELECTOR).slick({\n infinite: false,\n dots: true,\n speed: 600,\n slidesToShow: 4,\n...
javascript
chosen
[ { "from": "system", "value": "Use includes instead of endsWith (due to query parameters)\n" }, { "from": "human", "value": "$(document).on('turbolinks:load', function(event) {\n\n //Merge all editor components.\n $.extend(\n CodeOceanEditor,\n CodeOceanEditorAJAX,\n CodeOceanEdi...
javascript
chosen
[ { "from": "system", "value": "Add Mesh collision filter property.\n" }, { "from": "human", "value": "'use strict';\n\nvar _ = require( '../utils' );\nvar Object3D = require( '../object3d' );\n\nfunction Mesh( geometry, material ) {\n Object3D.call( this );\n\n this.geometry = geometry;\n this...
javascript
chosen
[ { "from": "system", "value": "Use karma.Server instead of karma.server\n" }, { "from": "human", "value": "'use strict';\n\nvar path = require('path');\nvar gulp = require('gulp');\n\nvar karma = require('karma');\n\nfunction runTests(singleRun, done) {\n karma.server.start({\n configFile: pa...
javascript
chosen
[ { "from": "system", "value": "IMCMS-290: Add a \"pin\" icon to imCMS's panel:\n- Refactored displacing array.\n" }, { "from": "human", "value": "/**\n * Array with fixed max length and displacing first element on oversize.\n *\n * @author Serhii Maksymchuk from Ubrainians for imCode\n * 10.05.18...
javascript
chosen
[ { "from": "system", "value": "Fix galeginho si todo va bien" }, { "from": "human", "value": "module.exports = (client) => {\n var regex = require(\"./regexp\");\n var galeguinhos = 0;\n client.on('message', message => { \n if (regex.regexSiNo.test(message.content)) {\n let response = ...
javascript
chosen
[ { "from": "system", "value": "Fix JSHint issue with requirejs & require.\n" }, { "from": "human", "value": "function registerComponents(container) {\n var seen = requirejs._eak_seen;\n var templates = seen, match;\n if (!templates) { return; }\n\n for (var prop in templates) {\n if (match...
javascript
chosen
[ { "from": "system", "value": "Fix link un approbation alert email\n" }, { "from": "human", "value": "'use strict';\n\n\nconst util = require('util');\nconst Mail = require('../mail');\n\n/**\n * Notification for admin about the approval list\n *\n * @param {Object} app Express\n * @param {R...
javascript
chosen
[ { "from": "system", "value": "Add yearless date as an acceptable format for moment parsing\n\nCloses #2331\n" }, { "from": "human", "value": "/* global moment */\nvar parseDateFormats = ['DD MMM YY @ HH:mm', 'DD MMM YY HH:mm',\n 'DD MMM YYYY @ HH:mm', 'DD MMM YYYY HH:mm',\...
javascript
chosen
[ { "from": "system", "value": "Fix side effect warning when building\n\n" }, { "from": "human", "value": "export const omit = (obj, arr) => Object.keys(obj).reduce((res, key) => {\n if (arr.indexOf(key) === -1) {\n res[key] = obj[key]\n }\n\n return res\n}, {})\n" }, { "from": "gpt"...
javascript
chosen
[ { "from": "system", "value": "Fix error message for array-like validation\n" }, { "from": "human", "value": "'use strict';\n\nvar isArrayLike = require('./is-array-like');\n\nmodule.exports = function (obj) {\n\tif (isArrayLike(obj)) return obj;\n\tthrow new TypeError(obj + \" is not array-like ...
javascript
chosen
[ { "from": "system", "value": "Fix identity provider middleaware - always return an error if tenantId is not\nprovided. Also use httpUtil.returnError.\n" }, { "from": "human", "value": "/**\n * Copyright 2012 Tomaz Muraus\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");...
javascript
chosen
[ { "from": "system", "value": "[lib] Use hook instead of connect function in MessageHandler\n\nTest Plan: Checked if onMessage still fired and worked correcly on web and native\n\nReviewers: palys-swm, ashoat, atul\n\nReviewed By: ashoat\n\nSubscribers: ashoat, KatPo, zrebcu411, Adrian, atul\n\nDifferential ...
javascript
chosen
[ { "from": "system", "value": "Prepare to retrive info for submit to server\n" }, { "from": "human", "value": "/**\n * Created by mark on 7/1/16.\n */\n\n/* Counter */\ncounter = function () {\n var value = $('#textArea').val();\n\n if (value.length == 0) {\n $('#wordCount').html(0);...
javascript
chosen
[ { "from": "system", "value": "Sort results so they group properly\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n var app = angular.module('radar.patients.results');\n\n app.factory('groupResults', ['_', function(_) {\n return function groupResults(results) {\n va...
javascript
chosen
[ { "from": "system", "value": "Remove inline opacity style after transition complete\n(This was causing the raw tag editor to sometimes *not* display\n for fallback presets like \"point\", \"line\", \"area\")\n" }, { "from": "human", "value": "// toggles the visibility of ui elements, using a com...
javascript
chosen
[ { "from": "system", "value": "Remove unused API service functions\n" }, { "from": "human", "value": "function ApiService($http) {\n \n return {\n\n getPages: function() {\n return $http.get('/api/pages');\n },\n\n search: function(id, q) {\n retur...
javascript
chosen
[ { "from": "system", "value": "Copy facebook image on deployment\n" }, { "from": "human", "value": "var webpack = require('webpack');\nvar path = require('path');\n\nvar HtmlWebpackPlugin = require('html-webpack-plugin');\nvar CopyWebpackPlugin = require('copy-webpack-plugin');\n\nvar BUILD_DIR =...
javascript
chosen
[ { "from": "system", "value": "Fix incorrect test entry dependencies\n" }, { "from": "human", "value": "const glob = require('glob');\nconst path = require('path');\n\nmodule.exports = {\n entry: {\n 'index': './src/index.js',\n 'test': ['babel-polyfill', ...glob.sync('./test/*-test.js')],...
javascript
chosen
[ { "from": "system", "value": "Add DOM monitoring to update selected on new item additions\n" }, { "from": "human", "value": "import { inject, bindable, bindingMode, containerless } from 'aurelia-framework';\n\n@inject(Element)\nexport class UiDropdownCustomElement {\n @bindable({ defaultBindi...
javascript
chosen
[ { "from": "system", "value": "Use the postcss preset for our own internal use too\n" }, { "from": "human", "value": "// https://github.com/michael-ciniawsky/postcss-load-config\n\nconst path = require('path');\n\nmodule.exports = {\n plugins: {\n 'postcss-import': { path: ['packages/css/src'...
javascript
chosen
[ { "from": "system", "value": "Use let instead of var\n" }, { "from": "human", "value": "/**\n * Validate IMEI number.\n * The core logic is copied from https://github.com/madeinstefano/imei-validator/blob/gh-pages/imei.js\n *\n * @param value\n * @returns {Boolean}\n */\nconst validate = value =...
javascript
chosen
[ { "from": "system", "value": "Fix a bug with the hardcoded location for the name search API\n\n- Implemented getHostLocation() in appConfig.js\n" }, { "from": "human", "value": "(function($, window, _, undefined){\n\t\n\t$(function() {\n\t\tjQuery.extend(jQuery.validator.messages, {\n\t\t\trequi...
javascript
chosen
[ { "from": "system", "value": "Disable creating image for now\n" }, { "from": "human", "value": "var _ = require('underscore'),\n fs = require('fs'),\n path = require('path'),\n buildImage = require('./docker_build_image').buildImage,\n dockerImages = require('../docker_config/image_list.json...
javascript
chosen
[ { "from": "system", "value": "[Test] Add test for add route with name\n" }, { "from": "human", "value": "/**\n * This file is part of the Koater lib.\n *\n * (c) Irwin Lourtet <dev@lourtet.fr>\n *\n * For the full copyright and license information, please view\n * the LICENSE file distributed wi...
javascript
chosen
[ { "from": "system", "value": "Add 1 minute caching to Commerce news feed\n" }, { "from": "human", "value": "import xml2js from 'xml2js';\nimport goodGuyHttp from 'good-guy-http';\n\nconst goodGuy = goodGuyHttp();\nconst parseString = xml2js.parseString;\n\n// Commerce Media Releases from the 'An...
javascript
chosen
[ { "from": "system", "value": "Update Redux DevTools Extension reference\n" }, { "from": "human", "value": "import { createStore, combineReducers } from \"redux\";\nimport { welcome } from \"src/modules/welcome/reducer\";\n\nconst rootReducer = combineReducers({\n welcome\n // additional reduce...
javascript
chosen
[ { "from": "system", "value": "Use varint instead of uint8 for bloom filter data length\n" }, { "from": "human", "value": "'use strict';\n\nvar bitcore = require('bitcore');\nvar BloomFilter = require('bloom-filter');\nvar BufferReader = bitcore.encoding.BufferReader;\nvar BufferWriter = bitcore....
javascript
chosen
[ { "from": "system", "value": "[+] Add example use to Disney Couchbase Channel doc\n" }, { "from": "human", "value": "const CouchbaseChannel = require('./couchbaseChannel');\n\nclass CouchbaseChannelDisney extends CouchbaseChannel {\n constructor(options = {}) {\n options.url = options.url ||...
javascript
chosen
[ { "from": "system", "value": "Remove TODO comment for scrollTo\n" }, { "from": "human", "value": "$(function() {\n $('#add_story').click(function() {\n window.Project.stories.add([{\n title: \"New story\", events: [], editing: true\n }]);\n\n // TODO - This needs some improvement,...
javascript
chosen
[ { "from": "system", "value": "Add 'This' to beginning of /fakesloth\n" }, { "from": "human", "value": "import jf from 'jsonfile';\nimport path from 'path';\nimport util from 'util';\n\nexport default wulu;\n\nlet version = jf.readFileSync(path.join(__dirname, '../../../package.json')).version;\n...
javascript
chosen
[ { "from": "system", "value": "Remove unused code that breaks the file\n\ncannot use `storage` without adding it as a dependency\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('emission.main.cci-about', ['emission.plugin.logger'])\n\n.controller('CCIAboutCtrl', function($scope...
javascript
chosen
[ { "from": "system", "value": "Hide links for adding new content from the sidebar\n" }, { "from": "human", "value": "( function ( mw, $ ) {\n\n // For some odd reason, these had fixed min-style:600px\n // That sucks. Removing it (they're handled at HitchwikiVector/resources/styles/forms.less in...
javascript
chosen
[ { "from": "system", "value": "Add initial support for auto-fitting projections.\n" }, { "from": "human", "value": "import {Transform} from 'vega-dataflow';\nimport {error, inherits, isFunction} from 'vega-util';\nimport {projection, properties} from './projections';\n\n/**\n * Maintains a cartog...
javascript
chosen
[ { "from": "system", "value": "Destroy panel in QuickFixView destroy()\n" }, { "from": "human", "value": "\"use babel\";\n\nconst SelectListView = require('atom-space-pen-views').SelectListView;\nconst Emitter = require('atom').Emitter;\n\nmodule.exports =\nclass QuickFixView extends SelectListVi...
javascript
chosen
[ { "from": "system", "value": "Update checkout zone script to unlock entities if they are locked before leaving\n" }, { "from": "human", "value": "//\n// shopZone.js\n//\n// Created by Thijs Wenker on 10/20/17.\n// Copyright 2017 High Fidelity, Inc.\n//\n// Distributed under the Apache Licens...
javascript
chosen
[ { "from": "system", "value": "Allow multiple path separators in templates.\n" }, { "from": "human", "value": "var fs = require('fs');\nvar path = require('path');\n\nCli = (function() {\n\n var CliObject = function(params) {\n this.args = params.args;\n };\n\n CliObject.prototype.parseComm...
javascript
chosen
[ { "from": "system", "value": "Fix how caller file was identified so that now uses stack knowledge\n" }, { "from": "human", "value": "module.exports = new Wog;\n\n// converts arguments to a string\nfunction _argsToString () {\n var argArray = Array.prototype.slice.call(arguments);\n return ...
javascript
chosen
[ { "from": "system", "value": "Test that it initializes aliens\n" }, { "from": "human", "value": "\"use strict\";\nconst chai = require('chai');\nconst assert = chai.assert;\nconst ST = require('../lib/spacetime');\nconst $ = require('jquery');\n\ndescribe('spaceTime functionality', fu...
javascript
chosen
[ { "from": "system", "value": "Add prefixes for Android >= 4.0\n" }, { "from": "human", "value": "const options = require('./options');\nconst autoprefixer = require('autoprefixer');\n\nmodule.exports = {\n resolve: {\n modules: [\n options.paths.root,\n options.pa...
javascript
chosen
[ { "from": "system", "value": "Add additional test aliases to verify that '/' prefixing is not required.\n" }, { "from": "human", "value": "module.exports = {\n /**\n * We specify aliases in the format 'alias path':'map path'.\n * Currently, aliases apply to /all/ matching verbs for th...
javascript
chosen
[ { "from": "system", "value": "Increment port number with each execution\n" }, { "from": "human", "value": "var RSVP = require('rsvp');\nvar request = RSVP.denodeify(require('request'));\nvar jsdom = require(\"jsdom\").jsdom;\nvar express = require('express');\nvar FastBootServer = require('...
javascript
chosen
[ { "from": "system", "value": "Include format when constructing moment.js object\n\nConstructing a new instance of `moment` without a format string will\ncause a deprecation warning:\n\n```\nDeprecation warning: moment construction falls back to js Date. This\nis discouraged and will be removed in upcoming m...
javascript
chosen
[ { "from": "system", "value": "Add a debugger trigger shortcut to debug plugin\n" }, { "from": "human", "value": "enabled(){\n this.isDebugging = false;\n \n this.onKeyDown = (e) => {\n // ==========================\n // F4 key - toggle debug mode\n // ==========================\n ...
javascript
chosen
[ { "from": "system", "value": "Allow Accounts.config to be called multiple times\n" }, { "from": "human", "value": "import { TestMongo } from './testMongo'\nimport { MockApiRegistry } from './apiRegistry'\n\n\nexport default () => {\n const {\n Meteor,\n SimpleSchema,\n Random,\n Acc...
javascript
chosen
[ { "from": "system", "value": "Fix 'Strings must use doublequote' issue\n" }, { "from": "human", "value": "/**\n * Trick to avoid a webpack issue\n *\n * https://github.com/webpack/webpack/issues/706\n */\n\nconst replace = require(\"replace-in-file\");\n\n// fix build/fatina.min.js\nreplace({\n ...
javascript
chosen
[ { "from": "system", "value": "Add spinner when remote markdown is loading\n" }, { "from": "human", "value": "import React from 'react';\nimport {fetchMarkdown} from './client.js';\nimport marked from './marked';\nimport externalLinkSetup from './externalLinkSetup.js';\n\nexport default class Abo...
javascript
chosen
[ { "from": "system", "value": "Remove unused reference to scrollView.\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default Ember.Service.extend({\n viewport: null,\n init: function() {\n this._scrollViews = [];\n this.isScrolling = false;\n let viewport = thi...
javascript
chosen
[ { "from": "system", "value": "Add failing tests that document ES 6 generators bug\n" }, { "from": "human", "value": "function* foo() {\n var { bar } = { bar: \"bar\" };\n return bar;\n}\n\nassert.equal(foo().next().value, \"bar\");\n\nfunction* foo2({ bar = 0 }) {\n return bar;\n}\n\nassert.e...
javascript
chosen
[ { "from": "system", "value": "Update Google Analytics tracking code\n" }, { "from": "human", "value": "var _gaq = _gaq || [];\n_gaq.push(['_setAccount', 'UA-23196323-1']);\n_gaq.push(['_setDomainName', '.adoptahydrant.org']);\n_gaq.push(['_trackPageview']);\n\n(function() {\n var ga = document....
javascript
chosen
[ { "from": "system", "value": "Call send confirmation email method.\n" }, { "from": "human", "value": "AutoForm.addHooks('registration-form', {\n onSuccess: function(operation, result, template) {\n // Make sure all reactive vars are up to date.\n resetReactiveVars();\n\n ...
javascript
chosen
[ { "from": "system", "value": "Set hostURL to undefined in test so that it will work with pretender\n\nPretender does not support using host in Adapters, so setting this to\nundefined means the host attribute is not included when the object is\nextended\n" }, { "from": "human", "value": "/* jshin...
javascript
chosen
[ { "from": "system", "value": "Fix browsertesting tests behaving differently on different browsers\n" }, { "from": "human", "value": "describe('admin add contexts', function() {\n it('should add new contexts', function() {\n var deferred = protractor.promise.defer();\n\n browser.setLocatio...
javascript
chosen
[ { "from": "system", "value": "Fix jest warning about tsConfig option capitalization.\n\n ts-jest[config] (WARN) The option `tsConfig` is deprecated and will be\n removed in ts-jest 27, use `tsconfig` instead\n" }, { "from": "human", "value": "const { compilerOptions } = require(\"../tsconfig.j...
javascript
chosen
[ { "from": "system", "value": "Implement unix timestamp part of checkDate\n" }, { "from": "human", "value": "const checkDate = (dateString) => {\n if (isNaN(Date.parse(dateString))) {\n return false;\n }\n return true;\n}\nmodule.exports = checkDate;\n" }, { "from": "gpt", "valu...
javascript
chosen
[ { "from": "system", "value": "Remove another “trick babel” hack in analytics\n\nTest plan\n* with or without the “Drop IE 11” commit applied\n* bin/rspec ./gems/plugins/analytics/spec_canvas/selenium/analytics_spec.rb:250\n Should pass\n\nOr to test manually:\n* apply the “drop ie11” commit in canvas-lms\n...
javascript
chosen
[ { "from": "system", "value": "Modify signup to hit signup api endpoint.\n" }, { "from": "human", "value": "angular.module('MovnThereUI').factory('AuthFactory', function($http, $window, ServerUrl) {\n 'use strict';\n\n var login = function(credentials) {\n\n return $http\n ...
javascript
chosen
[ { "from": "system", "value": "Change babel to stage 1\n" }, { "from": "human", "value": "var path = require('path');\n\nmodule.exports = {\n\tentry: {\n\t\tauth: \"./app/scripts/auth/auth.js\",\n\t\tscraper: \"./app/scripts/scraper/scraper.js\",\n\t\tbackground: \"./app/scripts/background/backgr...
javascript
chosen
[ { "from": "system", "value": "Adjust local storage factory to match Array notation\n" }, { "from": "human", "value": "'use strict';\n\n(function (angular) {\n\n function localStorageServiceFactory($window){\n if($window.localStorage){\n return $window.localStorage;\n }\n throw new...
javascript
chosen
[ { "from": "system", "value": "Change entry into an array to fix some webpack issue\n" }, { "from": "human", "value": "module.exports = {\n entry: './js/app.jsx',\n output: {\n filename: './js/bundle.js'\n },\n devtool: 'source-map',\n module: {\n preLoaders: [\n {test: /\\.jsx?$/...
javascript
chosen
[ { "from": "system", "value": "Add build date on every JS file\n" }, { "from": "human", "value": "/* eslint-disable no-console */\n\nvar webpack = require('webpack');\nconst debug = require('debug')('app:webpack');\n\nvar isDev = process.env.NODE_ENV !== 'production';\ndebug('Running in ' + (isDe...
javascript
chosen
[ { "from": "system", "value": "Load all html files as templates.\n" }, { "from": "human", "value": "module.exports = {\n entry: \"./main.js\",\n output: {\n path: __dirname,\n filename: \"bundle.js\"\n },\n module: {\n loaders: [\n { test: /\\.css$/, loader: \"style!css\" }\n ...
javascript
chosen
[ { "from": "system", "value": "Set git author on Travis\n" }, { "from": "human", "value": "import {exec} from 'node-promise-es6/child-process';\nimport fs from 'node-promise-es6/fs';\n\nasync function run() {\n const {linkDependencies = {}} = await fs.readJson('package.json');\n for (const depe...
javascript
chosen
[ { "from": "system", "value": "Add select2 to long filters as well\n" }, { "from": "human", "value": "\n$(function() {\n\n $('.change-form select').each(function() {\n var $select = $(this)\n if ($select.is('[multiple]')) {\n $select.siblings('.help-inline').addClass('...
javascript
chosen
[ { "from": "system", "value": "Add loader for images so that we can use url() in sass\n" }, { "from": "human", "value": "'use strict'\n\nconst path = require('path')\nconst HtmlWebpackPlugin = require('html-webpack-plugin')\n\nmodule.exports = {\n entry: [\n './src/index'\n ],\n output: {\n...
javascript
chosen
[ { "from": "system", "value": "Remove-diff-signs: Fix alignment in expanded code blocks\n" }, { "from": "human", "value": "// ==UserScript==\n// @name GitHub Remove Diff Signs\n// @version 1.3.0\n// @description A userscript that hides the \"+\" and \"-\" from code diffs\n// @license ...
javascript
chosen
[ { "from": "system", "value": "Make it compatible for Webpack2 (fix the path error)\n" }, { "from": "human", "value": "const webpack = require('webpack')\n\nmodule.exports = {\n entry: {\n 'nativejsx-prototypes': './source/prototypal-helpers/index.js',\n 'nativejsx-prototypes.min': './sour...
javascript
chosen
[ { "from": "system", "value": "Update Quoting controller to use the official q-client package.\n" }, { "from": "human", "value": "// Login Controller\n// ================\n// Handles routing for logging into the pp\n\n'use strict';\n\nlet express = require('express'),\n QuotesControl...
javascript
chosen
[ { "from": "system", "value": "Add ignore unreachable branch in tests\n" }, { "from": "human", "value": "\"use strict\";\n\n// Thrown when the grammar contains an error.\nclass GrammarError {\n constructor(message, location) {\n this.name = \"GrammarError\";\n this.message = message;\n ...
javascript
chosen
[ { "from": "system", "value": "Add comments to slideshow controller.\n" }, { "from": "human", "value": "angular\n .module('app')\n .controller('CarouselDemoCtrl', [\n '$scope',\n 'featureService',\n function($scope, Feature) {\n $scope.homepageInterval = 5000;\n var slides = ...
javascript
chosen
[ { "from": "system", "value": "Change webpack bundle filename and use cache for babel\n" }, { "from": "human", "value": "/*\n/* (c) 2016 Björn Ricks <bjoern.ricks@gmail.com>\n/*\n/* See LICENSE comming with the source of daap.js for details.\n*/\n\nmodule.exports = {\n entry: './src/daap.js',\...
javascript
chosen
[ { "from": "system", "value": "Make webpack not use hot-loader for prod builds\n" }, { "from": "human", "value": "var path = require('path');\nvar webpack = require('webpack');\n\n// If this is set, we want to build in production mode\nconst isProd = process.env.NODE_ENV ? true : false;\n\nconst ...
javascript
chosen
[ { "from": "system", "value": "Simplify region check if a default value needs to be set.\n" }, { "from": "human", "value": "'use strict';\n\nconst preconditions = require('conditional');\nconst promisify = require('./../utils/promisify');\nconst checkNotEmpty = preconditions.checkNotEmpty;\nconst...
javascript
chosen
[ { "from": "system", "value": "Add homeActivities and tableSettings helpers\n" }, { "from": "human", "value": "homeActivitiesData = function () {\n //Get today's date.\n var today = new Date();\n\n // Get an array of activities for this home\n var homeActivities = Activities.find({'activityDa...
javascript
chosen
[ { "from": "system", "value": "Allow to call extensin with click on icon.\n" }, { "from": "human", "value": "(function(self) {\r\n 'use strict';\r\n const optionsUrl = chrome.extension.getURL('index.html');\r\n\r\n const createOrSelectTab = function(url) {\r\n chrome.tabs.query({ ...
javascript
chosen
[ { "from": "system", "value": "[NCL-4584] Add Gradle build type selector to UI\n" }, { "from": "human", "value": "/*\n * JBoss, Home of Professional Open Source.\n * Copyright 2014-2019 Red Hat, Inc., and individual contributors\n * as indicated by the @author tags.\n *\n * Licensed under the Apa...
javascript
chosen
[ { "from": "system", "value": "Add react js framework generator reference\n" }, { "from": "human", "value": "let generateJsFrameworkNone = require('./generateJsFrameworkNone');\n\nasync function generateJsFramework(params) {\n switch (params.jsFramework) {\n case 'react':\n // TODO\n ...
javascript
chosen
[ { "from": "system", "value": "Add tests for wrap method\n" }, { "from": "human", "value": "var testMod1 = {\n handler: function(event, context) {\n if (event.test === 'success') {\n context.succeed('Success');\n } \n if (event.test === 'fail') {\n co...
javascript
chosen
[ { "from": "system", "value": "Use cacheDirectory options to cache Babel build\n" }, { "from": "human", "value": "/* eslint-disable no-var, prefer-template */\nvar webpack = require(\"webpack\");\n\nmodule.exports = function webpackConfig(opts) {\n var env = JSON.stringify(opts.args.production ?...
javascript
chosen
[ { "from": "system", "value": "Change: Include electron module to build of webpack\n\nPull request: #83\nApproved by: MaxMEllon\n" }, { "from": "human", "value": "'use strict';\n\nconst webpack = require('webpack');\nconst path = require('path');\nconst JsonpTemplatePlugin = webpack.JsonpTemplate...
javascript
chosen
[ { "from": "system", "value": "Load .env file at webpack build.\n" }, { "from": "human", "value": "const nodeExternals = require('webpack-node-externals');\n\nmodule.exports = {\n entry: [\n 'babel-polyfill',\n './index.js',\n ],\n target: 'node',\n output: {\n libraryTarget: 'common...
javascript
chosen
[ { "from": "system", "value": "Add Berserk to the Berserk sim test\n" }, { "from": "human", "value": "'use strict';\n\nconst assert = require('./../../assert');\nconst common = require('./../../common');\n\nlet battle;\n\ndescribe('Berserk', function () {\n\tafterEach(function () {\n\t\tbattle.de...
javascript
chosen
[ { "from": "system", "value": "Add reference to the new functions' container to our `window.wmf` object.\n" }, { "from": "human", "value": "var wmf = {}\n\nwmf.editButtons = require('./js/transforms/addEditButtons')\nwmf.compatibility = require('wikimedia-page-library').CompatibilityTransform\nwm...
javascript
chosen
[ { "from": "system", "value": "[FIX] Fix rendering for stories with no icon\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport autobind from 'core-decorators/es/autobind';\nimport MarkdownRenderer from '../../../../lib/react/components/Markd...
javascript
chosen
[ { "from": "system", "value": "Update default position using programmatically notification\n" }, { "from": "human", "value": "import Vue from 'vue'\nimport Notification from './Notification'\nimport NotificationNotice from './NotificationNotice'\n\nimport config from '../../utils/config'\nimport ...
javascript
chosen
[ { "from": "system", "value": "Update code to edit a place, we can move the marker around\n" }, { "from": "human", "value": "//places.js\n\nimport addMap from './mapbox-utils';\nimport getIcon from './edit-place-icon';\n\nlet div = document.querySelector('.map');\nlet map = addMap(div);\n\nlet se...
javascript
chosen
[ { "from": "system", "value": "Add new option a sound\n" }, { "from": "human", "value": "(function (exports) {\n\t'use strict';\n\n\tvar hearingTest = HearingTest;\n\n\tvar app = exports.app = new Vue({\n\t\tel: '#hearing-test-app',\n\t\tdata: {\n\t\t\tisPlaySound: false,\n\t\t\tfrequency: 1000\n...
javascript
chosen