conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Reduce amount of transformations by ~66%\n"
},
{
"from": "human",
"value": "var VOWELS = /[aeiou]+/gi;\nvar WHITE_SPACE = /\\s+/g;\nvar NOTHING = '';\n\nfunction tokenize(str){\n return str.split(WHITE_SPACE);\n}\n\nfunction replace(tokens){\n return tokens.map... | javascript | chosen |
[
{
"from": "system",
"value": "Make tests pass in all browsers (co relies on global Promise)\n"
},
{
"from": "human",
"value": "// let referee = require('referee')\n// let {assert} = referee\n// let {beforeEach, afterEach} = window\n//\n// // assertions counting\n// let expected = 0\n// referee.a... | javascript | chosen |
[
{
"from": "system",
"value": "Use an absolute path to load the db file\n\nThis makes it so that the module can also be used in other node projects even when xkcd-cli is contained within the `node_modules` of the depending package"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar _ = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add content-for hook to add Stripe's checkout.js\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n name: 'ember-cli-stripe'\n};\n"
},
{
"from": "gpt",
"value": "'use strict';\n\nmodule.exports = {\n name: 'ember-cli-stripe',\n \... | javascript | chosen |
[
{
"from": "system",
"value": "Return true if its true\n"
},
{
"from": "human",
"value": "window.onload = action\nvar action = document.pesan.action = login();\n\nfunction login() {\n\tvar nama = document.pesan.nama.value;\n\tvar no-bpjs = document.pesan.no-bpjs.value;\n\tvar name = \"Andre Chris... | javascript | chosen |
[
{
"from": "system",
"value": "Use config property for db.\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = {\n db: 'mongodb://localhost/mean-prod',\n app: {\n name: 'MEAN - A Modern Stack - Production'\n },\n facebook: {\n clientID: 'APP_ID',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix populateByService and make it functional\n"
},
{
"from": "human",
"value": "import { flatten, groupBy, map, omit } from 'lodash';\nimport { plural } from 'pluralize';\n\nexport function populateByService(app, documents, idField, typeField, options) {\n let type... | javascript | chosen |
[
{
"from": "system",
"value": "Add option to preprocess date fields for inline data.\n\nresolve #3\n"
},
{
"from": "human",
"value": "/* Compiled 2015-12-15 09:12:28 */\n\n\"use strict\";angular.module(\"metricsgraphics\",[]).directive(\"chart\",function(){return{link:function(a,b){function c(a){... | javascript | chosen |
[
{
"from": "system",
"value": "Update router to conversation list\n"
},
{
"from": "human",
"value": "import Vue from 'vue'\nimport Router from 'vue-router'\nimport Hello from '@/components/Hello'\n\nVue.use(Router)\n\nexport default new Router({\n routes: [\n {\n path: '/',\n... | javascript | chosen |
[
{
"from": "system",
"value": "Switch back to env variables, troubleshoot with Fleek\n"
},
{
"from": "human",
"value": "let Moralis;\nexport function useMoralis() {\n if (Moralis) return { Moralis };\n // Moralis Initialization\n if (typeof window !== `undefined`) {\n Moralis = require('mor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix comparison for weekly limits\n"
},
{
"from": "human",
"value": "\nexport class Date{\n constructor(day, hour, min){\n this.day = day;\n this.hour = hour;\n this.min = min;\n }\n\n toString(){\n return (\"date: \" + this.day +... | javascript | chosen |
[
{
"from": "system",
"value": "Remove dead code in phantomjs server.\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar system = require(\"system\");\n\nif (system.args.length < 2) {\n\tconsole.log(\"Missing arguments.\");\n\tphantom.exit();\n}\n\nvar server = require(\"webserver\").create... | javascript | chosen |
[
{
"from": "system",
"value": "Add organizations link in navbar\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport { connect } from 'react-redux'\nimport LoginButton from './LoginButton'\nimport LogoutButton from './LogoutButton'\nimport { getIsAuthenticated } fro... | javascript | chosen |
[
{
"from": "system",
"value": "Add to one more file.\n"
},
{
"from": "human",
"value": "var InfiniteComputer = require('./infinite_computer.js');\n\nclass ConstantInfiniteComputer extends InfiniteComputer {\n getTotalScrollableHeight(): number {\n return this.heightData * this.numberOfChildre... | javascript | chosen |
[
{
"from": "system",
"value": "Update again to show voice engine dialog for shortcutkeys\n"
},
{
"from": "human",
"value": "//open command bar\nMousetrap.bindGlobal(['shift+up', 'ctrl+shift+.'], function(e) {\n document.getElementById('light').style.display='block';\n return false;\n});\n\n//cl... | javascript | chosen |
[
{
"from": "system",
"value": "Add additional files to karma setup\n"
},
{
"from": "human",
"value": "/*jslint sloppy: true */\nmodule.exports = function (config) {\n config.set({\n basePath: '../',\n frameworks: ['jasmine'],\n browsers: ['Chrome', 'PhantomJS'],\n autoWatch: true,\n\... | javascript | chosen |
[
{
"from": "system",
"value": "tests: Add Chrome path for Windows\n"
},
{
"from": "human",
"value": "var browserify = require('browserify')\nvar cp = require('child_process')\nvar envify = require('envify/custom')\nvar fs = require('fs')\nvar once = require('once')\nvar path = require('path')\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove http2 usage on browser-sync\n"
},
{
"from": "human",
"value": "// config.js\n\nvar http2 = require('http2');\nvar path = require('./path');\n\nmodule.exports = {\n\ttask: {\n\t\twatch: {\n\t\t\texclude: /\\.map$/\n\t\t}\n\t},\n\n\tplugin: {\n\t\tpug: {\n\t\t\... | javascript | chosen |
[
{
"from": "system",
"value": "Fix spelling error in API key creation modal\n\n"
},
{
"from": "human",
"value": "import React from \"react\";\nimport styled from \"styled-components\";\nimport { connect } from \"react-redux\";\nimport { Alert, Icon } from \"../../../base\";\n\nconst StyledCreateA... | javascript | chosen |
[
{
"from": "system",
"value": "Allow skipping eslint test with an environment variable\n\nThis can be helpful when developing new tests, so that you do not need to be 100% compliant at all times\n"
},
{
"from": "human",
"value": "const cp = require('child_process')\n\ndescribe('eslint-test', func... | javascript | chosen |
[
{
"from": "system",
"value": "Check if input exists before remove\n"
},
{
"from": "human",
"value": "import PropertyIntegerView from './PropertyIntegerView';\nimport InputColor from 'domain_abstract/ui/InputColor';\n\nexport default PropertyIntegerView.extend({\n setValue(value, opts = {}) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Reset the Gruntfile after a test failure."
},
{
"from": "human",
"value": "var checkForDevFile = function (callback) {\n\tvar cwd = process.cwd();\n\tvar fs = require(\"fs\");\n\tvar path = require(\"path\");\n\n\tvar testFile = path.join(cwd, \"lib\", \"modernizr-d... | javascript | chosen |
[
{
"from": "system",
"value": "Revert the ui:image cmp validity checking.\n@bug W-2533777@\n"
},
{
"from": "human",
"value": "/*\n * Copyright (C) 2013 salesforce.com, inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance... | javascript | chosen |
[
{
"from": "system",
"value": "Create executeCommand and handleCommandError helper functions\n"
},
{
"from": "human",
"value": "/*\n * grunt-xcode\n * https://github.com/matiassingers/grunt-xcode\n *\n * Copyright (c) 2014 Matias Singers\n * Licensed under the MIT license.\n */\n'use strict';\n\n... | javascript | chosen |
[
{
"from": "system",
"value": "Change ct default revision name to v1\n\nhttps://github.com/rancher/rancher/issues/22162\n"
},
{
"from": "human",
"value": "import Route from '@ember/routing/route';\nimport { inject as service } from '@ember/service';\nimport { hash } from 'rsvp';\n\nexport default... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typo on API URL\n"
},
{
"from": "human",
"value": "var request = require('request');\nvar Scholarcheck = function(apiKey) {\n this.apiUrl = \"https://api.scholarcheck.io/api/v1/\";\n this.apiKey = apiKey || '';\n};\n\nScholarcheck.prototype._apiCall = function... | javascript | chosen |
[
{
"from": "system",
"value": "Fix camelCaseKeys is not exported\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar hash = require('./hash');\n\nexports.escapeDiacritic = require('./escape_diacritic');\nexports.escapeHTML = require('./escape_html');\nexports.escapeRegExp = require('./escape_... | javascript | chosen |
[
{
"from": "system",
"value": "Include CSS files in VUI loaded library.\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar configViewer = require('./configViewer');\n\nvar jQueryName = 'D2L.LP.Web.UI.Html.jQuery';\nvar vuiName = 'D2L.LP.Web.UI.Html.Vui';\n\nmodule.exports.jquery = function( ... | javascript | chosen |
[
{
"from": "system",
"value": "Use `process.setMaxListeners(0)` for tests to avoid annoying warnings."
},
{
"from": "human",
"value": "process.env.NODE_ENV = 'test';\n\nrequire('sugar');\nrequire('colors');\n\nmodule.exports.chai = require('chai');\nmodule.exports.chai.Assertion.includeStack = tr... | javascript | chosen |
[
{
"from": "system",
"value": "Expand description to include single-element array behavior\n"
},
{
"from": "human",
"value": "import React from 'react';\n\nconst ReactUil = {\n /**\n * Wrap React elements\n *\n * @param {Array.<ReactElement>|ReactElement} elements\n * @param {function|S... | javascript | chosen |
[
{
"from": "system",
"value": "Fix linting errors in fixture\n"
},
{
"from": "human",
"value": "module.exports = [\n {\n \"model\": \"User\",\n \"data\": {\n \"email\": \"test@abakus.no\",\n \"name\": \"Test Bruker\",\n // Password: test\n hash: '$2a$10$Gm09SZEHzdqx4eBV... | javascript | chosen |
[
{
"from": "system",
"value": "Update Storybook info addon Flow types\n"
},
{
"from": "human",
"value": "import type { RenderFunction, Story } from '@storybook/react';\n\ndeclare module '@storybook/addon-info' {\n declare type Options = {\n inline?: boolean,\n header?: boolean,\n source... | javascript | chosen |
[
{
"from": "system",
"value": "Update manipulator include for setup\n"
},
{
"from": "human",
"value": "document.write('<script type=\"text/javascript\" src=\"/janitor/admin/js/manipulator/v0_9_3-janitor/merged/seg_desktop.js\"></script>');\ndocument.write('<script type=\"text/javascript\" src=\"/... | javascript | chosen |
[
{
"from": "system",
"value": "Add link explaining why componentWillMount is used.\n"
},
{
"from": "human",
"value": "import './app.styl';\nimport * as state from '../state';\nimport Component from '../components/component.react';\nimport Footer from './footer.react';\nimport Menu from './menu.re... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Media prop on HistoryEntries.\n"
},
{
"from": "human",
"value": "import partial from 'lodash-es/partial'\nimport makeProto from '../wrap'\nimport { parseDate } from '../util'\nimport wrapMedia from './media'\nimport wrapRoom from './room'\nimport wrapUser from '... | javascript | chosen |
[
{
"from": "system",
"value": "Fix paths for ModalFooter story CSS\n"
},
{
"from": "human",
"value": "/**\n * Modal: With ModalFooter component\n */\n\n/* eslint-disable */\nimport React from 'react';\nimport ModalFooter from '@folio/stripes-components/lib/ModalFooter';\nimport Button from '@foli... | javascript | chosen |
[
{
"from": "system",
"value": "Optimize adjust_all_times() and extract helper\n"
},
{
"from": "human",
"value": "(function () {\n\nfunction adjust_all_times() {\n\t$('time').each(function () {\n\t\tvar t = $(this);\n\t\tvar d = t.attr('datetime').replace(/-/g, '/'\n\t\t\t).replace('T', ' ').repla... | javascript | chosen |
[
{
"from": "system",
"value": "Remove indicator; refactor actions to separate view\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nimport h from \"yasmf-h\";\nimport el from \"$LIB/templates/el\";\nimport L from \"$APP/localization/localization\";\n\nimport glyph from \"$WIDGETS/glyph\";\ni... | javascript | chosen |
[
{
"from": "system",
"value": "Fix shape item promise handler test suite\n"
},
{
"from": "human",
"value": "// DecentCMS (c) 2014 Bertrand Le Roy, under MIT. See LICENSE.txt for licensing details.\n'use strict';\nvar expect = require('chai').expect;\n\ndescribe('Shape Item Promise Handler', funct... | javascript | chosen |
[
{
"from": "system",
"value": "Add loading icon to login screen\n"
},
{
"from": "human",
"value": "function viewLogIn() {\n\n var login_form = templates.login;\n $('.section').html(login_form);\n\n $('.form-login').submit(function (e) {\n e.preventDefault();\n var email = $('.fl-user-and... | javascript | chosen |
[
{
"from": "system",
"value": "Add games and tasks collections\n"
},
{
"from": "human",
"value": "var mongodb = require('mongodb');\n\nvar host = \"alex.mongohq.com\";\nvar port = 10016;\nvar options = {};\n\nvar server = new mongodb.Server(host, port, options, {native_parser: true});\nvar Databa... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Temp increase fetch batch size to work around missing blog history\"\n\nThis reverts commit edc49e88c559aee6ee42fae6cd8e93a43e1457b3.\n"
},
{
"from": "human",
"value": "export default {\n FETCH_DATA_BATCH_SIZE: 75,\n FETCH_DATA_EXPIRE_SEC: 30,\n DE... | javascript | chosen |
[
{
"from": "system",
"value": "Change num of planned tests.\n"
},
{
"from": "human",
"value": "const numberOfPlannedTests = 6\ncasper.test.begin('test-trigger-upload-on-file-selection', numberOfPlannedTests, (test) => {\n casper.start(`http://${testhost}/trigger-on-file-select`, function () {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "CRM-4194: Fix \"You have a new email\" message\n\nfixed compositions concept"
},
{
"from": "human",
"value": "require([\n 'oroui/js/app/controllers/base/controller'\n], function(BaseController) {\n 'use strict';\n\n BaseController.loadBeforeAction([\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix invalid type in JSdoc.\n"
},
{
"from": "human",
"value": "/**\n * External dependencies\n */\nimport data, { TYPE_CORE } from 'GoogleComponents/data';\nimport { trackEvent } from 'assets/js/util/tracking';\n\nconst ACCEPTED = 'accepted';\nconst DISMISSED = 'dism... | javascript | chosen |
[
{
"from": "system",
"value": "Update publish for desktop script\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst glob = require('glob');\nconst path = require('path');\nconst rimraf = require('rimraf');\n\nconst workspaceRoot = path.join(__dirname, '..');\nconst desktopUpdates... | javascript | chosen |
[
{
"from": "system",
"value": "Fix calling fail every time\n"
},
{
"from": "human",
"value": "/**\n * Retrieves the first wikipedia article for a provided\n * name and passes it to the provided callback. If it fails,\n * \"null\" will be provided to the callback, or if provided,\n * the failCallb... | javascript | chosen |
[
{
"from": "system",
"value": "Update link on page.change event\n"
},
{
"from": "human",
"value": "require([ 'gitbook' ], function (gitbook) {\n gitbook.events.bind('start', function (e, config) {\n var githubURL = config.github.url;\n\n if (githubURL) {\n jQuery('.book-header > h1').... | javascript | chosen |
[
{
"from": "system",
"value": "Replace <p> with <div> in .footer [skip ci]\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport SocialLinks from './SocialLinks';\nimport { withClassName } from './HOC';\nimport { currentYear } from '../utils';\n\n\nfunction Footer({ className }) {... | javascript | chosen |
[
{
"from": "system",
"value": "Add an \"visible\" equivalent for update mixin\n"
},
{
"from": "human",
"value": "var updatable = function() {\n var self = this;\n\n // Update all children\n this.on('update', dt => {\n self.children.forEach(child => {\n if (child.update) {\n chil... | javascript | chosen |
[
{
"from": "system",
"value": "[KRACOEUS-8479] Convert non-full date to full date on loss of focus in js\n"
},
{
"from": "human",
"value": "var Kc = Kc || {};\nKc.Global = Kc.Global || {};\n(function (namespace, $) {\n // set all modals to static behavior (clicking out does not close)\n $.f... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typos in EmployeeE projection\n"
},
{
"from": "human",
"value": "import DS from 'ember-data';\nimport ProjectedModel from './projected-model';\nimport Proj from '../utils/projection-attributes';\n\nvar Model = ProjectedModel.extend({\n firstName: DS.attr('strin... | javascript | chosen |
[
{
"from": "system",
"value": "Implement regex numeric string solution.\n"
},
{
"from": "human",
"value": "var numericString = function (number) {\n var string = ('' + number).split('.'),\n length = string[0].length,\n places = 0;\n\n while (--length) {\n places += 1;\n // At ev... | javascript | chosen |
[
{
"from": "system",
"value": "Add conditional to tone reducer\n"
},
{
"from": "human",
"value": "import { GET_TONE } from '../actions/index';\n\nexport default function (state = [], action) {\n switch (action.type) {\n case GET_TONE:\n return action.payload.data;\n\n default:\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use setElement to set the view's element properly.\n"
},
{
"from": "human",
"value": "//----------------------------------------------------------------------------\n// Copyright (C) 2013 The IPython Development Team\n//\n// Distributed under the terms of the BSD ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix code style error in main.js\n"
},
{
"from": "human",
"value": "import Vue from 'vue';\nimport app from './App';<% if (extraConfig.isUseVueRouter) { %>\nimport VueRouter from 'vue-router';\nimport { configRouter } from './route';<% } %>\n<% if (extraConfig.isUseV... | javascript | chosen |
[
{
"from": "system",
"value": "FRIN23-19: Move trix dependency to content gem\n"
},
{
"from": "human",
"value": "import { Application } from \"@hotwired/stimulus\"\n\n// Stimulus controllers. This should ultimately be moved to koi/admin.js\nimport \"@hotwired/turbo-rails\"\nimport \"trix\";\nimpo... | javascript | chosen |
[
{
"from": "system",
"value": "Add width checking to video javascript.\n"
},
{
"from": "human",
"value": "$(document).ready(function () {\n attachResizeVideo();\n switchAd();\n});\n\nfunction attachResizeVideo() {\n\n $(window).resize(function () {\n resizeVideo();\n });\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Increase timeout for bunyan test\n\nBuild can sometimes take a long time…"
},
{
"from": "human",
"value": "\n'use strict';\n\nvar path = require('path');\n\nvar expect = require('thehelp-test').expect;\n\nvar util = require('./util');\n\n\ndescribe('bunyan', functio... | javascript | chosen |
[
{
"from": "system",
"value": "Add automatic test for utils\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar should = require('should');\nvar utils = require('./utilsCtrl.js');\n\ndescribe('utilsCtrl tests', function() {\n\n\n it('should find list with some id', function(done) {\n var ... | javascript | chosen |
[
{
"from": "system",
"value": "Set typeOperation for default to select option\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('myApp.operation', ['ngRoute'])\n\n.config(['$routeProvider', function($routeProvider) {\n $routeProvider.when('/operation', {\n templateUrl: 'opera... | javascript | chosen |
[
{
"from": "system",
"value": "Increase timeout for trakt.tv API calls\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Settings = require('./settings.js');\nvar ChromeStorage = require('./chrome-storage.js');\n\nfunction Request() {};\n\nRequest._send = function _send(options, accessToken... | javascript | chosen |
[
{
"from": "system",
"value": "Add test for {{else}} block\n"
},
{
"from": "human",
"value": "import hbs from 'htmlbars-inline-precompile';\nimport { moduleForComponent, test } from 'ember-qunit';\n\nmoduleForComponent('my-component', {\n integration: true\n});\n\ntest('precompile enabled flags'... | javascript | chosen |
[
{
"from": "system",
"value": "Add new placeholders to Example.js"
},
{
"from": "human",
"value": "(function (env) {\n \"use strict\";\n env.ddg_spice_<: $lia_name :> = function(api_result){\n\n // Validate the response (customize for your Spice)\n if (api_result.error) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": ":shower: Remove unnecessary plugin using declaration\n"
},
{
"from": "human",
"value": "const package = require('./package.json')\n\nmodule.exports = {\n parser: 'babel-eslint',\n env: {\n browser: true,\n commonjs: true,\n es6: true,\n jest: true,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow console log warn error\n"
},
{
"from": "human",
"value": "module.exports = {\n \"env\": {\n \"browser\": true,\n \"node\": true\n },\n\n \"globals\": {\n \"app\": true,\n \"angular\": true,\n \"_\": true\n },\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow eslint to use node and es6\n"
},
{
"from": "human",
"value": "module.exports = {\n \"env\": {\n \"browser\": true\n },\n \"extends\": \"eslint:recommended\",\n \"rules\": {\n \"indent\": [\n \"error\",\n 4\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add graph of boolean property\n"
},
{
"from": "human",
"value": "/**\n * Logs Screen\n *\n * Shows all logs\n *\n * 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, ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix reload errors with latest tvOS\n"
},
{
"from": "human",
"value": "'use strict';\n// socket.io-client requires the window object, and navigator.userAgent to be present.\n\nvar window = {},\n navigator = {userAgent: 'tvos'};\n\nvar io = require('socket.io-client'... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a race condition when adding output streams before all input streams are added.\n"
},
{
"from": "human",
"value": "var LogStream = require('./LogStream');\nvar lodash = require('lodash');\n\n/**\n * The LogFactory constructor.\n * @constructor\n */\nvar LogFacto... | javascript | chosen |
[
{
"from": "system",
"value": "Enable the web socket for channel transports\n"
},
{
"from": "human",
"value": "// Brunch automatically concatenates all files in your\n// watched paths. Those paths can be configured at\n// config.paths.watched in \"brunch-config.js\".\n//\n// However, those files ... | javascript | chosen |
[
{
"from": "system",
"value": "Add double submission protection in Save button\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport RaisedButton from 'material-ui/RaisedButton';\nimport ContentSave from 'material-ui/svg-icons/content/save';\n\nconst SaveButton = () => <RaisedButt... | javascript | chosen |
[
{
"from": "system",
"value": "Set mode and theme custom dimensions instead of sending event\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar localforage = require('localforage');\n\nvar $body = $('body');\n['theme', 'mode'].forEach(function (property) {\n localforage.getItem(property, fu... | javascript | chosen |
[
{
"from": "system",
"value": "Use 'latest' for typing versions.\n"
},
{
"from": "human",
"value": "/* eslint-env node */\n\nconst path = require('path');\n\nmodule.exports = {\n description: 'Initialize files needed for typescript compilation',\n\n files() {\n return [\n path.join(this... | javascript | chosen |
[
{
"from": "system",
"value": "fix(logger): Fix issue with lower-cased form of logger name\n"
},
{
"from": "human",
"value": "/**\n * Step 5\n * Where you write the generator specific files (routes, controllers, etc)\n */\n\nconst SOURCE_CONFIG = name => `${name}Config.js`;\n\nconst DESTINATION_C... | javascript | chosen |
[
{
"from": "system",
"value": "Raise the bar on test coverage from 80% to 90%\n"
},
{
"from": "human",
"value": "var data = '';\nprocess.stdin.on('data', function(chunk) { data += chunk; });\nprocess.stdin.on('end', function() {\n var regExp = /[0-9]+([.][0-9]+)?%/g;\n var match;\n do {\n m... | javascript | chosen |
[
{
"from": "system",
"value": "Switch to using a button group for the context selector.\n"
},
{
"from": "human",
"value": "import React from \"react\"\nimport { Nav, NavItem, Collapse } from \"react-bootstrap\"\n\nvar threadNavStyle = {\n backgroundColor: 'rgb(220, 220, 220)',\n color: 'bla... | javascript | chosen |
[
{
"from": "system",
"value": "Update lang-specific specs to stub languageSettings\n"
},
{
"from": "human",
"value": "\"use strict\";\n\ndescribe('lang-specific directive', function() {\n var element;\n var documentStore;\n function createDocumentStore() {\n return {\n store: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix wrong assetPrefix when using basePath as object\n"
},
{
"from": "human",
"value": "const config = require(\"config\");\nlet basePath;\nif (config.basePath) {\n if (typeof config.basePath === \"string\") {\n basePath = {\n test: config.basePath\n };\n... | javascript | chosen |
[
{
"from": "system",
"value": "Load home page on logout\n"
},
{
"from": "human",
"value": "function NavController($scope, Auth) {\n $scope.signedIn = Auth.isAuthenticated;\n $scope.logout = Auth.logout;\n\n Auth.currentUser().then(function (user) {\n $scope.user = user;\n });\n\n $scope.$... | javascript | chosen |
[
{
"from": "system",
"value": "Make JobTypeCardPreview use imageProp from propTypes\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Card } from 'native-base';\n\nimport CardImageHeader from '../../common/card-image-header/cardImageHeader';\nimport SimpleCard... | javascript | chosen |
[
{
"from": "system",
"value": "Test that no mapid is set on example styles.\n"
},
{
"from": "human",
"value": "var test = require('tape');\nvar tm = require('../lib/tm');\nvar style = require('../lib/style');\nvar source = require('../lib/source');\nvar mockOauth = require('../lib/mapbox-mock')(r... | javascript | chosen |
[
{
"from": "system",
"value": "Add functionality to logout button\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport {Route, RouteHandler, Link, Button} from 'react-router'\n\nclass Profile extends React.Component {\n constructor(props){\n super(props);\n this.state = {\n... | javascript | chosen |
[
{
"from": "system",
"value": "Remove old parts of DummyApi tests\n"
},
{
"from": "human",
"value": "var assert = require(\"assert\");\nvar Q = require(\"q\");\n\nvar api = require(\"../../lib/dummy/api\");\nvar DummyApi = api.DummyApi;\n\nvar resources = require(\"../../lib/dummy/resources\");\n... | javascript | chosen |
[
{
"from": "system",
"value": "refactor(componentLoader): Add component path at module level\n\nInstead of forcing this knowledge on the add-on, we inserted it here. The benefit is that we are able to point the core to whatever directory we choose, without modifying each addon in turn.\n"
},
{
"from"... | javascript | chosen |
[
{
"from": "system",
"value": "Bring back regular css loading\n"
},
{
"from": "human",
"value": "const path = require('path');\n\nconst webpackConfig = {\n entry: path.join(__dirname, 'index.js'),\n output: {\n path: path.join(__dirname, '../server/static'),\n filename: 'bundle.js'\n },\... | javascript | chosen |
[
{
"from": "system",
"value": "Update up to changes in dbjs\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar sepItems = require('es5-ext/array/#/sep-items')\n , d = require('d/d')\n , DOMInput = require('./_observable')\n , resolveTriggers = require('dbjs/_se... | javascript | chosen |
[
{
"from": "system",
"value": "Add Form submit handler to search bar\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nexport default class SearchBar extends Component {\n render() {\n return (\n <form className='input-group'>\n <input />\n <sp... | javascript | chosen |
[
{
"from": "system",
"value": "Make lightwindow work after ajax load\n"
},
{
"from": "human",
"value": "var scroll_lock = false;\nvar last_page = false;\nvar current_page = 1;\n\nfunction checkScroll()\n{\n if(!last_page && !scroll_lock && nearBottomOfPage())\n {\n scroll_lock = true;\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce size of chart with query\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar ChartsController = function($scope, $rootScope) {\n $scope.drawChart = function() {\n if ($scope.geoAggData && $scope.geoAggData.length > 0) {\n console.log('$scope.geoA... | javascript | chosen |
[
{
"from": "system",
"value": "Add RecoverableModules as special widget state.\n"
},
{
"from": "human",
"value": "/**\n * Widgets layout constants.\n *\n * Site Kit by Google, Copyright 2021 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use t... | javascript | chosen |
[
{
"from": "system",
"value": "Check for undefined when fetching a chunkWithModules by chunk.id\n"
},
{
"from": "human",
"value": "/*\n * @flow\n */\n\nimport type {RawStats, Module} from '../types/Stats';\n\nimport type {Child} from './getEntryHeirarchy';\n\nimport getModulesByChunk from './getM... | javascript | chosen |
[
{
"from": "system",
"value": "feat(tooling): Allow any host connection to local dev\n"
},
{
"from": "human",
"value": "/**\n * In development we assume that the code generated is going to be consumed by\n * webpack dev server and we are bundling into a single js file.\n */\n\nimport webpack from... | javascript | chosen |
[
{
"from": "system",
"value": "Add data attr for sidebar template higher up in DOM\n"
},
{
"from": "human",
"value": "chorus.views.Sidebar = chorus.views.Base.extend({\n constructorName: \"SidebarView\",\n preRender:function () {\n this._super(\"preRender\", arguments);\n\n //... | javascript | chosen |
[
{
"from": "system",
"value": "Add icon for .npm files\n\nRefs #1\n"
},
{
"from": "human",
"value": "'use babel'\n\nexport default {\n eslintrc: {\n config: {\n description: '.eslint',\n icons: [ 'ESLint' ],\n title: 'ESLint',\n },\n match: [ '.eslint' ],\n },\n git: {\... | javascript | chosen |
[
{
"from": "system",
"value": "Update BoardgameListComponent to accept more input\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\n\nexport default class BoardgameListItem extends Component {\n static propTypes = {\n name: PropTypes.string.isRequired,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix not waiting for paper key approval\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport React, {Component} from 'react'\nimport {connect} from 'react-redux'\nimport HiddenString from '../../../util/hidden-string'\nimport {sawPaperKey} from '../../../actions/... | javascript | chosen |
[
{
"from": "system",
"value": "Revert Lod ts-loader info to stdout"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = isAngularProject => ({\n test: /\\.tsx?$/,\n exclude: /(node_modules)/,\n loaders: [...isAngularProject ? ['ng-annotate'] : [], 'ts'],\n query: {\n logInfoT... | javascript | chosen |
[
{
"from": "system",
"value": "Resolve CLIMATE-112 - Unit tests don't run after refactoring\n\n- The unit tests now run properly. That being said, they're still\n outdated and useless. This will be addressed in a future issue.\n\ngit-svn-id: https://svn.apache.org/repos/asf/incubator/climate/trunk@1493995 1... | javascript | chosen |
[
{
"from": "system",
"value": "Use primitive command state for EditInlineCommand.\n"
},
{
"from": "human",
"value": "import Command from './Command'\n\nclass EditInlineNodeCommand extends Command {\n constructor(...args) {\n super(...args)\n if (!this.config.nodeType) {\n throw new Er... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.