conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update text accessors for WD\nPass all tests" }, { "from": "human", "value": "/**@class\tA matcher piece that calls `compare` on its element's text.\n*/\nvar TextExtractor = new Class( /** @lends matchers.TextExtractor# */ {\n\t/** The attribute that should be extra...
javascript
chosen
[ { "from": "system", "value": "Revert \"revert data and layout role to be object\"\n\nThis reverts commit 655508a7309da2bd89265c1ab469bae7034a56a4.\n" }, { "from": "human", "value": "/**\n* Copyright 2012-2021, Plotly, Inc.\n* All rights reserved.\n*\n* This source code is licensed under the MIT ...
javascript
chosen
[ { "from": "system", "value": "Remove logic on update remote\n" }, { "from": "human", "value": "var fs = require('fs');\nvar moment = require('moment');\nvar rank = require('librank').rank;\n\n// data backup path\nvar data_path = \"./data/talks/\";\n\n// read all files in the database\nvar res = ...
javascript
chosen
[ { "from": "system", "value": "Update quickjs installer per latest upstream changes\n\nCloses #87.\n" }, { "from": "human", "value": "// Copyright 2019 Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the “License”);\n// you may not use this file except in compliance with the L...
javascript
chosen
[ { "from": "system", "value": "Fix conflict with jQuery and prototype\n" }, { "from": "human", "value": "$(function () {\n ZeroClipboard.config({swfPath: $('[data-swf-path]').data('swf-path')});\n\n $('pre').each(function () {\n if (!$(this).find('code').length) {\n var co...
javascript
chosen
[ { "from": "system", "value": "PlaneLabelOverlay: Use `offsetWidth` instead of jQuery\n" }, { "from": "human", "value": "import Component from '@ember/component';\n\nimport $ from 'jquery';\nimport ol from 'openlayers';\n\nexport default class PlaneLabelOverlay extends Component {\n tagName = ''...
javascript
chosen
[ { "from": "system", "value": "Test against testting as default ember port.\n" }, { "from": "human", "value": "\"use strict\";\nconst test = require('tape');\nconst randoPort = require('../../lib/randoport');\nconst _ = require('lodash');\n\ntest('empty object', t => {\n t.plan(1);\n\n const em...
javascript
chosen
[ { "from": "system", "value": "Store the line data that is collected while dragging." }, { "from": "human", "value": "/*\n * Copyright (c) 2011 Kevin Decker (http://www.incaseofstairs.com/)\n * See LICENSE for license information\n */\n$(document).ready(function() {\n var canvas = document.get...
javascript
chosen
[ { "from": "system", "value": "Remove console log and rework vars.\n" }, { "from": "human", "value": "document.getElementById('generate').onclick = genPassword;\n\nfunction getRandomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1)) + min;\n}\n\nfunction genPassword() {\n ...
javascript
chosen
[ { "from": "system", "value": "Allow bs snippet to read the port from config" }, { "from": "human", "value": "module.exports = [\n\t'\\n\\n\\n',\n\t'/**',\n\t' * DEVELOPMENT MODE ONLY',\n\t' *',\n\t' * Browser-sync script loader',\n\t' * to enable script/style injection',\n\t' *',\n\t' * Run \"gu...
javascript
chosen
[ { "from": "system", "value": "Build CommentList and CommentForm components\n" }, { "from": "human", "value": "var CommentBox = React.createClass({\n render: function() {\n return (\n <div className=\"commentBox\">\n Hello, world! I am a CommentBox.\n </div>\n );\n }\n});...
javascript
chosen
[ { "from": "system", "value": "Enable other packages to use random tips feature\n\n ref #6\n" }, { "from": "human", "value": "'use babel';\n\nlet InteractiveConfigurationPanel = null;\n\nexport default {\n initialize() {\n if (InteractiveConfigurationPanel !== null) return ;\n\n Interacti...
javascript
chosen
[ { "from": "system", "value": "Add key to list to optimise rendering\n" }, { "from": "human", "value": "import React from \"react\"\nimport classes from \"./HeaderBar.module.css\"\nimport Logo from \"../../assets/sGonksLogo.png\"\nimport { Link, NavLink } from \"react-router-dom\"\nimport LinkBut...
javascript
chosen
[ { "from": "system", "value": "Add button type to select\n" }, { "from": "human", "value": "var $ = require('jquery');\n\nmodule.exports = {\n\n\t$doc: $(document),\n\n\tsetupDom: function () {\n\n\t\tthis.$el = $(this.element);\n\n\t\tthis.$el.addClass(this.options.classes.originalSelect);\n\n\t...
javascript
chosen
[ { "from": "system", "value": "Move named item loop to the right scope" }, { "from": "human", "value": "define(['itemObjectModel'], function(itemOM) {\n\n 'use strict';\n \n function open(item) {\n \n function onSubitem(subitem) {\n switch(subitem.dataset.resourceType) {\n case...
javascript
chosen
[ { "from": "system", "value": "Load service w/ apt items\n" }, { "from": "human", "value": "// Module dependencies.\nvar express = require('express');\nvar router = express.Router();\nvar api = {};\n\n// ALL\napi.appointmentItems = function(req) {\n return req.store.recordCollection('Appointment...
javascript
chosen
[ { "from": "system", "value": "Fix UI filters on Feature Flags page\n" }, { "from": "human", "value": "hqDefine('toggle_ui/js/flags', [\n 'jquery',\n 'knockout',\n 'reports/js/config.dataTables.bootstrap',\n 'hqwebapp/js/components.ko', // select toggle widget\n], function (\n $...
javascript
chosen
[ { "from": "system", "value": "Fix error with undeclared variable\n\nLooks like a simple missprint for me" }, { "from": "human", "value": "\nexports.init = init;\n\nfunction init(genericAWSClient) {\n return createSimpleQueueServiceClient;\n\n function createSimpleQueueServiceClient(accessKeyId...
javascript
chosen
[ { "from": "system", "value": "Add link to documentation in blueprint\n" }, { "from": "human", "value": "/*jshint node:true*/\n'use strict';\n\nmodule.exports = function(/* environment, appConfig */) {\n return {\n name: \"<%= name %>\",\n short_name: \"<%= name %>\",\n description: \"\...
javascript
chosen
[ { "from": "system", "value": "Leverage command line validation via @dickeyxxx\n" }, { "from": "human", "value": "'use strict';\n\nlet cli = require('heroku-cli-util');\nlet request = require('request');\n\nmodule.exports = {\n topic: 'builds',\n command: 'output',\n needsAuth: true,\n ne...
javascript
chosen
[ { "from": "system", "value": "Fix failing test by adapting it to new conditions\n\nThe test failed, because there were two entries\n'transform-object-rest-spread' in the options.plugins array.\n\nThis has most likely to do with src/config.js which declares\n'transform-object-rest-spread' as a default plugin...
javascript
chosen
[ { "from": "system", "value": "Fix issue caused by Rollup.js having a nervous breakdown if an import from a dependency includes a forward flash.\n" }, { "from": "human", "value": "import babel from 'rollup-plugin-babel'\nimport resolve from '@rollup/plugin-node-resolve'\nimport json from '@rollup...
javascript
chosen
[ { "from": "system", "value": "Bump version to 1.0.0 for first release\n" }, { "from": "human", "value": "Package.describe({\n name: 'klaussner:svelte',\n version: '0.0.1',\n summary: 'Use the magical disappearing UI framework in Meteor',\n git: 'https://github.com/klaussner/meteor-svelte.git...
javascript
chosen
[ { "from": "system", "value": "Change version number to 0.1.3\n" }, { "from": "human", "value": "Package.describe({\n name: 'extremeandy:es6-promisify',\n version: '0.1.2',\n summary: 'es6-promisify for Meteor',\n git: 'https://github.com/extremeandy/meteor-es6-promisify',\n documentation: '...
javascript
chosen
[ { "from": "system", "value": "Fix describtion of String.prototype.trim examples\n" }, { "from": "human", "value": "describe('String#trim', function () {\n\n it('should be defined', function () {\n assert('Some text').should(respondTo, 'trim');\n });\n\n it('should remove spaces a...
javascript
chosen
[ { "from": "system", "value": "Add spin to rollup's externals.\n" }, { "from": "human", "value": "import resolve from 'rollup-plugin-node-resolve';\nimport commonjs from 'rollup-plugin-commonjs';\nimport pug from 'rollup-plugin-pug';\nimport babel from 'rollup-plugin-babel';\n\nexport default {\n...
javascript
chosen
[ { "from": "system", "value": "Refactor creating buttons for letters\n" }, { "from": "human", "value": "import React, { Component } from 'react';\n\nclass Letters extends Component {\n\n constructor(props) {\n super(props);\n this.state = { type: props.statement };\n }\n\n\n render() {\n...
javascript
chosen
[ { "from": "system", "value": "Fix emoji byte length issue\n" }, { "from": "human", "value": "// These should be easily identifiable and both visually and conceptually unique\n// Don't include symbols that could be misconstrued to have some actual meaning\n// (like a warning sign)\nconst emojis =...
javascript
chosen
[ { "from": "system", "value": "Add documentation comment at top of file\n" }, { "from": "human", "value": "var GOVUK = GOVUK || {};\n\nGOVUK.performance = GOVUK.performance || {};\n\nGOVUK.performance.stageprompt = (function () {\n\n var setup, setupForGoogleAnalytics, splitAction;\n\n splitAct...
javascript
chosen
[ { "from": "system", "value": "Use trim method in javascript\n" }, { "from": "human", "value": "function setAriaCurrent() {\n\tvar title = document.title;\n\tif title== \"Comunidad hispanohablante de NVDA \" {\n\t\tvar id = \"inicio\"\n\t}\n\tdocument.getElementById(id).removeAttribute(\"accesske...
javascript
chosen
[ { "from": "system", "value": "Refactor odd even sort to reduce duplication\n" }, { "from": "human", "value": "/**\n * @license\n * js-sorting <http://github.com/Tyriar/js-sorting>\n * Copyright 2014-2015 Daniel Imms <http://www.growingwiththeweb.com>\n * Released under the MIT license <http://gi...
javascript
chosen
[ { "from": "system", "value": "Improve error logging in uglify worker\n" }, { "from": "human", "value": "var uglify;\ntry {\n uglify = require('uglify-js');\n} catch (err) { /* NOP */ }\n\nprocess.on('message', function(msg) {\n var outputFile = msg.output,\n data = msg.data,\n source...
javascript
chosen
[ { "from": "system", "value": "Add code to enable React devtools" }, { "from": "human", "value": "/** @jsx React.DOM */\n'use strict';\n\nvar React = require('react'),\n App = require('./App');\n\nReact.renderComponent(<App />, document.body);" }, { "from": "gpt", "value": "/** @js...
javascript
chosen
[ { "from": "system", "value": "Fix app_domain env for build app\n" }, { "from": "human", "value": "const config = {\n nodeEnv: process.env.NODE_ENV,\n webConcurrency: process.env.WEB_CONCURRENCY || 1,\n port: process.env.PORT || 1337,\n apiUrl: process.env.API_URL || 'http://localhost:3000',\...
javascript
chosen
[ { "from": "system", "value": "Bump version to 0.3.3 & update mosca version to 2.1.0\n" }, { "from": "human", "value": "Package.describe({\n name: 'metemq:metemq',\n version: '0.3.2',\n // Brief, one-line summary of the package.\n summary: 'MeteMQ',\n // URL to the Git repository containing ...
javascript
chosen
[ { "from": "system", "value": "Add uploaded as a dep.\n" }, { "from": "human", "value": "Package.describe({\n summary: \"A meteorite package that makes building dynamic two way forms easy\",\n version: '0.2.1',\n name: \"joshowens:simple-form\",\n git: 'https://github.com/MeteorClub/simple-fo...
javascript
chosen
[ { "from": "system", "value": "Use `process.stdout.write()` instead of `console.log()` so output is flushed.\n" }, { "from": "human", "value": "export default ({ compiled: { html }, file }) =>\n new Promise(resolve => {\n // eslint-disable-next-line\n console.log(`<!-- FILE: ${file} -->\\n...
javascript
chosen
[ { "from": "system", "value": "Fix subscription handler from refactor\n" }, { "from": "human", "value": "import { BaseHandler, METHODS } from '@r/platform/router';\nimport * as subredditActions from 'app/actions/subreddits';\n\nexport default class ToggleSubredditSubscription extends BaseHandler ...
javascript
chosen
[ { "from": "system", "value": "Fix code after a bad rebase/merge\n" }, { "from": "human", "value": "Artist = (function(){\n\n // Artist constructor. Given an object describing an artist, copy\n // all of its local properties into `this'.\n var Artist = function(record) {\n };\n\n Artist.pro...
javascript
chosen
[ { "from": "system", "value": "Make locale tests into one test\n" }, { "from": "human", "value": "import test from \"ava\";\n\nconst fs = require(\"fs\");\nconst path = require(\"path\");\n\nconst localesPath = path.join(__dirname, \"..\", \"locales\");\nfs.readdir(localesPath, (err, filenames) =...
javascript
chosen
[ { "from": "system", "value": "Add name to footer message\n" }, { "from": "human", "value": "/*\n * Footer Messages\n *\n * This contains all the text for the Footer component.\n */\nimport { defineMessages } from 'react-intl';\n\nexport default defineMessages({\n header: {\n id: 'app.compone...
javascript
chosen
[ { "from": "system", "value": "Add test for media type w/ params\n" }, { "from": "human", "value": "\"use strict\";\n\nvar Router = require(\"../router\");\n\nexports.testValidAcceptHeader = function (test) {\n\tvar results = Router.prototype._parseAcceptHeader(\"application/json\");\n\ttest.deep...
javascript
chosen
[ { "from": "system", "value": "Fix computed properties were causing some issues with duplicated data props\n" }, { "from": "human", "value": "/**\n * Simple component to display a font icon (i.e. glyphicon or fontawesome)\n */\nconst React = require('react');\nconst classNames = require('classnam...
javascript
chosen
[ { "from": "system", "value": "Use try/catch to handle cases where the decryption could fail\n" }, { "from": "human", "value": "import { createTransform } from 'redux-persist';\nimport CryptoJSCore from 'crypto-js/core';\nimport AES from 'crypto-js/aes';\nimport { makeEncryptor, makeDecryptor } f...
javascript
chosen
[ { "from": "system", "value": "Remove extra semicolon to appease the linter\n" }, { "from": "human", "value": "export default function serviceColor(serviceTypeId) {\n const Colors = {\n purple: '#e8e9fc',\n orange: '#ffe7d6',\n green: '#e8fce8',\n gray: '#eee'\n };\n\n const map = ...
javascript
chosen
[ { "from": "system", "value": "Update resource name in breadcrumbs if it has been changed (WAL-347)\n" }, { "from": "human", "value": "export const resourceBreadcrumbs = {\n template: '<breadcrumbs items=\"$ctrl.items\" active-item=\"$ctrl.activeItem\"/>',\n bindings: {\n resource: '<'\n },...
javascript
chosen
[ { "from": "system", "value": "Revert \"Remove commonjs in top level\"\n\nThis reverts commit a2690e601c457d27966adc6d074b9966f906e1b7.\n" }, { "from": "human", "value": "import commonjs from '@rollup/plugin-commonjs';\nimport glslify from 'rollup-plugin-glslify';\nimport resolve from '@rollup/pl...
javascript
chosen
[ { "from": "system", "value": "Bring back noConflict functionality for umd module\n\nRollup provides an out-of-the-box option for this, thus not going to\ntest (generated).\n" }, { "from": "human", "value": "import { terser } from \"rollup-plugin-terser\";\nimport filesize from \"rollup-plugin-fi...
javascript
chosen
[ { "from": "system", "value": "Increase waitforTimeout to 60 seconds\n" }, { "from": "human", "value": "exports.config = {\n specs: [ './test/**/*.js' ],\n exclude: [ ],\n\n sync: true,\n logLevel: 'silent',\n coloredLogs: true,\n bail: 0,\n\n screenshotPath: 'screenshots',\n baseUrl: 'ht...
javascript
chosen
[ { "from": "system", "value": "Disable globalShortcut spec on Windows CI\n" }, { "from": "human", "value": "const {globalShortcut} = require('electron').remote\nconst assert = require('assert')\n\ndescribe('globalShortcut module', () => {\n beforeEach(() => {\n globalShortcut.unregisterAll()\...
javascript
chosen
[ { "from": "system", "value": "GF-5039: Add a call for changed method in create time\n\nEnyo-DCO-1.1-Signed-off-by: David Um <david.um@lge.com>\n" }, { "from": "human", "value": "/**\n\t_moon.Button_ is an <a href=\"#enyo.Button\">enyo.Button</a> with Moonstone\n\tstyling applied. The color of th...
javascript
chosen
[ { "from": "system", "value": "Update Brazilian Portuguese language file.\n" }, { "from": "human", "value": "// Spectrum Colorpicker\n// Brazilian (pt-br) localization\n// https://github.com/bgrins/spectrum\n\n(function ( $ ) {\n\n var localization = $.spectrum.localization[\"pt-br\"] = {\n ...
javascript
chosen
[ { "from": "system", "value": "Clean up syntax for JSDoc and ESLint\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2017 Bonnie Schulkin. All Rights Reserved.\n *\n * This file is part of BoxCharter.\n *\n * BoxCharter is free software: you can redistribute it and/or modify it under\n * t...
javascript
chosen
[ { "from": "system", "value": "Test is a little bit cleaner\n" }, { "from": "human", "value": "/* eslint-disable flowtype/require-parameter-type, flowtype/require-return-type */\nimport {same} from \"tap\"\nimport {replace} from \"ramda\"\n\nimport mapKeys from \"./\"\n\nsame(\n mapKeys(replace(...
javascript
chosen
[ { "from": "system", "value": "Use Ember.K instead of defining our own empty function\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nvar mixpanel = window.mixpanel;\n\nexport default Ember.Mixin.create({\n content: mixpanel,\n\n people: function() {\n return Ember.ObjectPro...
javascript
chosen
[ { "from": "system", "value": "Refactor and split input amount into pounds and pence" }, { "from": "human", "value": "// ($(this).val() && Number($(this).val()) > 0)\n\nfunction isValidAmount(input) {\n var maxVal = 100000000\n var minVal = 0\n\n var value = input.split('.')\n var pou...
javascript
chosen
[ { "from": "system", "value": "Switch form didMount to willMount for server side render\n" }, { "from": "human", "value": "import R from 'ramda';\nimport React from 'react';\n\nconst getDisplayName = (Component) => (\n Component.displayName || Component.name || 'Component'\n);\n\nconst subscribe...
javascript
chosen
[ { "from": "system", "value": "[test-studio] Add project-users widget to test-studio dashboard config\n" }, { "from": "human", "value": "export default {\n widgets: [\n {name: 'sanity-tutorials', layout: {width: 'full'}},\n {name: 'document-list'},\n {name: 'document-count'},\n // {n...
javascript
chosen
[ { "from": "system", "value": "Use more natural language for price information\n" }, { "from": "human", "value": "/*\n * Copyright (c) 2014-2020 Bjoern Kimminich.\n * SPDX-License-Identifier: MIT\n */\nconst models = require('../models/index')\nconst fuzz = require('fuzzball')\n\nasync function p...
javascript
chosen
[ { "from": "system", "value": "Add replication to local couchdb.\n\nWe want this to replicate via a proxy to a per-user db on Cloudant.\n" }, { "from": "human", "value": "define([\n \"backbone\"\n, \"pouchdb\"\n, \"backbone-pouch\"\n], function(\n Backbone\n, PouchDB\n, BackbonePouch\n) {\n\n ...
javascript
chosen
[ { "from": "system", "value": "Fix for query and hash string consistency in url\n" }, { "from": "human", "value": "Wizard.registerRouter('iron:router', {\n go: function(name, stepId) {\n Router.go(name, this.getParams(stepId));\n },\n getParams: function(stepId) {\n return Tracker.nonrea...
javascript
chosen
[ { "from": "system", "value": "Reset page number when selecting a different resource\n" }, { "from": "human", "value": "import { Controller } from \"controllers/controller.js\";\nimport { mapName } from \"utils.js\";\nimport { Ajax } from \"ajax.js\";\n\nexport class ResourcesController extends C...
javascript
chosen
[ { "from": "system", "value": "Set text of option tag\n\nWhen value attribute is set, display after selection becomes value value" }, { "from": "human", "value": "'use strict';\n\nimport $ from 'jquery';\n\nexport default class BasisSelect {\n constructor() {\n this.select = $('[data-c=\"sele...
javascript
chosen
[ { "from": "system", "value": "Use awareness’s event values extraction\n" }, { "from": "human", "value": "const numberRegex = /_number$/\n\nexport default function extractFromDOM(args) {\n const targetProperty = 'currentTarget'\n // If being passed an event with DOM element that has a dataset\n...
javascript
chosen
[ { "from": "system", "value": "Change deprecated Redux Saga function\n" }, { "from": "human", "value": "import { takeLatest } from 'redux-saga';\nimport HttpService from '../services/HttpService';\n\nimport { ProfileTypes } from './profile/redux';\nimport profileRequest from './profile/sagas';\n\...
javascript
chosen
[ { "from": "system", "value": "Refactor link to cover entire card\n" }, { "from": "human", "value": "import React from 'react'\nimport {Link} from 'react-router-dom'\n\nfunction setArticleLink(title) {\n return encodeURIComponent(title)\n}\n\nconst ArticleCard = ({channel, article}) => {\n retu...
javascript
chosen
[ { "from": "system", "value": "Set up signup post express route\n" }, { "from": "human", "value": "/**\r\n * API routes for interacting with the database\r\n */\r\n\r\nimport express from 'express';\r\nconst router = express.Router();\r\n\r\nrouter.get(\"/\", function(req, res) {\r\n // res.se...
javascript
chosen
[ { "from": "system", "value": "Use default browser if browser is not passed for reuseSession\n" }, { "from": "human", "value": "/*jslint forin:true sub:true anon:true, sloppy:true, stupid:true nomen:true, node:true continue:true*/\n/*\n * Copyright (c) 2014, Yahoo! Inc. All rights reserved.\n * C...
javascript
chosen
[ { "from": "system", "value": "Introduce an active prop for filters\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport classnames from 'classnames';\n\nclass Filter extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n active...
javascript
chosen
[ { "from": "system", "value": "Validate dates using UTC timezone\n\nFixes #57\n" }, { "from": "human", "value": "import moment from 'moment'\n\nexport default function validateDateRange(options) {\n return (key, newValue) => {\n let date = moment(newValue)\n\n return date >= moment(options...
javascript
chosen
[ { "from": "system", "value": "Fix - run all tests, not only those for saving status directive.\n" }, { "from": "human", "value": "ddescribe('Dynamic favicon directive', function() {\n\n var $rootScope, $scope, el, $compile;\n var statusClasses = ['pending', 'success', 'failed'];\n\n bef...
javascript
chosen
[ { "from": "system", "value": "Fix a bug not passing license properly\n" }, { "from": "human", "value": "var path = require('path')\nvar tmp = require('tmp')\nvar html = require('./html.js')\nvar pdf = require('./pdf.js')\n\nmodule.exports = ribosome = {}\n\nribosome.translate = function(url, suc...
javascript
chosen
[ { "from": "system", "value": "Add proptypes, navbar changes on isAuthed true\n" }, { "from": "human", "value": "import React from 'react'\nimport { Navigation } from 'components'\nimport { connect } from 'react-redux'\nimport { container, innerContainer } from './styles.css'\n\nconst MainContain...
javascript
chosen
[ { "from": "system", "value": "Handle keyboard select for checkbox views\n" }, { "from": "human", "value": "jsio('from shared.javascript import Class, bind')\njsio('import fan.views.Value')\n\nexports = Class(fan.views.Value, function(supr){\n\t\n\tthis._domTag = 'input'\n\tthis._domType = 'check...
javascript
chosen
[ { "from": "system", "value": "Remove unused variable in $scope\n" }, { "from": "human", "value": "\n\nfunction AnalyzerCtrl($scope, $http, Analyzer, Data){\n $scope.analyzer = Analyzer;\n $scope.data = Data;\n\n $scope.atext = {};\n\n $scope.$watch('analyzer.query', function(value){\...
javascript
chosen
[ { "from": "system", "value": "Fix local conf for jasmine tests\n" }, { "from": "human", "value": "if(typeof jasmine !== \"undefined\") {\n\tjasmine.getFixtures().fixturesPath = '/spec/javascripts/specs/fixtures';\n}" }, { "from": "gpt", "value": "if(typeof jasmine !== \"undefined\") ...
javascript
chosen
[ { "from": "system", "value": "Make the URL formatter friendlier.\n" }, { "from": "human", "value": "(function (doc) {\n\n\"use strict\";\n\nvar REGEX_URL = /^(https?):\\/\\/(?:gist|raw)\\.github(?:usercontent)?\\.com\\/([^\\/]+\\/[^\\/]+\\/[^\\/]+|[0-9A-Za-z-]+\\/[0-9a-f]+\\/raw)\\//i;\n\nvar de...
javascript
chosen
[ { "from": "system", "value": "Use shallowEqual to prevent false-positive values\n" }, { "from": "human", "value": "/* @flow */\nimport { shallowEqual } from 'recompose'\nimport { objectEach } from 'fela-utils'\n\nimport createTheme from './createTheme'\n\nexport default function ThemeProviderFac...
javascript
chosen
[ { "from": "system", "value": "Use local variables to make methods parse easier.\n\n* Stash local variables, and use them inline (seems to be easier to read to me).\r\n* Do not require function prototype extensions (`Function.prototype.on` was used before)." }, { "from": "human", "value": "import...
javascript
chosen
[ { "from": "system", "value": "Add 'cardsSelected' property to the PlayerModelService\n" }, { "from": "human", "value": "export class PlayerModelService {\n\tconstructor($log, $http, $localStorage, $q, _, playersApi) {\n\t\t'ngInject';\n\n\t\tthis.$log = $log;\n\t\tthis.$http = $http;\n\t\tthis.$...
javascript
chosen
[ { "from": "system", "value": "Use jQuery(window).load to avoid interference with other Drupal modules\nand libraries. Also use the flexslider API to start the Flexslider\ninstead of manually starting it" }, { "from": "human", "value": "/*************************************\n* Include.js\n* A Ja...
javascript
chosen
[ { "from": "system", "value": "Add back unknown platform type\n" }, { "from": "human", "value": "'use strict'\n\nmodule.exports = function (sequelize, DataTypes) {\n let Rescue = sequelize.define('Rescue', {\n id: {\n type: DataTypes.UUID,\n primaryKey: true,\n defaultValue: Da...
javascript
chosen
[ { "from": "system", "value": "Fix text: not 'one' but 'two'" }, { "from": "human", "value": "\nlogger.println(text(translate(\"se.pop2\")).color(GameColor.static.green));\n\n// test(function(ch) { logger.println(text(new String(ch))); });\n\nvar c_1 = choice('a', \"Demo\", function(ch) {\n\t\n\t...
javascript
chosen
[ { "from": "system", "value": "Rename method getSelect to getSelectData.\nAdd config modelName.\n" }, { "from": "human", "value": "/**\n * Created by dungvn3000 on 2/18/14.\n */\n\nExt.define('sunerp.component.Combobox', {\n extend: 'Ext.form.field.ComboBox',\n alias: 'widget.comboboxx',\n ...
javascript
chosen
[ { "from": "system", "value": "Update NUSWhispers URL for HTTPS" }, { "from": "human", "value": "'use strict';\n\nvar App = require('./app');\n\nApp.request('addNavigationItem', {\n name: 'NUSWhispers',\n icon: 'heart',\n url: 'http://nuswhispers.com/',\n target: '_blank',\n newLabel: true\n...
javascript
chosen
[ { "from": "system", "value": "Fix icon disappearing bug in Safari\n" }, { "from": "human", "value": "'use strict';\n\nimport menuFactory from '../menuFactory';\n\nconst styles = {\n\n pageWrap(isOpen, width) {\n return {\n transform: isOpen ? 'translate3d(0, 0, 1px)' : `translate3d(0, 0...
javascript
chosen
[ { "from": "system", "value": "Fix UUID column error in membership seeder\n" }, { "from": "human", "value": "module.exports = {\n up: (queryInterface, Sequelize) => {\n return queryInterface.bulkInsert('Memberships',\n [\n {\n id: new Sequelize.UUIDV1(),\n member...
javascript
chosen
[ { "from": "system", "value": "Add new `variance` state to appearance\n" }, { "from": "human", "value": "import DS from 'ember-data';\n\nexport default DS.Transform.extend({\n deserialize: function(serialized) {\n var map = {\n 0: 'New',\n 7: 'Built',\n 10: 'Started',\n 20...
javascript
chosen
[ { "from": "system", "value": "Fix type error in getRouteMatch\n" }, { "from": "human", "value": "import { matchPath } from 'react-router'\n\nexport const getRouteMatch = (routes, pathname) =>\n !routes ? null : routes\n .map(r => matchPath(pathname, r.path, { exact: true }))\n .filter(r =...
javascript
chosen
[ { "from": "system", "value": "Load level 2,1,0 concepts into question model for qs\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports =\n\n/*@ngInject*/\nfunction GrammarActivitiesEditCmsCtrl (\n $scope, GrammarActivity, $state, _\n) {\n $scope.grammarActivity = {};\n $scope.g...
javascript
chosen
[ { "from": "human", "value": "Add settings component unit tests\n" }, { "from": "gpt", "value": "describe('Settings component', () => {\n let ctrl;\n let speechService;\n let stopwatchService;\n let timerService;\n\n beforeEach(angular.mock.module('app'));\n beforeEach(inject(($rootScope, $...
javascript
chosen
[ { "from": "system", "value": "Fix JS test causing navigation away from tests\n" }, { "from": "human", "value": "module(\"Double click protection\", {\n setup: function(){\n this.$form = $('<form action=\"/go\" method=\"POST\"><input type=\"submit\" name=\"input_name\" value=\"Save\" /></form...
javascript
chosen
[ { "from": "system", "value": "Fix missing heading for cause-less campaigns.\n" }, { "from": "human", "value": "import React from 'react';\nimport { map } from 'lodash';\n\nimport CampaignTable from '../CampaignTable';\n\nclass CampaignOverview extends React.Component {\n render() {\n const c...
javascript
chosen
[ { "from": "system", "value": "Allow no setting parameter at all.\n" }, { "from": "human", "value": "function Carousel(settings){\n 'use strict';\n this.carousel = document.querySelector(settings.carousel || '.carousel');\n this.slides = this.carousel.querySelectorAll('ul li');\n this.delay =...
javascript
chosen
[ { "from": "system", "value": "Add unique index to username and email for Users\n" }, { "from": "human", "value": "var bcrypt = require('bcrypt');\nvar mongoose = require('mongoose');\nconst saltRounds = 10;\n\nvar userSchema = new mongoose.Schema({\n signupDate: { type: Date, default: Date.now ...
javascript
chosen
[ { "from": "system", "value": "Fix loading ACTION symbol on canary\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nconst ClosureActionModule = Ember.__loader.require('ember-routing-htmlbars/keywords/closure-action');\n\nexport default ClosureActionModule.ACTION;\n" }, { "...
javascript
chosen
[ { "from": "system", "value": "Fix Js error on tab refresh in element view\n" }, { "from": "human", "value": "function bootstrap_tab_bookmark (selector) {\n if (selector == undefined) {\n selector = \"\";\n }\n\n var bookmark_switch = function () {\n url = document.location...
javascript
chosen
[ { "from": "system", "value": "Update blueprints to include latest package versions\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = {\n normalizeEntityName: function() {},\n\n afterInstall: function() {\n return this.addPackagesToProject([\n { name: 'broccoli-sass',...
javascript
chosen
[ { "from": "system", "value": "Add support for JSX *within* .vue files" }, { "from": "human", "value": "module.exports = {\n \"env\": {\n \"browser\": true,\n \"commonjs\": true,\n \"es6\": true\n },\n \"extends\": \"eslint:recommended\",\n \"parserOptions\": {\n ...
javascript
chosen
[ { "from": "system", "value": "Change class name for recipe entry title\n" }, { "from": "human", "value": "import React from 'react';\nimport { Link } from 'react-router';\nimport moment from 'moment';\n\nmoment().format();\n\nconst RecipeListEntry = (props) => {\n const createdTime = moment(pro...
javascript
chosen