conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Make platform ID a Number\n"
},
{
"from": "human",
"value": "'use babel';\n\nimport { SelectView } from 'particle-dev-views';\n\nlet $$ = null;\n\nexport default class SelectTargetPlatformView extends SelectView {\n\tconstructor(...args) {\n\t\tsuper(...args);\n\t\t... | javascript | chosen |
[
{
"from": "system",
"value": "Remove else statement in switch statement\n\nThis allows the tests to reach any statements and reach 100% coverage.\n"
},
{
"from": "human",
"value": "import { Map, notSetValue } from 'immutable'\n\nimport { CREDATE_COSTS } from '../../actions'\n\nexport default fun... | javascript | chosen |
[
{
"from": "system",
"value": "Save user email and name in session.\n"
},
{
"from": "human",
"value": "var sys = require('sys');\nvar _ = require('underscore');\nvar users = require('./users');\n\nmodule.exports= function(options) {\n options= options || {};\n var that= {};\n var my= {};... | javascript | chosen |
[
{
"from": "system",
"value": "Update class names for more consistency\n"
},
{
"from": "human",
"value": "import Remarkable from 'remarkable';\n\nconst markdown = (text) => {\n var md = new Remarkable();\n return {\n __html: md.render(text)\n };\n};\n\nconst Event = ({ title, start_time, en... | javascript | chosen |
[
{
"from": "system",
"value": "Sort elements according to newEntityIds order.\n"
},
{
"from": "human",
"value": "import { without } from 'substance'\n\nexport default function updateEntityChildArray(editorSession, nodeId, tagName, attribute, oldEntityIds, newEntityIds) {\n\n editorSession.transa... | javascript | chosen |
[
{
"from": "system",
"value": "Remove duplicate constant from GameTypes.\n"
},
{
"from": "human",
"value": "export const PLAYER_ONE = \"X\";\nexport const PLAYER_TWO = \"O\";\nexport const WINNER = \"WINNER\";\nexport const NOT_WINNER = \"NOT WINNER\";\nexport const DRAW = \"DRAW\";\nexport const... | javascript | chosen |
[
{
"from": "system",
"value": "Remove comment for old version of Handlebars\n"
},
{
"from": "human",
"value": "// Define handlebars helpers\n\nvar hbs = require('hbs');\n\n// blocks and extends\nvar blocks = {};\n\nhbs.registerHelper('extend', function(name, context) {\n var block = blocks[name]... | javascript | chosen |
[
{
"from": "system",
"value": "Add decimal and integer regex"
},
{
"from": "human",
"value": "/*\n * regex-pill\n * https://github.com/lgoldstien/regex-pill\n *\n * Copyright (c) 2014 Lawrence Goldstien\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar RegexLibraryContents = {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove duplicate case from switch\n"
},
{
"from": "human",
"value": "// created to start cleaning up \"window\" interaction\n//\nwindow.show = function(id) {\n window.hideall();\n\n runHooks(\"paneChanged\", id);\n\n switch(id) {\n case 'all':\n case 'facti... | javascript | chosen |
[
{
"from": "system",
"value": "Change .map to .forEach so that we can append to a list\n"
},
{
"from": "human",
"value": "import { expeditions } from 'constants/expeditions';\n\nconst RECENT_EXPEDITIONS_LENGTH = 4;\n\nexport function findExpedition(key) {\n return expeditions[key] ? expeditions[... | javascript | chosen |
[
{
"from": "system",
"value": "Write sourcemaps prior to prefixing\n"
},
{
"from": "human",
"value": "var gulp = require('gulp-help')(require('gulp'));\nvar browserSync = require('browser-sync');\nvar sass = require('gulp-sass');\nvar sourcemaps = require('gulp-sourcemaps');\nvar handleErrors = r... | javascript | chosen |
[
{
"from": "system",
"value": "Use a devtool that works\n"
},
{
"from": "human",
"value": "let utils = require('./utils')\nlet webpack = require('webpack')\nlet config = require('../config')\nlet merge = require('webpack-merge')\nlet baseWebpackConfig = require('./webpack.base.conf')\nlet HtmlWeb... | javascript | chosen |
[
{
"from": "system",
"value": "ui: Fix color of status bar on loading screen.\n\nOn Android, the color of the status bar clashes with the background\ncolor on the loading screen. Use ZulipStatusBar to provide a better\none.\n\n[Commit message amended by Ray Kraesig.]\n\nFixes: #3860.\n"
},
{
"from": ... | javascript | chosen |
[
{
"from": "system",
"value": "Return moment object after parsing\n"
},
{
"from": "human",
"value": "import moment from 'moment-timezone';\nimport AbstractFormat from './abstract';\n\nexport default class DateFormat extends AbstractFormat {\n format(dateValue, dateFormat, locale, timezone) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Convert if to switch statement\n"
},
{
"from": "human",
"value": "const path = require('path');\n\nif (process.platform === 'win32') {\n module.exports = {\n done: path.join(__dirname, 'icons/win/done.ico'),\n todo: path.join(__dirname, 'icons/win/todo.ico'),... | javascript | chosen |
[
{
"from": "system",
"value": "Make sure the app menu state is set\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n function EditorMenuDirective($injector, treeService, navigationService, umbModelMapper, appState) {\n\n function link(scope, el, attr, ctrl) {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Update test as Koa is removed\n"
},
{
"from": "human",
"value": "import test from 'tape';\nimport Server from '../dist';\n\n(async function () {\n let server = new Server({\n // Inject log\n log: { info: console.log },\n // Inject config\n config: { ser... | javascript | chosen |
[
{
"from": "system",
"value": "Fix hello world phrase in russian"
},
{
"from": "human",
"value": "function hello(language) {\n var hellos = {\n 'Chinese': '你好世界',\n 'Dutch': 'Hello wereld',\n 'English': 'Hello world',\n 'French': 'Bonjour monde',\n 'German': 'Hallo Welt',\n 'Gr... | javascript | chosen |
[
{
"from": "system",
"value": "Use padlock icon in facebook sprite for testing.\n"
},
{
"from": "human",
"value": "// ==UserScript==\n// @name OTR for Facebook\n// @include http://*.facebook.com\n// @include https://*.facebook.com\n// @require lib/jquery.js\n// @require lib/dep/bigint.js\n// @req... | javascript | chosen |
[
{
"from": "system",
"value": "Add rolling info when checking the ROS distro\n\nFix #None\n"
},
{
"from": "human",
"value": "'use strict';\n\nswitch (process.env.ROS_DISTRO) {\n case 'eloquent':\n console.log('1911');\n process.exit(0);\n case 'foxy':\n console.log('2006');\n proces... | javascript | chosen |
[
{
"from": "system",
"value": "Fix editor in iFrame should be the code\nThis should be changed\n"
},
{
"from": "human",
"value": "/* eslint-disable no-undef, no-unused-vars, no-native-reassign */\nwindow.__$ = parent.$;\nwindow.__$(function() {\n var _ = parent._;\n var Rx = parent.Rx;\n var c... | javascript | chosen |
[
{
"from": "system",
"value": "Improve HTML Detection in History Support Middleware\n\nUse built in ExpressJS methods for detecting HTML in the Accept header.\n"
},
{
"from": "human",
"value": "'use strict';\n\n// Used in serve-files middleware\n\nvar path = require('path');\n\nmodule.exports = f... | javascript | chosen |
[
{
"from": "system",
"value": "Use $watchGroup, avoid double API call.\n"
},
{
"from": "human",
"value": "'use strict';\n\nangular.module('ddsApp').directive('etablissementsList', function() {\n return {\n restrict: 'E',\n templateUrl: '/partials/etablissements-list.html',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add versioning to APP API call\n"
},
{
"from": "human",
"value": "import extend from '../common/extend';\nimport retryAjax from '../ajax/retryAjax';\n\nexport default function callApp(data) {\n return retryAjax({\n url: 'app.php',\n data: extend(data, { brows... | javascript | chosen |
[
{
"from": "system",
"value": "Fix popup & encode URI components\n\nURL encode `var data` to prevent issues with titles containing an `&`, sql injection etc.\r\nAlternative method to prevent CMS popup with changed fields."
},
{
"from": "human",
"value": "(function ($) {\n\n $.entwine('ss', fun... | javascript | chosen |
[
{
"from": "system",
"value": "Fix open default project if any\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport View from 'app/components/dashboard'\nimport {goto} from 'app/utils/store'\nimport { connect } from 'react-redux'\nimport { get_last_project } from 'app/utils/projec... | javascript | chosen |
[
{
"from": "system",
"value": "Fix asset `asyncTimeOutCheck`, use valid global instance of `wTools`\n"
},
{
"from": "human",
"value": "\nrequire( 'wTesting' );\nconst _ = require( 'wTools' );\n_.include( 'wConsequence' );\n\n//\n\nfunction routine1( test )\n{\n test.description = 'description1';... | javascript | chosen |
[
{
"from": "system",
"value": "Set cookie only after video is actually displayed\n"
},
{
"from": "human",
"value": "(function($) {\n\n $(document).ready(function(){\n\n var pageLinkMap = {\n 'table': 'table_view',\n 'map': 'map_view',\n 'distribution': 'distribution_view',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix sass custom functions fileExists\n"
},
{
"from": "human",
"value": "var sizeOf = require('image-size');\nvar sass = require('node-sass');\nvar project = require('../../package.json');\nvar config = require('../config.js');\nvar fileExists = require('file-exists'... | javascript | chosen |
[
{
"from": "system",
"value": "[examples] Add example of URL field which allows relative paths\n"
},
{
"from": "human",
"value": "import {MdLink as icon} from 'react-icons/md'\n\nexport default {\n name: 'urlsTest',\n type: 'document',\n title: 'URLs test',\n icon,\n fields: [\n {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove duplicated code between controller and directive\n"
},
{
"from": "human",
"value": "\nangular.module('myApp').controller('Browse/TableCtrl', function($scope, $http, Select2Configurator, $timeout) {\n 'use strict';\n\n // Configure select2 via our helper... | javascript | chosen |
[
{
"from": "system",
"value": "Fix error when user not found\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst jsonfile = require('jsonfile');\n\nconst PATH = '/var/lib/homecontrol/webapp/users/';\n\nmodule.exports = {\n addUser: function (user, cb) {\n jsonfile.writeFile(PATH + user.... | javascript | chosen |
[
{
"from": "system",
"value": "Use MarkdownViewer for Dataset description\n"
},
{
"from": "human",
"value": "import React from 'react'\nimport './DatasetDetail.css'\nimport { doneSince } from '../../helpers/doneSince'\n\nconst styles = {\n resume: {\n display: 'flex',\n flexDirection: 'col... | javascript | chosen |
[
{
"from": "system",
"value": "Add a function to find solved problem.\n"
},
{
"from": "human",
"value": "var fs = require('fs');\nvar git = require('./git.js');\nvar casper = require('./casper.js');\n\nvar userInfoFileName = process.argv[2];\nvar userInfo = new Object();\nvar solvedProblemInfo = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add simple / endpoint that will work for a healthcheck\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar bodyParser = require('body-parser');\nvar router = require('./lib/router');\nvar cors = require('cors')\n\nvar app =... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug where some files could get lost when uploading multiple files"
},
{
"from": "human",
"value": "import BenchmarkRun from 'models/BenchmarkRun.js';\n\nimport DoingWorkSpinner from 'components/DoingWorkSpinner.jsx';\n\n//A non-ui class which cares about upload ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix getDefaultLocales causing ReferenceError on Server-Side Rendering\n"
},
{
"from": "human",
"value": "import once from 'lodash.once';\n\nlet userLocale = null;\n\nexport const getDefaultLocales = once(() => {\n const languageList = [];\n\n if (window.navigator.... | javascript | chosen |
[
{
"from": "system",
"value": "Exit if no global packages\n\n- Excluding npm and this module, exit if there are no global packages\n"
},
{
"from": "human",
"value": "// @flow\n'use strict';\n\nconst execa = require('execa');\n\n/**\n * Returns a list of all globally installed NPM packages\n * @pu... | javascript | chosen |
[
{
"from": "system",
"value": "chore(elementor): Change path to protractor cli.js after protractor's typescript upgrade\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar chalk = require('chalk');\nvar configHelper = require('./config-helper');\nvar path = require('path');\nvar spawnHelper =... | javascript | chosen |
[
{
"from": "system",
"value": "Add clone function, required by chunk.\n"
},
{
"from": "human",
"value": " function d3_treemap_rect(x, y, width, height) {\n var rect = {};\n\n rect.x = function(_) {\n if (!arguments.length) return x;\n x = _;\n return rect;\n };\n\n rec... | javascript | chosen |
[
{
"from": "system",
"value": "Connect <Header /> to the router to subscribe to location updates\n"
},
{
"from": "human",
"value": "import { connect } from 'react-redux';\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport { loggedOut } from '~client/actions/login';\nimport... | javascript | chosen |
[
{
"from": "system",
"value": "Update Webpack configuration file to use ECMAScript 2015 syntax\n"
},
{
"from": "human",
"value": "const BrowserSyncPlugin = require(\"browser-sync-webpack-plugin\");\nconst ExtractTextPlugin = require(\"extract-text-webpack-plugin\");\n\nmodule.exports = {\n entry... | javascript | chosen |
[
{
"from": "system",
"value": "Add method summary.getArticleByPath to summary api\n"
},
{
"from": "human",
"value": "var encodeSummaryArticle = require('../json/encodeSummaryArticle');\n\n/**\n Encode summary to provide an API to plugin\n\n @param {Output} output\n @param {Config} config... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Disabled all experiments except for CONFIG_CACHING\"\n\nThis reverts commit f1370cdb12fa837c298696811b35f05eb56bbfb7.\n"
},
{
"from": "human",
"value": "'use strict';\nconst symbol = require('../utilities/symbol');\n\nlet experiments = {\n CONFIG_CACHING: ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix issue with not being able to paint on max edge\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { connect } from 'react-redux';\n\nimport immutableToJs from 'utils/immutableToJs';\n\nimport { toPickTile }... | javascript | chosen |
[
{
"from": "system",
"value": "Add sign in issue notification.\n"
},
{
"from": "human",
"value": "// Ensure namespace housing exists\nvar housing = housing || {};\n\n/**\n * housing.app\n *\n * This is the entry point for the housing selection application.\n * This function sets up elements on th... | javascript | chosen |
[
{
"from": "system",
"value": "Add Ctrl-/ shortcut to clear search.\n"
},
{
"from": "human",
"value": "// -------------------------------------------------------------------------- \\\\\n// File: SearchTextView.js \\\\\n// Module: ControlViews ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix compatibility with postcss-reporter after API changes\n\n"
},
{
"from": "human",
"value": "'use strict'\nmodule.exports = function(gulp, plugins, config, name, file) { // eslint-disable-line func-names\n const theme = config.themes[name]\n const srcBase = plug... | javascript | chosen |
[
{
"from": "system",
"value": "Remove load test (a bit too much for ci)\n"
},
{
"from": "human",
"value": "require('./profile');\nrequire('./datachannel');\n// require('./heartbeat-disconnect');\nrequire('./custom-id');\n\n// include the simple load test\nrequire('./all-loadtest');"
},
{
... | javascript | chosen |
[
{
"from": "system",
"value": "Replace \"enter\" with \"space\" for splitting\n"
},
{
"from": "human",
"value": "const Post = function (params) {\n\n const defaults = {\n name: '', // full name\n username: '', // username\n profile_display: '', // profile image\n desc: 'No Descriptio... | javascript | chosen |
[
{
"from": "system",
"value": "Add error reporting and logging\n"
},
{
"from": "human",
"value": "const release = require('./lib/release')\n\nmodule.exports = function () {\n const project = this.project\n const { getChangeLog, newRelease } = release(project)\n\n return [\n {\n title: ... | javascript | chosen |
[
{
"from": "system",
"value": "Add storybookDefault to babel default config for the future purpose.\n"
},
{
"from": "human",
"value": "export default {\n // Don't try to find .babelrc because we want to force this configuration.\n babelrc: false,\n presets: [\n [\n require.resolve('@ba... | javascript | chosen |
[
{
"from": "system",
"value": "Add basic test to check if a unique role is created and all roles are returned\n"
},
{
"from": "human",
"value": "// Write a test that validates that a new role created has a unique title.\n// Write a test that validates that all roles are returned when Roles.all is... | javascript | chosen |
[
{
"from": "system",
"value": "Apply mongoose and promise pattern.\n"
},
{
"from": "human",
"value": "var config = require('./config'),\n Twit = require('twit'),\n MongoClient = require('mongodb').MongoClient;\n\nvar T = new Twit(config.oauth_creds);\n\nvar tweet = function() {\n MongoClie... | javascript | chosen |
[
{
"from": "system",
"value": "BB-5745: Fix fields ACL JS component to support access_level_route parameter\n- fix CS\n"
},
{
"from": "human",
"value": "define(function(require) {\n 'use strict';\n\n var WorkflowActionPermissionsRowView;\n var _ = require('underscore');\n var mediator... | javascript | chosen |
[
{
"from": "system",
"value": "Make travis happy & make my need for semicolons happy ;)"
},
{
"from": "human",
"value": "var util = require(\"util\")\n , EventEmitter = require(\"events\").EventEmitter\n\nmodule.exports = (function() {\n var CustomEventEmitter = function(fct) {\n thi... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the only in test case\n"
},
{
"from": "human",
"value": "'use strict';\n\n\nvar OCLE = require('../..');\n\n\ndescribe.only('getAllPaths test propane', function () {\n it('should yield the right result', function () {\n var molecule=OCLE.Molecule.fr... | javascript | chosen |
[
{
"from": "system",
"value": "Clear create comment form after posting."
},
{
"from": "human",
"value": "module.exports = Zeppelin.FormView.extend({\n className: 'create-comment',\n\n formSelector: 'form.create-comment-form',\n\n template: require('account/templates/create-comment'),\n\n mode... | javascript | chosen |
[
{
"from": "system",
"value": "Improve error message when the subject's events are not scheduled\n"
},
{
"from": "human",
"value": "'use strict'\n\nvar util = require('./util')\n\nexport function createSchedule (queryArray, callback) {\n var onResponse = function (responseString, error) {\n i... | javascript | chosen |
[
{
"from": "system",
"value": "Add button for _onPressAddStory to styles\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\n\nimport {\n StyleSheet,\n Text,\n View,\n TouchableHighlight,\n} from 'react-native';\n\nimport I18n from 'react-native-i18n'\n\nclass Profil... | javascript | chosen |
[
{
"from": "system",
"value": "Add string check - 10142\n"
},
{
"from": "human",
"value": "/**\n * This plug-in will add automatic detection for currency columns to \n * DataTables. Note that only $ and £ symbols are detected with this code,\n * but it is trivial to add more or change the current... | javascript | chosen |
[
{
"from": "system",
"value": "Remove Invariant Violation for new invariant"
},
{
"from": "human",
"value": "import assert from 'assert';\nimport create from './';\n\nit('should generate correct actionTypes', () => {\n const types = create([\n 'INCREMENT_COUNTER',\n 'DECREMENT_COUNTER',\n... | javascript | chosen |
[
{
"from": "system",
"value": "Split buildQuery out into separate helper func\n"
},
{
"from": "human",
"value": "API = (function(Config, $) {\n\n // var _json = {};\n\n function withJSON(url, callback) {\n // if (_json[url] == undefined) {\n $.getJSON(url, function(json) {... | javascript | chosen |
[
{
"from": "system",
"value": "Add routes for root and /api\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar server = express();\nvar port = process.env.PORT || 4000;\nvar bodyParser = require('body-parser');\nvar router = express.Router();\n\n\nserv... | javascript | chosen |
[
{
"from": "system",
"value": "Update test to expect no newline in token\n"
},
{
"from": "human",
"value": "const assert = require('assert')\nconst fs = require('fs')\nconst path = require('path')\n\nconst GitHub = require('../../src/models/github')\n\ndescribe('GitHub', () => {\n describe('getT... | javascript | chosen |
[
{
"from": "system",
"value": "Switch from Env to raw engine detection to keep list of dependencies for fix.* small.\n"
},
{
"from": "human",
"value": "/* \n==================================================================================================\n Core - JavaScript Foundation \n Copyr... | javascript | chosen |
[
{
"from": "system",
"value": "Add try..catch for parser calls\n"
},
{
"from": "human",
"value": "require('./mensen/aasee.js');\nrequire('./mensen/ring.js');\nrequire('./mensen/davinci.js');\nrequire('./mensen/denkpause.js');\nrequire('./mensen/bispinghof.js');\n"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Add eslint error if console is used\n"
},
{
"from": "human",
"value": "module.exports = {\n env: {\n node: true,\n mocha: true,\n es6: true\n },\n extends: 'react-app',\n parserOptions: {\n ecmaFeature: {\n jsx: tru... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for escaping placeholders.\n"
},
{
"from": "human",
"value": "var syntax = /\\{\\{([\\w\\-]+)\\}\\}/g;\nvar syntaxCleanup = /((?:[\\r\\n])*)\\{\\{([\\w\\-]+)\\}\\}((?:[\\r\\n])*)/g;\n\nmodule.exports = function (template, replacements, cleanup) {\n if... | javascript | chosen |
[
{
"from": "system",
"value": "Write meta robots only when content type is HTML\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar Transform = require('stream').Transform;\nvar contentTypes = require('./content-types');\n\nmodule.exports = function(config) {\n\n function createStream() {\... | javascript | chosen |
[
{
"from": "system",
"value": "chore(eslint): Add correct enviroments to eslint config\n"
},
{
"from": "human",
"value": "module.exports = {\n env: {\n browser: true,\n node: true,\n es6: true\n },\n extends: 'eslint:recommended',\n parserOptions: {\n sourc... | javascript | chosen |
[
{
"from": "system",
"value": "Add browser: true to env map to suppress eslint errors for browser globals\n"
},
{
"from": "human",
"value": "module.exports = {\n\t\"env\": {\n\t\t\"es6\": true\n\t},\n\t\"extends\": \"eslint:recommended\",\n\t\"parserOptions\": {\n\t\t\"sourceType\": \"module\"\n\... | javascript | chosen |
[
{
"from": "system",
"value": "breaking: Extend eslint config from @patternslib/dev.\n"
},
{
"from": "human",
"value": "module.exports = {\n extends: [\"eslint:recommended\", \"prettier\"],\n root: true,\n env: {\n es6: \"true\",\n browser: true,\n node: true,\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow ES6 globals (Set, Map, etc)\n"
},
{
"from": "human",
"value": "module.exports = {\n root: true,\n extends: ['eslint:recommended', 'prettier'],\n plugins: ['prettier'],\n parserOptions: {\n ecmaVersion: 2015,\n sourceType: 'module',\n },\n env: {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Edit ESLint config: Double quotes, multiline comma-dangle, React support\n"
},
{
"from": "human",
"value": "/*eslint-env node*/\nmodule.exports = {\n parserOptions: {\n ecmaVersion: 6,\n sourceType: \"module\"\n },\n env: {\n browser: true\n },\n rules... | javascript | chosen |
[
{
"from": "system",
"value": "Use get instead of has method due to machdb compatability\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst db = require('../db');\nconst toId = require('toid');\n\nfunction auth(req, res) {\n if (db('users').has(toId(req.body.name))) {\n return res.json... | javascript | chosen |
[
{
"from": "system",
"value": "Declare ractive debug flag to false\n"
},
{
"from": "human",
"value": "import { getByLabelText, getByText, getByTestId, queryByTestId, wait, getQueriesForElement, fireEvent } from '@testing-library/dom';\nimport '@testing-library/jest-dom/extend-expect';\nimport Rac... | javascript | chosen |
[
{
"from": "system",
"value": "Use parameters for path resolution\n"
},
{
"from": "human",
"value": "/* @flow */\n\nimport Rule from '../Rule'\n\nimport type { Phase } from '../types'\n\nfunction escapePath (filePath) {\n return filePath.replace(/\\\\/g, '\\\\\\\\')\n}\n\nexport default class Pa... | javascript | chosen |
[
{
"from": "system",
"value": "feat(role): Add isAdmin to user store if is admin\n"
},
{
"from": "human",
"value": "'use strict'\nvar rootDir = __dirname.split('/')\nrootDir.pop()\nrootDir = rootDir.join('/')\nvar app =\n{ rootDir: rootDir\n}\nvar Role = require(__dirname + '/../routes/roles/mode... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to use a single local\n"
},
{
"from": "human",
"value": "import { select, local } from \"d3-selection\";\nvar stateLocal = local(),\n renderLocal = local(),\n noop = function (){};\n\nexport default function (tagName, className){\n var render = noop,... | javascript | chosen |
[
{
"from": "system",
"value": "Update up to changes in deferred\n"
},
{
"from": "human",
"value": "// Read all filenames from directory and it's subdirectories\n\n'use strict';\n\nvar call = Function.prototype.call\n , fs = require('fs')\n , aritize = require('es5-ext/lib/Function/proto... | javascript | chosen |
[
{
"from": "system",
"value": "Check if app is mounted\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react';\nimport { Navbar, Nav, NavItem } from 'react-bootstrap';\nimport ImgurImage from './ImgurImage';\nimport { searchGallery } from './../services/imgur';\n\nexport defa... | javascript | chosen |
[
{
"from": "system",
"value": "Add text for mobile devices\n"
},
{
"from": "human",
"value": "import React, {PropTypes} from 'react';\nimport LeftSidebar from \"./views/leftsidebar/LeftSidebar\";\nimport {appComponents} from \"./ConfigMap\";\nimport AppController from \"./controller/AppController... | javascript | chosen |
[
{
"from": "system",
"value": "Add menu,tray,auto-updater to Electron deps\n"
},
{
"from": "human",
"value": "'use strict';\nvar electronModules = ['electron', 'app', 'browser-window', 'crash-reporter', 'remote', 'shell', 'clipboard', 'screen'];\n\nmodule.exports = function redirect(request) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "feat(autocomplete): Allow trieOptions to be passed into autocomplete\n\n- trieOptions to be passed into autocomplete\n- add properties of autocomplete to documentation\n- update autocomplete syntax\n- update event-stream dependency to from and through\n\n[#130668639]\n\nSigned-... | javascript | chosen |
[
{
"from": "system",
"value": "Modify comparator to ensure `namespace` packages are given priority\n"
},
{
"from": "human",
"value": "'use strict';\n\n// FUNCTIONS //\n\n/**\n* Returns a comparison result. If `-1`, `a` comes before `b`. If `1`, `b` comes before `a`. If `0`, the order stays the sa... | javascript | chosen |
[
{
"from": "system",
"value": "Use sinon of the SinonMocha object (which was assigned via enhance)\n"
},
{
"from": "human",
"value": "\n\nvar SinonMocha,\n WrapMethod = require('./sinon/wrap-method'),\n Hooks = require('./mocha-hooks');\n\nSinonMocha = {\n\n sinon: null,\n\n enhance: func... | javascript | chosen |
[
{
"from": "system",
"value": "Add action to toggle tree code\n"
},
{
"from": "human",
"value": "const updateCode = newCode => {\n return { type: 'UPDATE_CODE', newCode };\n};\n\nconst darken = () => {\n return { type: 'DARKEN_THEME' };\n};\n\nconst lighten = () => {\n return { type: 'LIGHTEN_... | javascript | chosen |
[
{
"from": "system",
"value": "Update to the point to start testing with\n"
},
{
"from": "human",
"value": "module.exports = {\n document: {\n title: 'Support Richard King'\n },\n // Placeholders\n header: {},\n main: {},\n footer: {}\n};"
},
{
"from": "gpt",
... | javascript | chosen |
[
{
"from": "system",
"value": "Move to new API format for Settings.\n\nrefs #2606\n- Use new API format when updating settings from the client side\n- Add additional test to test new API format\n- Adjust functional tests to work with the new format\n"
},
{
"from": "human",
"value": "/*global Ghos... | javascript | chosen |
[
{
"from": "system",
"value": "FIx Rollup external not handling core-js module\n"
},
{
"from": "human",
"value": "import resolve from 'rollup-plugin-node-resolve';\nimport commonjs from 'rollup-plugin-commonjs';\nimport babel from 'rollup-plugin-babel';\nimport pkg from './package.json';\n\nexpor... | javascript | chosen |
[
{
"from": "system",
"value": "Fix \"command requires an entity name to be specified\" issue\n"
},
{
"from": "human",
"value": "module.exports = {\n afterInstall: function() {\n return this.addBowerPackageToProject('bootstrap-datepicker');\n }\n};\n"
},
{
"from": "gpt",
"value": ... | javascript | chosen |
[
{
"from": "system",
"value": "Update naming of model Packages to Component\n"
},
{
"from": "human",
"value": "var\n mongoose = require( 'mongoose' );\n db = mongoose.connection;\n \nvar\n Packages = db.model( 'Packages', require( './models/packages' ));\n\nPackages.ensureIndexes(function ( er... | javascript | chosen |
[
{
"from": "system",
"value": "Set mainnet as default network\n"
},
{
"from": "human",
"value": "const AppConstants = {\n //Application name\n appName: 'Nano Wallet',\n\n version: 'BETA 1.1.11',\n\n //Network\n defaultNetwork: -104,\n\n // Ports\n defaultNisPort: 7890,\n d... | javascript | chosen |
[
{
"from": "system",
"value": "refactor: Replace version v3 with v1\n\n"
},
{
"from": "human",
"value": "/* eslint-env serviceworker */\n(function () {\n 'use strict';\n var CACHE_VERSION = 'v3';\n\n self.addEventListener('install', function (event) {\n event.waitUntil(\n caches.open(C... | javascript | chosen |
[
{
"from": "system",
"value": "Remove src/resources from minJS builder.\n"
},
{
"from": "human",
"value": "/**\n * Copyright 2017 Google Inc. All Rights Reserved.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the Lice... | javascript | chosen |
[
{
"from": "system",
"value": "Add an example of parsing a date time string\n"
},
{
"from": "human",
"value": "const moment = require('moment')\n\nlet now = moment()\nconsole.log(now.format('YYYY-MM-DD'))\n"
},
{
"from": "gpt",
"value": "const moment = require('moment')\n\n// Format a... | javascript | chosen |
[
{
"from": "system",
"value": "Remove old reference to ENV.JAMBD\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';\n\nimport ENV from 'experimenter/config/environment';\n\nexport default Ember.R... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor to follow style guidelines\n"
},
{
"from": "human",
"value": "import Ember from 'ember';\nimport ModalMixin from '../mixins/sl-modal';\n\n/**\n * @module components\n * @class sl-simple-modal\n */\nexport default Ember.Component.extend( ModalMixin, {\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Create Error instances when errors happen\n"
},
{
"from": "human",
"value": "var config = require(\"config\")\n , crypto = require(\"crypto\")\n , request = require(\"request\")\n , github = require(\"./github\")\n\nmodule.exports.generateNonce = function (length... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.