conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "system",
"value": "Make startup actually say something\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar io = require('./server');\nvar config = require('./config');\n\nio.listen(config.port);\n"
},
{
"from": "gpt",
"value": "'use strict';\n\nvar io = require... | javascript | chosen |
[
{
"from": "system",
"value": "Allow index to be disabled, or to be multiple files\n"
},
{
"from": "human",
"value": "#!/usr/bin/env node\n\n\"use strict\";\n\nvar program = require('commander'),\n pkg = require('../package.json');\n\nprogram\n .version(pkg.version)\n .option('-p, --port... | javascript | chosen |
[
{
"from": "system",
"value": "Fix smooth curves in graphs\n"
},
{
"from": "human",
"value": "/*\n * charts.defaults.js\n * Copyright (C) 2016 thegrumpydictator@gmail.com\n *\n * This software may be modified and distributed under the terms of the\n * Creative Commons Attribution-ShareAlike 4.0 I... | javascript | chosen |
[
{
"from": "system",
"value": "Add feed to list when added\n"
},
{
"from": "human",
"value": "function Feeds() {\n var self = this;\n \n self.initialized = false;\n self.$view = $(\"#feeds\");\n self.$ul = self.$view.find('> ul');\n\n self.init = function() {\n $('#feeds ... | javascript | chosen |
[
{
"from": "system",
"value": "Clean up JS a bit. Set filter to invert if no previous filter is set.\n"
},
{
"from": "human",
"value": "(function() {\nvar clickCounter = 0;\n\nvar quickFilterListener = (e) => {\n if (e.key === \"MozCameraFocusAdjust\" || e.key === \"Camera\") {\n if (++clickC... | javascript | chosen |
[
{
"from": "system",
"value": "Make the format match the current locale\n"
},
{
"from": "human",
"value": "function initDatePicker(container, elem, pickerOptions) {\n $(container + ' ' + elem).fdatepicker(pickerOptions);\n\n $(container + ' ' + elem + ' i').on('click', function() {\n $(this)... | javascript | chosen |
[
{
"from": "system",
"value": "Fix npm request dependency issue in google-trends\n"
},
{
"from": "human",
"value": "Package.describe({\n name: 'google-trends-map',\n version: '0.0.1',\n summary: '',\n});\n//\n\nPackage.onUse(function(api) {\n api.versionsFrom('1.0.4.2');\n api.use(['imon-dat... | javascript | chosen |
[
{
"from": "system",
"value": "Add comments: explain why we do not use path.relative\n"
},
{
"from": "human",
"value": "var path = require('path');\n\nvar flat = require('./util/flat');\nvar Set = require('./util/set');\n\nfunction getOutput(pkg, www) {\n return flat(pkg.commands.map(function (c... | javascript | chosen |
[
{
"from": "system",
"value": "Add feature to only add new items when title is unique and non-empty.\n"
},
{
"from": "human",
"value": "var PantryItemsController = Em.ArrayController.extend({\n actions: {\n incrementQuantity: function(item) {\n item.incrementProperty('quantity', 1);\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use entry as an array instead of data\n"
},
{
"from": "human",
"value": "const webpack = require(\"webpack\");\nconst webpackDevServer = require('webpack-dev-server');\nconst path = require('path');\nconst baseConfig = require('../config/webpack.config.dist');\n\nco... | javascript | chosen |
[
{
"from": "system",
"value": "Update deprecated config for bodyParser and session\n"
},
{
"from": "human",
"value": "/**\n * Express global configuration\n */\n\nvar express = require('express');\nvar logger = require('morgan');\nvar bodyParser = require('body-parser');\nvar cookieParser = requi... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"changing decodeURIComponent to decodeURI since it was causing problems with URLs with &\"\n\nSome people were having problems where URLs were coming through with an escaped ? as %3F which was not being decoded correctly. Reverting until I can do more research\n\nThis r... | javascript | chosen |
[
{
"from": "system",
"value": "Add eslint rules of typescript.\n"
},
{
"from": "human",
"value": "module.exports = {\n \"parserOptions\": {\n \"ecmaVersion\": 2018,\n \"sourceType\": \"module\"\n },\n \"env\": {\n \"node\": true,\n \"es6\": true\n },\n \"extends\": [\n \"airbn... | javascript | chosen |
[
{
"from": "system",
"value": "Add functionality to outdent lists when the backspace/delete button is pressed and the cursor is right at the beginning of the list item.\n"
},
{
"from": "human",
"value": "export default () => {\n\treturn scribe => {\n\t\tscribe.el.addEventListener('keydown', e => ... | javascript | chosen |
[
{
"from": "system",
"value": "Test if request is the issue\n"
},
{
"from": "human",
"value": "const request = require('request');\nconst jsdom = require('jsdom');\nconst utils = require('../misc/utils');\nconst globals = require('../globals');\nconst database = require('../database/database');\n... | javascript | chosen |
[
{
"from": "system",
"value": "Move jQuery logic into separate functions\n"
},
{
"from": "human",
"value": "$(function() {\n\t//Update \"tied\" elements on each change of the \"fill\" input\n\tinterjector.fillNames.forEach(function(name) {\n\t\t$('#ijtr-fill-' + name).keyup(function() {\n\t\t\t$(... | javascript | chosen |
[
{
"from": "system",
"value": "Exit with code 1 when encountering any issues\n"
},
{
"from": "human",
"value": "const fs = require('fs');\nconst cp = require('child_process');\nconst _ = require('lodash');\n\nconst directory = process.cwd();\n\nmodule.exports = function(config) {\n const fileR... | javascript | chosen |
[
{
"from": "system",
"value": "Add explicit fallback methods to the main object\n"
},
{
"from": "human",
"value": "import { NativeModules } from 'react-native';\nimport GoogleApi from './googleApi.js';\n\nconst { RNGeocoder } = NativeModules;\n\nexport default {\n apiKey: null,\n\n fallbackToGo... | javascript | chosen |
[
{
"from": "system",
"value": "Add tab navigation to project page\n\nSigned-off-by: Walker Crouse <a52c6ce3cf7a08dcbb27377aa79f9b994b446d4c@hotmail.com>\n"
},
{
"from": "human",
"value": "var projectOwner = null;\nvar projectSlug = null;\nvar alreadyStarred = false;\n\n$(function() {\n // setu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix double-encoding of the release notes\n"
},
{
"from": "human",
"value": "'use strict';\nconst open = require('open');\nconst newGithubReleaseUrl = require('./new-github-release-url');\nconst {getTagVersionPrefix} = require('./util');\nconst version = require('./v... | javascript | chosen |
[
{
"from": "system",
"value": "Set up test route to enqueue message\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst express = require('express');\nconst MsgQueueClient = require('msgqueue-client');\n\nconst mqServerConfig = require('../common/config/mqserver.js');\n\nconst app = express... | javascript | chosen |
[
{
"from": "system",
"value": "Add comment about what it is\n"
},
{
"from": "human",
"value": "// Ease function can be a interpolation function as below\nfunction map ( input, inputMin, inputMax, outputMin, outputMax, clamp, ease ) {\n input = ( input - inputMin ) / ( inputMax - inputMin );\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add a note on vendor package path resolver.\n"
},
{
"from": "human",
"value": "// Takes a root path and an array of vendor package declarations and returns a\n// mapping of module names to absolute paths for the given packages.\n// It's similar to `require.resolve()... | javascript | chosen |
[
{
"from": "system",
"value": "change: Move ipc client to ipc-andler.js\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst {ipcRenderer, contextBridge} = require('electron');\n\nconst registeredListeners = {};\n\nfunction handleIPCMessages(event, action, payload) {\n if (typeof this._ch... | javascript | chosen |
[
{
"from": "system",
"value": "Set content security policies and specify Google Fonts to load\n"
},
{
"from": "human",
"value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'pcars-live',\n environment: environment,\n baseURL: '/',\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Remove the \"Trying service\" log."
},
{
"from": "human",
"value": "var Q = require('q');\nvar util = require('util');\n\nmodule.exports.ServiceDispatcher = function() {\n\tthis.services = [];\n};\n\nmodule.exports.ServiceDispatcher.prototype.use = function(service)... | javascript | chosen |
[
{
"from": "system",
"value": "Add basic documentation to umbPasswordToggle\n"
},
{
"from": "human",
"value": "(function () {\n 'use strict';\n\n // comes from https://codepen.io/jakob-e/pen/eNBQaP\n // works fine with Angular 1.6.5 - alas not with 1.1.5 - binding issue\n\n function ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix for overidden editorOptions & set language on creation"
},
{
"from": "human",
"value": "import $ from 'jquery';\nimport 'trumbowyg';\n\n$.trumbowyg.svgPath = '../node_modules/trumbowyg/dist/ui/icons.svg';\n\nexport const editorOptions = {\n btns: [\n ['forma... | javascript | chosen |
[
{
"from": "system",
"value": "Revert \"Set audio quality default value\"\n\nThis reverts commit e4adca4840dc444259d50c1395f6fe5e3c0dbacb.\n"
},
{
"from": "human",
"value": "import {merge, pick} from 'lodash'\n\nconst kStorageKey = 'wukong'\n\nexport function open(state = {}) {\n try {\n retu... | javascript | chosen |
[
{
"from": "system",
"value": "Fix the FastClick import on linux\n"
},
{
"from": "human",
"value": "'use strict';\n\n// CSS\n/*jshint unused:false */\nimport normalize from 'normalize-css/normalize.css';\nimport base from 'base.less/dist/css/base.css';\nimport board from '../styles/utils.css';\ni... | javascript | chosen |
[
{
"from": "system",
"value": "Fix requirejs with tooltipster depends problem\n"
},
{
"from": "human",
"value": "require.config({\n baseUrl: 'app',\n paths: {\n jquery: 'lib/jquery-2.1.3',\n json: 'lib/json',\n d3: 'lib/d3.min',\n 'dagre-d3': 'lib/dagre-d3.min',\n text: 'lib/text... | javascript | chosen |
[
{
"from": "system",
"value": "Add Classification Code to the subjects tests\n"
},
{
"from": "human",
"value": "import { module, test } from 'qunit';\nimport { setupRenderingTest } from 'ember-qunit';\nimport { setupFactoryGuy, make } from 'ember-data-factory-guy';\nimport { render, fillIn, clic... | javascript | chosen |
[
{
"from": "system",
"value": "Fix selection of the submit button in the createNewPerson wdio test\n\nThe test was failing because of not being able to find the button.\n"
},
{
"from": "human",
"value": "import Page from './page'\n\nconst Page_URL = '/people/new'\n\nclass CreatePerson extends Pag... | javascript | chosen |
[
{
"from": "system",
"value": "Add tests for data api requests for industry graph and parallel coords graph\n"
},
{
"from": "human",
"value": "//var expect = require('chai').expect;\nvar app = require('../server.js');\nvar db = require('../backend/models/index');\nvar request = require('supertest... | javascript | chosen |
[
{
"from": "system",
"value": "Check for undefined arrays in modules\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { injectIntl, intlShape } from 'react-intl';\n\nimport ModulesContext, { originalModules } from '../../ModulesContext';\n... | javascript | chosen |
[
{
"from": "system",
"value": "Fix to audit record map\n"
},
{
"from": "human",
"value": "(function(window)\n{\n var Gitana = window.Gitana;\n \n Gitana.AuditRecordMap = Gitana.AbstractMap.extend(\n /** @lends Gitana.AuditRecordMap.prototype */\n {\n /**\n * @constru... | javascript | chosen |
[
{
"from": "system",
"value": "Add support back for Gatsby v1\n"
},
{
"from": "human",
"value": "const FaviconsWebpackPlugin = require('favicons-webpack-plugin');\nconst merge = require('lodash/merge');\n\nconst defaultOptions = {\n logo: './src/favicon.png',\n emitStats: true,\n statsFilename... | javascript | chosen |
[
{
"from": "system",
"value": "Add support for setting the port and reload feature of 'gulp serve'\n"
},
{
"from": "human",
"value": "'use strict';\n\nvar gulp = require('gulp');\nvar webserver = require('gulp-webserver')\n\nmodule.exports = function(options) {\n\n function server(paths) {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Abort if req.flick doesn't exists (ie. the `payload()` hasn't been called/used).\n"
},
{
"from": "human",
"value": "\nfunction handle( req, res, done )\n{\n var payload = req.flick.payload,\n repository = payload.repository.owner.name + '/' + payload.repos... | javascript | chosen |
[
{
"from": "system",
"value": "Fix Backbone TodoMVC E2E test.\n"
},
{
"from": "human",
"value": "var helpers = require(\"./helpers\")\n\ndescribe('Backbone TodoMVC', function() {\n it(\"Loads the app and creates a new todo item\", function(){\n helpers.loadPage('http://localhost:9999/de... | javascript | chosen |
[
{
"from": "system",
"value": "Use member cookie on comment API\n\nrefs https://github.com/TryGhost/Team/issues/1664\n"
},
{
"from": "human",
"value": "const debug = require('@tryghost/debug')('comments');\nconst errorHandler = require('@tryghost/mw-error-handler');\nconst cors = require('cors');... | javascript | chosen |
[
{
"from": "system",
"value": "Fix pause_soundfile example in Safari by calling getAudioContext().resume() on user interaction before any other audio code\n"
},
{
"from": "human",
"value": "// ====================\n// DEMO: pause sound when the user presses a key, resume on release\n// ==========... | javascript | chosen |
[
{
"from": "system",
"value": "Add region parameter to geocoding by query function\n"
},
{
"from": "human",
"value": "(function () {\n angular\n .module(\"ng-geocoder\")\n .factory(\"ngGeocoderService\", ngGeocoderService);\n\n ngGeocoderService.$inject = [\"$q\"];\n\n function ngGeocode... | javascript | chosen |
[
{
"from": "system",
"value": "Remove box geometry offset arguments.\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function addBoxGeometry( geometry, width, height, depth, dx, dy, dz ) {\n dx = dx || 0;\n dy = dy || 0;\n dz = dz || 0;\n\n var halfWidth = width / 2;\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Fix indentation; use arrow function\n"
},
{
"from": "human",
"value": "import geojs from 'geojs/geo.js';\nimport VisComponent from '../../VisComponent';\n\nexport default class Geo extends VisComponent {\n\n constructor (el, options) {\n super(el);\n\n this.p... | javascript | chosen |
[
{
"from": "system",
"value": "Add refresh to trades view."
},
{
"from": "human",
"value": "\"use strict\";\n\n(function () {\n angular\n .module(\"argo\")\n .factory(\"tradesService\", tradesService);\n\n tradesService.$inject = [\"$http\", \"$q\", \"sessionService\"];\n f... | javascript | chosen |
[
{
"from": "system",
"value": "Add small change for retina\n"
},
{
"from": "human",
"value": "'use strict';\n\nimport PIXI from 'pixi.js';\nimport RendererStore from '../stores/RendererStore.js';\n\nexport default class Renderer extends PIXI.WebGLRenderer {\n\n constructor(...args) {\n\n this... | javascript | chosen |
[
{
"from": "system",
"value": "Update annotations count when setting status from dropdown\n"
},
{
"from": "human",
"value": "import React, { Component, PropTypes } from 'react';\nimport Relay from 'react-relay';\n\nclass CreateStatusMutation extends Relay.Mutation {\n getMutation() {\n return... | javascript | chosen |
[
{
"from": "system",
"value": "fix(suspension/actionButton): Reorder action button in toolbar\n\nrelated to CAM-1403\n"
},
{
"from": "human",
"value": "ngDefine('cockpit.plugin.base.views', ['require'], function(module, require) {\r\n\r\n var Controller = [ '$scope', '$dialog',\r\n function($... | javascript | chosen |
[
{
"from": "system",
"value": "Test with just one token...\n"
},
{
"from": "human",
"value": "import _ from \"lodash\";\nimport expressJwt from \"express-jwt\";\n\nexport const secret = (req, tokenPayload, cb) => {\n console.info(\"req\", req);\n console.info(\"tokenPayload\", tokenPayload)... | javascript | chosen |
[
{
"from": "system",
"value": "Add a unit test for wait(fn).\n"
},
{
"from": "human",
"value": "import ghost from 'ghostjs'\nimport assert from 'assert'\n\ndescribe('ghost#wait', () => {\n it('wait for an arbitrary amount of time', async () => {\n var val = false\n setTimeout(() => {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Switch enabled and selector columns\n"
},
{
"from": "human",
"value": "import m from 'mithril';\n\nexport const OptionsDisplayTableHeader = () => ({\n view() {\n return m('thead', [\n m('tr', [\n m('th', 'Name'),\n m('th', 'Pattern'),\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Use connectIf to ensure web connection\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nmodule.exports = function (grunt) {\n\n grunt.registerTask(\"fixInstrument\", function () {\n // Because code generation uses templates that are instrumented, the ... | javascript | chosen |
[
{
"from": "system",
"value": "Use var to delare a variable.\n"
},
{
"from": "human",
"value": "\n/**\n * Module dependencies.\n */\n\nvar uubench = require('uubench')\n , natural = require('../');\n\nfs = require('fs');\nmetaphone = natural.Metaphone.process;\nsoundex = natural.SoundEx.process;... | javascript | chosen |
[
{
"from": "system",
"value": "Add scrolling hack for iOS full screen so the canvas takes up the whole page and disables scrolling.\n"
},
{
"from": "human",
"value": "'use strict';\nvar GameData = require('../prefabs/gamedata');\n\nfunction Menu() {}\n\nMenu.prototype = {\n preload: function() {... | javascript | chosen |
[
{
"from": "system",
"value": "Change formatting in JS files [skip ci]\n"
},
{
"from": "human",
"value": "const types = require('./types');\n\n\n/**\n * Redux action creator. Returns action for adding a post.\n * @param {object} post Posts data\n * @return {object} Action\n */\nfunction addPost(... | javascript | chosen |
[
{
"from": "system",
"value": "Call navigator.app instead of window.app - since window.app will probably be removed.\n"
},
{
"from": "human",
"value": "document.write('<script type=\"text/javascript\" charset=\"utf-8\" src=\"../phonegap-0.9.6.1.js\"></script>');\ndocument.write('<script type=\"te... | javascript | chosen |
[
{
"from": "system",
"value": "Replace <Button variant=\"fab\" /> with new <Fab />\n"
},
{
"from": "human",
"value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles, Button } from '@material-ui/core';\n\nconst styles = theme => ({\n FAButton: {\n position... | javascript | chosen |
[
{
"from": "system",
"value": "Bump min width to 300\n"
},
{
"from": "human",
"value": "import React, { PropTypes } from 'react';\n\nexport function getDefaultStyle(props) {\n let { left, right, bottom, top } = props;\n if (typeof left === 'undefined' && typeof right === 'undefined') {\n rig... | javascript | chosen |
[
{
"from": "system",
"value": "Change ExtendedUser to Member in resolver\n"
},
{
"from": "human",
"value": "module.exports = {\n type: 'member',\n resolve: (content, { bot = false }, msg) => {\n const guild = msg.channel.guild\n if (!msg.mentions.length) {\n content = String(content)... | javascript | chosen |
[
{
"from": "system",
"value": "Create variables and initial loop\n"
},
{
"from": "human",
"value": "// Harmless Ransom Note\n\n/* Rules:\n Takes two parameters\n First will be the note we want to write as a string.\n The second will be the magazine text we have available to make the note o... | javascript | chosen |
[
{
"from": "system",
"value": "Add 'lynch' color to logo\n"
},
{
"from": "human",
"value": "import React, { Component } from 'react'\nimport { Link, IndexLink } from 'react-router'\n\nexport class Nav extends Component {\n constructor(props) {\n super(props)\n }\n\n render() {\n return (... | javascript | chosen |
[
{
"from": "system",
"value": "Fix stubs not getting cleaned up between tests"
},
{
"from": "human",
"value": "import {sandbox as sinonSandbox} from 'sinon';\nimport config from '../../lib/core/config';\nimport loggers from '../../lib/core/loggers';\n\nlet sandbox, stubs;\n\nexport default functi... | javascript | chosen |
[
{
"from": "system",
"value": "Fix and readd old tests\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nvar assert = require('chai').assert;\nvar xdTesting = require('../../lib/index')\nvar templates = require('../../lib/templates');\n\ndescribe.skip('MultiDevice - WebdriverIO commands', fun... | javascript | chosen |
[
{
"from": "system",
"value": "Fix typos in Mocha global cleanup code\n"
},
{
"from": "human",
"value": "// Mocha globals.\nconst { describe, it, beforeEach, afterEach, before, after } = global;\n\nexport {\n describe as runnerDescribe,\n it as runnerIt,\n beforeEach as runnerBeforeEach,\n af... | javascript | chosen |
[
{
"from": "system",
"value": "Use load-grunt-tasks to load all task modules specified in package.json\n"
},
{
"from": "human",
"value": "/*\n * cfpathcheck\n * https://github.com/timbeadle/cfpathcheck\n *\n * Copyright (c) 2015 Tim Beadle\n * Licensed under the MIT license.\n */\n\nmodule.export... | javascript | chosen |
[
{
"from": "system",
"value": "Enable linux 32 & win build\n"
},
{
"from": "human",
"value": "/* jshint node: true */\nmodule.exports = function(grunt) {\n\n var NW_VERSION = '0.8.3';\n\n // linudev.so.0 workaround, see README.md\n process.env.LD_LIBRARY_PATH = '.:' + process.env.LD_LIBRARY_PA... | javascript | chosen |
[
{
"from": "system",
"value": "Add test task back to release task\n"
},
{
"from": "human",
"value": "'use strict';\n\nmodule.exports = function(grunt) {\n\n // Config\n // ---\n\n grunt.initConfig({\n\n // package.json\n pkg: grunt.file.readJSON('package.json'),\n\n // `clean`\n cl... | javascript | chosen |
[
{
"from": "system",
"value": "Add bundleInstall as default task if loaded.\n"
},
{
"from": "human",
"value": "module.exports = function(grunt) {\n\n // Initialize global configuration variables.\n var config = grunt.file.readJSON('Gruntconfig.json');\n grunt.initConfig({\n config: config\n... | javascript | chosen |
[
{
"from": "system",
"value": "Use Rest connect reomte, failed by Access-Control-Allow-Origin\n"
},
{
"from": "human",
"value": "import { types } from '../reducers';\n\nexport function loadDeviceTypes() {\n let deviceTypes = ['燃烧器', '锅炉', '天气检测'];\n return {\n type: types.INIT_DEVICE_TYPE,\n... | javascript | chosen |
[
{
"from": "system",
"value": "Put workspaces in a top-level Firebase key\n"
},
{
"from": "human",
"value": "import values from 'lodash/values';\nimport {Promise} from 'es6-promise';\nimport appFirebase from '../services/appFirebase';\n\nclass FirebasePersistor {\n constructor(user) {\n this.... | javascript | chosen |
[
{
"from": "system",
"value": "Make selector for PostComment more granular\n\nThis helps to avoid re-rendering of all the post's comments when author\nupdates the post's text/attachments/etc, since we only need\npost[id].createdBy there, which is never changed.\n"
},
{
"from": "human",
"value": "... | javascript | chosen |
[
{
"from": "system",
"value": "Test that keydown event resets the timeout\n"
},
{
"from": "human",
"value": "(function($) {\n/*\n\t\t======== A Handy Little QUnit Reference ========\n\t\thttp://docs.jquery.com/QUnit\n\n\t\tTest methods:\n\t\t\texpect(numAssertions)\n\t\t\tstop(increment)\n\t\t\ts... | javascript | chosen |
[
{
"from": "system",
"value": "Test Keyv accepts storage adapters\n"
},
{
"from": "human",
"value": "import test from 'ava';\nimport Keyv from '../';\n\ntest('Keyv is a class', t => {\n\tt.is(typeof Keyv, 'function');\n\tt.throws(() => Keyv()); // eslint-disable-line new-cap\n\tt.notThrows(() => ... | javascript | chosen |
[
{
"from": "system",
"value": "Use forEach() instead of map() where result is discarded\n"
},
{
"from": "human",
"value": "import jsonPath from 'JSONPath';\n\nexport default function (blob, config) {\n const json = blob.toJSON();\n\n Object.entries(config).map(([path, linker]) => {\n jsonPat... | javascript | chosen |
[
{
"from": "system",
"value": "Add button to submit issue form and start timer\n"
},
{
"from": "human",
"value": "if (!window.hasRedmineTimeTracker) {\n // なぜか2回呼ばれる場合があるので、重複してロードしないようにする\n window.hasRedmineTimeTracker = true;\n\n $(function() {\n 'use strict';\n\n var issueId = pickIss... | javascript | chosen |
[
{
"from": "system",
"value": "Fix babel transform error handling\n"
},
{
"from": "human",
"value": "import path from 'path'\n\nexport default class BabelTransform {\n constructor(config = {}, options = {}) {\n this.options = {\n skipOnError: true, // When false, errors will ... | javascript | chosen |
[
{
"from": "system",
"value": "Allow user colour to be 'default'\n"
},
{
"from": "human",
"value": "/** @module */\n\nimport * as TextFormatting from '@/helpers/TextFormatting';\nimport { def } from './common';\n\nexport default class UserState {\n constructor(user) {\n this.nick = user... | javascript | chosen |
[
{
"from": "system",
"value": "TUI-30: Write unit tests for the TwoStageButton control.\n"
},
{
"from": "human",
"value": "describe(\"TwoStageButton\", function () {\n var buttonElement;\n var $buttonElement;\n var twoStageButton;\n\n beforeEach(function () {\n buttonElement = ... | javascript | chosen |
[
{
"from": "system",
"value": "Add checks to test the authentication routes\n"
},
{
"from": "human",
"value": "'use strict';\n\nconst expect = require('chai').expect;\nconst supertest = require('supertest');\nconst server = require('./../../index');\nconst api = supert... | javascript | chosen |
[
{
"from": "system",
"value": "Fix bug in multiple input fields interaction for media section\n"
},
{
"from": "human",
"value": "define('media-input', ['jquery', 'z'], function($, z) {\n \n function createInput($section) {\n $section.append($('<input>', { \n type: 'url', \... | javascript | chosen |
[
{
"from": "system",
"value": "Use jQuery objects for appending inputs\n"
},
{
"from": "human",
"value": "define('media-input', ['jquery', 'z'], function($, z) {\n \n function createInput($section) {\n $section.append('<input type=\"text\" placeholder=\"' + $section.attr('data-placeh... | javascript | chosen |
[
{
"from": "system",
"value": "Remove sample app dependency from unit tests\n\nThe point of the unit test for 'tupas/ok' route is to verify\nthat it will send an error event if verifying query parameters\nfails (with empty POST payload). There's no need to use sample\napp for this (it could well have its own... | javascript | chosen |
[
{
"from": "system",
"value": "Include Var and VarTable module\n"
},
{
"from": "human",
"value": "/**\n * Created by chengfulin on 2015/4/20.\n */\nexports.Def = require('./def');\nexports.DUPair = require('./dupair');\nexports.DFA = require('./dfa');\nexports.DUA = require('./dua');\nexports.Rea... | javascript | chosen |
[
{
"from": "system",
"value": "Reset input value so that when you return previous url is cleared\n"
},
{
"from": "human",
"value": "const { h, Component } = require('preact')\n\nclass UrlUI extends Component {\n constructor (props) {\n super(props)\n this.handleClick = this.handleClick.bin... | javascript | chosen |
[
{
"from": "system",
"value": "Update to avoid copyright issue\n"
},
{
"from": "human",
"value": "'use strict'\n\nclass Ball {\n\n constructor(name) {\n this.name = name;\n }\n\n catchPokemon() {\n console.log(`${this.name} threw.`);\n }\n}\n\nclass PokeBall extends Ball {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Refactor level navigation into event.\n"
},
{
"from": "human",
"value": "import { store } from './index';\n\nexport const tileUpClicked = clicked_tile => event => {\n let current_level = store.getState().current_level();\n let down_clicked_tile = current_level.boa... | javascript | chosen |
[
{
"from": "system",
"value": "Fix a bug after Last.fm site update\n"
},
{
"from": "human",
"value": "export function getTitle() {\n var titleEl = document.querySelector('h1.header-title');\n if (titleEl) {\n var title = titleEl.textContent;\n\n title = title.trim();\n\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add export of Experiment Example to use in tests\n"
},
{
"from": "human",
"value": "var example = {\n name : 'Paper chaser',\n hypothesis : '5g is the best weight for planes',\n kind : 'ad_hoc',\n dependentVariable: {\n name : 'Flight length',\n measures :... | javascript | chosen |
[
{
"from": "system",
"value": "Change default ip to 0.0.0.0\n"
},
{
"from": "human",
"value": "var express = require('express');\nvar app = express();\nvar morgan = require('morgan');\n\nvar port = process.env.PORT0 || 3000;\nvar host = process.env.HOST || \"127.0.0.1\";\n\napp.use(morgan('combin... | javascript | chosen |
[
{
"from": "system",
"value": "Reduce complexity of code as requested by codacy...\n"
},
{
"from": "human",
"value": "function eventsourcetest() {\n var alInfo = $(\"#alInfo\");\n var alSuccess = $(\"#alSuccess\");\n var ta = document.getElementById(\"output\");\n var source = new Eve... | javascript | chosen |
[
{
"from": "system",
"value": "Use others to pick box props from\n"
},
{
"from": "human",
"value": "import React, { PureComponent } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\n\nimport InputBase from './InputBase';\nimport Box, { omitBoxProps, pickBoxProps } ... | javascript | chosen |
[
{
"from": "system",
"value": "Add _id getter as .id property\n"
},
{
"from": "human",
"value": "const BlacklistModel = require('../../models/Blacklist.js').model\nconst Base = require('./Base.js')\n\nclass Blacklist extends Base {\n constructor (data, _saved) {\n super(data, _saved)\n\n i... | javascript | chosen |
[
{
"from": "system",
"value": ":art: Move BottomTab's child element creation logic from attachedCallback to prepare\n"
},
{
"from": "human",
"value": "'use strict';\n\nclass BottomTab extends HTMLElement{\n prepare(name){\n this.name = name\n this.attached = false\n this.active = false\... | javascript | chosen |
[
{
"from": "system",
"value": "Load OSM tiles via https\n"
},
{
"from": "human",
"value": "\"use strict\";\n\nimport React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport Leaflet from \"leaflet\";\n\nexport default class DocMap extends React.Component {\n componentDidMount() {\n ... | javascript | chosen |
[
{
"from": "system",
"value": "Add Johannes to mailing list\n"
},
{
"from": "human",
"value": "const fetch = require('node-fetch');\nconst postmark = require('postmark');\nconst apiKey = process.env.POSTMARK_API_KEY;\nconst client = new postmark.Client(apiKey);\n\nfetch('https://motd.today/data.j... | javascript | chosen |
[
{
"from": "system",
"value": "Fix missing fontawesome icon (it's now a pro feature) & add train for Train station messages\n"
},
{
"from": "human",
"value": "import React, {Component} from 'react';\n\n/*\n* Displays informational message\n*/\nclass MessageRow extends Component {\n\n render() ... | javascript | chosen |
[
{
"from": "system",
"value": "Exit correctly on test errors\n"
},
{
"from": "human",
"value": "const gulp = require('gulp');\nconst jshint = require('gulp-jshint');\nconst mocha = require('gulp-mocha');\nconst istanbul = require('gulp-istanbul');\n\n\ngulp.task('lint', function() {\n return g... | javascript | chosen |
[
{
"from": "system",
"value": "Split gulp build into parts\n"
},
{
"from": "human",
"value": "var gulp = require(\"gulp\"),\n\tjade = require(\"gulp-jade\"),\n\tminCSS = require(\"gulp-minify-css\"),\n\tminHTML = require(\"gulp-minify-html\"),\n\treact = require(\"gulp-react\"),\n\tuglif... | javascript | chosen |
[
{
"from": "system",
"value": "Add possibility to override controller's resolver\n"
},
{
"from": "human",
"value": "/**\n * Controllers initialization phase.\n *\n * This phase configures a Maglev application with the required mechanisms\n * to resolve and instantiate controllers.\n *\n * It is r... | javascript | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.