conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Update through stream to ignore source data.\n\nWe don't do anything with the source css, so no use capturing it.\n" }, { "from": "human", "value": "var path = require('path');\nvar through = require('through');\nvar FileSystemLoader = require('css-modules-loader-co...
javascript
chosen
[ { "from": "system", "value": "Fix serialization of typeahead fields\n" }, { "from": "human", "value": "// Helper functions for fields defined by the field.html template\n\n\"use strict\";\n\nvar $ = require('jquery'),\n _ = require('underscore');\n\nexports.getField = function getField($field...
javascript
chosen
[ { "from": "system", "value": "Routes: Store a common reference to the DEBT app\n" }, { "from": "human", "value": "module.exports = function( web ) {\n\nweb.get( \"/\", function( request, response ) {\n\tvar app = web.get( \"debt\" );\n\n\tif ( app.state === \"database-setup\" ) {\n\t\treturn app...
javascript
chosen
[ { "from": "system", "value": "Use progress and coverage reporters\n" }, { "from": "human", "value": "// Karma configuration\n// http://karma-runner.github.io/0.12/config/configuration-file.html\n\nmodule.exports = function(config) {\n 'use strict';\n\n config.set({\n basePath: '../',\n a...
javascript
chosen
[ { "from": "system", "value": "Move to the new API\n" }, { "from": "human", "value": "'use babel';\n\nimport {component} from './polymer-es6';\n\nconsole.log(\"AT VIDEO\");\n\n@component('at-video')\nexport class AtomTwitchVideo {\n static properties() {\n return { };\n }\n \n static liste...
javascript
chosen
[ { "from": "system", "value": "Check entire string for bad words\n" }, { "from": "human", "value": "var detector = (function(){\n\tfunction Filter(){\n\t\tthis.list = require('./lang.json').words;\n\t}\n\n\tFilter.prototype.isProfane = function isProfane(string){\n\t\tfor(var i = 0; i < this.list...
javascript
chosen
[ { "from": "system", "value": "Add firebase urls to envService.\n" }, { "from": "human", "value": "(function() {\n 'use strict';\n\n angular\n .module('davisCru')\n .config(config);\n\n /** @ngInject */\n function config($logProvider, envServiceProvider) {\n envServiceProvider.config...
javascript
chosen
[ { "from": "system", "value": "Fix mocha tests to handle Features\n" }, { "from": "human", "value": "const jsdom = require('jsdom');\n\nglobal.document = jsdom.jsdom('<!doctype html><html><body><div></div></body></html>', {\n url: 'http://localhost',\n skipWindowCheck: true\n});\nglobal.window ...
javascript
chosen
[ { "from": "system", "value": "Fix optimistic state for Player\n" }, { "from": "human", "value": "import PlayerController from './PlayerController'\nimport { connect } from 'react-redux'\nimport { requestPlayNext } from 'store/modules/status'\nimport {\n emitStatus,\n emitError,\n emitLeave,\n...
javascript
chosen
[ { "from": "system", "value": "Add getFilePromise & resolveFilePromise for invoke in master\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * special handle in cluster\n */\nexport const master = {\n /**\n * get file by path\n */\n getFileByPath: (config, stc) => {\n let file =...
javascript
chosen
[ { "from": "system", "value": "Add min task to release.\n" }, { "from": "human", "value": "var exec = require('child_process').exec;\n\nmodule.exports = function(grunt) {\n\n grunt.initConfig({\n qunit: ['./test/index.html'],\n lint: ['supermodel.js', './test/*.js'],\n watch: {\n d...
javascript
chosen
[ { "from": "system", "value": "Update /lists.json to send actual json data\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\n\n/* GET home page. */\nrouter.get('/', function(req, res) {\n res.render('index', { title: 'lists' });\n});\n\nrouter....
javascript
chosen
[ { "from": "system", "value": "Return users that have authed through github\n" }, { "from": "human", "value": "var routes = (passport, mongoose) => {\n var express = require('express');\n var router = express.Router();\n\n router.get('/auth/github', passport.authenticate('github'));\n router....
javascript
chosen
[ { "from": "system", "value": "Use cath to work with an error\n" }, { "from": "human", "value": "\"use strict\";\n\ngetReplies(1)\n.then(function (replies) {\n return replies.filter(reply => !reply.isAbuse);\n})\n.then(function (filteredReplies) {\n console.log(filteredReplies);\n})" }, { ...
javascript
chosen
[ { "from": "system", "value": "Fix broken closed-organisation hide-date test\n" }, { "from": "human", "value": "module(\"create-new\", {\n setup: function() {\n $('#qunit-fixture').append('<select id=\"organisation_govuk_status\" name=\"organisation_govuk_status\"><option value=\"closed\">Clo...
javascript
chosen
[ { "from": "system", "value": "Set symbol descriptions to make debugging easier\n" }, { "from": "human", "value": "export let declarationTypes = {\n CLASS: Symbol(),\n CLASS_METHOD: Symbol(),\n CLASS_ACCESSOR: Symbol(),\n OBJECT_LITERAL_METHOD: Symbol(),\n OBJECT_LITERAL_ACCESSOR: Symbol()\n...
javascript
chosen
[ { "from": "system", "value": "Change editor language when another language is selected\n" }, { "from": "human", "value": "function set_ace_editor() {\n var textarea = document.getElementById(\"editor\");\n var form = textarea.form\n\n editor = ace.edit(textarea)\n editor.container.id = \"ta\...
javascript
chosen
[ { "from": "system", "value": "chore(testactular): Add Chrome browser back in\n" }, { "from": "human", "value": "\n// base path, that will be used to resolve files and exclude\nbasePath = '.';\n\n// list of files / patterns to load in the browser\nfiles = [\n JASMINE,\n JASMINE_ADAPTER,\n 'mis...
javascript
chosen
[ { "from": "system", "value": "Add removed comment to the remove event\n" }, { "from": "human", "value": "const db = require('georap-db');\nconst lib = require('./lib');\n\nmodule.exports = (params, callback) => {\n // Parameters:\n // params:\n // username\n // locationId\n // ...
javascript
chosen
[ { "from": "system", "value": "Modify GithubApi to be able to set an OAuth token when instantiating\n" }, { "from": "human", "value": "let Octokat = require('octokat');\nlet octo = new Octokat({});\n\nclass GithubApi {\n static testOctokat(){\n return new Promise((resolve) => {\n resolve...
javascript
chosen
[ { "from": "system", "value": "Fix execution context in replaceMap\n" }, { "from": "human", "value": "module.exports.rewire = function(module, autoReset, afterEachHook) {\n var rewiredNames = [];\n if (typeof autoReset === 'undefined') {\n autoReset = true;\n }\n if (typeof afterEachHook =...
javascript
chosen
[ { "from": "system", "value": "Remove extra logging that exposed secrets to cloud watch log\n" }, { "from": "human", "value": "var AWS = require('aws-sdk');\nvar s3 = new AWS.S3();\nvar yaml = require('js-yaml');\n\n// const s3EnvVars = require('s3-env-vars');\n// var doc = s3EnvVars(\"mybucketna...
javascript
chosen
[ { "from": "system", "value": "Make it work better with browserify\n" }, { "from": "human", "value": "(function() {\n\n // Baseline setup\n // --------------\n\n /** Used to determine if values are of the language type `Object` */\n var objectTypes = {\n 'function': true,\n 'object': tr...
javascript
chosen
[ { "from": "system", "value": "Exit if the config file is bad\n" }, { "from": "human", "value": "'use strict';\n\nvar CSON = require('cson'),\n log = console.log.bind(console),\n DEFAULT_CONFIG_FILE = 'config.cson';\n\nvar loadConfig = function(configFileName) {\n configFileName = configFileNa...
javascript
chosen
[ { "from": "system", "value": "Fix charset style (not a bug)\n" }, { "from": "human", "value": "'use strict';\n\nvar fs = require('fs');\n\n/**\n * Decorate docopt to extract doc from file.\n */\nfunction fdocopt(docopt) {\n docopt = docopt || require('docopt').docopt;\n\n return function (file...
javascript
chosen
[ { "from": "system", "value": "Update lock should be last\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('repicbro.services')\n .factory('PostsManager', function ($rootScope, Posts) {\n\n var posts = [],\n current = null,\n index = 0,\n latest = '',\n ...
javascript
chosen
[ { "from": "system", "value": "Refactor for changes in retext\n" }, { "from": "human", "value": "'use strict';\n\n/**\n * Dependencies.\n */\n\nvar phonetics;\n\nphonetics = require('soundex-code');\n\n/**\n * Define `soundex`.\n */\n\nfunction soundex() {}\n\n/**\n * Change handler\n *\n * @this...
javascript
chosen
[ { "from": "system", "value": "Switch the main file to use getters to defer loading the JS version unless requested\n" }, { "from": "human", "value": "/*\n * Copyright 2015 The Closure Compiler Authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use ...
javascript
chosen
[ { "from": "system", "value": "Remove location search params when redirecting back from change password page to accout page.\n" }, { "from": "human", "value": "'use strict';\n\nfunction PasswordController($location, $routeParams, $scope, AccountService, UserSessionService) {\n var email = $route...
javascript
chosen
[ { "from": "system", "value": "Remove unneccessary promise from dynamic import\n\nNow we don't need to invoke in the run loop to flush the run loop queues, this\nis no longer doing anything.\n" }, { "from": "human", "value": "export default function (config) {\n const trimPrefix = (config && c...
javascript
chosen
[ { "from": "system", "value": "Include ember-template-compiler.js from npm if available\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-hot-loader',\n serverMiddleware: function (config){\n var lsReloader = require('....
javascript
chosen
[ { "from": "system", "value": "Remove support for deprecated `captureError` (now `...Exception`)\n" }, { "from": "human", "value": "'use strict'\n\nvar raven = require('raven')\n\nexports.register = function (server, options, next) {\n var client = new raven.Client(options.dsn, options.client)\n...
javascript
chosen
[ { "from": "system", "value": "Adjust zoom of open street map\n" }, { "from": "human", "value": "import React from 'react'\nimport ReactDOM from 'react-dom'\n\nclass MapContainer extends React.Component {\n\n render() {\n return (\n <div css={{\n display: 'flex',\n minHeigh...
javascript
chosen
[ { "from": "system", "value": "Tweak thank-you page route logic.\n" }, { "from": "human", "value": "window.addEventListener(\"DOMContentLoaded\", function() {\n\n // get the form elements defined in your form HTML above\n\n var form = document.getElementById(\"my-form\");\n var button = docume...
javascript
chosen
[ { "from": "system", "value": "api: Allow for indenting when rendering (as include). Allow for toString to take a context.\n" }, { "from": "human", "value": "\"use strict\"\n// System\nvar fs = require('fs')\n\n// 3rd Party\nvar template = require('lodash.template')\n\n// Rendering settings\nvar ...
javascript
chosen
[ { "from": "system", "value": "Remove unnecessary expectation which fails due to different configs on ci.\n" }, { "from": "human", "value": "describe('idai field app', function() {\n\n it('should create a new object of type object ', function() {\n browser.get('/');\n\n element(b...
javascript
chosen
[ { "from": "system", "value": "Add test for GitHub getNotifications\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('getToken'...
javascript
chosen
[ { "from": "system", "value": "Add some initialization code and sendMetrics prototype.\n" }, { "from": "human", "value": "var MonitoringPlugin = function() {\n\n};\n\nMonitoringPlugin.prototype.init = function(rcl, wflib, engine) {\n this.rcl = rcl;\n this.wflib = wflib;\n this.engine = ...
javascript
chosen
[ { "from": "system", "value": "Fix missing space in autosizing info message.\n\nBUG=\n\nReview URL: https://codereview.chromium.org/1045933003\n\ngit-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@192791 bbb929c8-8fbe-4397-9dbb-9b2b20218538\n" }, { "from": "human", "value": "function setWindowS...
javascript
chosen
[ { "from": "system", "value": "Add getter for pkg. stats, basic output\n" }, { "from": "human", "value": "#!/usr/bin/env node\n'use strict';\nconst Promise = require('pinkie-promise');\nconst Xray = require('x-ray'), xray = Xray();\nconst cli = require('./cli');\n\nconst getUsrPkgs = function(use...
javascript
chosen
[ { "from": "system", "value": "Disable test for unlocking KeePass file of support team\n" }, { "from": "human", "value": "const chai = require('chai')\nconst expect = chai.expect\n\nconst path = require('path')\nconst kpio = require('keepass.io')\n\ndescribe('keePass', () => {\n it('should unloc...
javascript
chosen
[ { "from": "system", "value": "Add friendships/create and destroy API wrapper method\n" }, { "from": "human", "value": "\n/**\n * TwitterClient.js\n * Twitterをbotが利用しやすいようにwrapしたもの\n */\n\nconst TwitterClient = class {\n constructor (twitter) {\n this.twitter = twitter\n }\n\n /**\n * Use...
javascript
chosen
[ { "from": "system", "value": "Use 'symbol' instead of 'variable' for test status\n" }, { "from": "human", "value": "/*\nLanguage: Test Anything Protocol\nRequires: yaml.js\nAuthor: Sergey Bronnikov <sergeyb@bronevichok.ru>\nWebsite: https://bronevichok.ru/\n*/\n\nfunction(hljs) {\n return {\n ...
javascript
chosen
[ { "from": "system", "value": "Correct the Application Insights Key\n" }, { "from": "human", "value": "var appInsights=window.appInsights||function(config){\nfunction r(config){t[config]=function(){var i=arguments;t.queue.push(function(){t[config].apply(t,i)})}}var t={config:config},u=document,e=...
javascript
chosen
[ { "from": "system", "value": "Fix a bug in this SVG test harness. Make sure it uses document.documentElement instead of document.firstChild.\n\ngit-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@30427 bbb929c8-8fbe-4397-9dbb-9b2b20218538" }, { "from": "human", "value": "var svgNS = \"http://w...
javascript
chosen
[ { "from": "system", "value": "Set both url and uri in config for cordova create\n\nWith changes related to CB-6776 cordova now expects the urls for custom\nplatform files to be called url rather than uri. Setting both here\nso that the current released version of cordova-lib and the future ones\ncan both us...
javascript
chosen
[ { "from": "system", "value": "[native] Update default server URLs to use comm instead of squadcal\n\nSummary: This fixes the `dev_environment.md` setup instructions.\n\nTest Plan: Make sure that everything works on `http://localhost/comm/` after I update `server/facts/url.json` and `/private/etc/apache2/use...
javascript
chosen
[ { "from": "system", "value": "Discard chrome tabs after installion\n\n- Reloading was causing bugs because the js wasn't reloading reliably in a background tab\n- Discarding unloads the tab from memory which causes the tab to reload only when it is active again\n" }, { "from": "human", "value": ...
javascript
chosen
[ { "from": "system", "value": "Use image schema, thumbs are deprecated\n\n" }, { "from": "human", "value": "import mongoose from 'mongoose';\nimport { ImageSchema } from 'src/models/ImageModel';\nimport { ThumbnailSchema } from 'src/models/ThumbnailModel';\n\nconst { Schema } = mongoose;\n\nexpor...
javascript
chosen
[ { "from": "system", "value": "Switch Firefox proxy settings to use nsIProtocolProxyService\n\nThis switches the setting of Firefox proxy settings to be done through\nnsIProtocolProxyService instead of manually setting them in preferences.\n\nFixes #1185\n" }, { "from": "human", "value": "/**\n *...
javascript
chosen
[ { "from": "system", "value": "Add newline at the end of file\n" }, { "from": "human", "value": "app.controller('MyIndexController', ['$scope', function ($scope) {\n $scope.searchTable = false;\n $scope.files = [];\n $scope.searchFiles = [];\n $scope.instance = new Index();\n $scope.showInde...
javascript
chosen
[ { "from": "system", "value": "Refactor the selected $watch callback to be defined as a method on $scope\n" }, { "from": "human", "value": "import 'angular';\n\nexport default [function () {\n return {\n restrict: 'E',\n transclude: true,\n replace: true,\n template...
javascript
chosen
[ { "from": "system", "value": "Add support for protected on manually added json\n" }, { "from": "human", "value": "let tpl = `\n<h2>{{selectedDomain}}</h2>\n\n<ul>\n {{#results}}\n <li>\n <a href=\"/mirrorjson/{{../selectedDomain}}/{{hash}}\"{{#if path}} title=\"{{path}}\"{{/...
javascript
chosen
[ { "from": "system", "value": "Fix a legit broken import that Deepscan caught\n" }, { "from": "human", "value": "/* global Vulcan */\nimport { Comments } from '../../lib/collections/comments'\nimport { Posts } from '../../lib/collections/posts'\nimport { wrapVulcanAsyncScript } from '../scripts/u...
javascript
chosen
[ { "from": "system", "value": "Change helper function to support custom size in queries\n" }, { "from": "human", "value": "'use strict';\n\nconst config = require(`${__dirname}/../config/init`);\n\n/**\n * makeAllRowRequestBody(str)\n * @param string field Field to query parameters from.\n * @par...
javascript
chosen
[ { "from": "system", "value": "Add support for Ember 2\n\nSee http://emberjs.com/deprecations/v2.x/#toc_ember-applicationinstance-container\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport config from '../config/environment';\nimport { getContext, generateError } from 'ember...
javascript
chosen
[ { "from": "system", "value": "Add tab position saving to tenderfoot\n" }, { "from": "human", "value": "$(document).ready(function(){\n $(\"#viewAllTab\").on(\"click\",function(){\n $('[data-toggle=\"tab\"]').parent().removeClass(\"active\");\n $(\"#viewAllTab\").parent().addClas...
javascript
chosen
[ { "from": "system", "value": "Fix attempt: stop creating new clients for each message\n" }, { "from": "human", "value": "'use strict';\n\nexports.on = function(logs) {\n var redis = mainevent.requireModule('redis').createInstance();\n redis.connect();\n redis.client.publish('InsertLog', JSON....
javascript
chosen
[ { "from": "system", "value": "Return 0 if the Birth Date is in the future.\n" }, { "from": "human", "value": "(function(global) {\n\n var getAge = function(birthday) {\n if (! (birthday instanceof Date) ) {\n \tbirthday = new Date(birthday);\n }\n var ageDifMs = Date.n...
javascript
chosen
[ { "from": "system", "value": "[Client] Fix z-index of sticky alerts\n\n- Close #59\n" }, { "from": "human", "value": "import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport AutoAffix from 'react-overlays/lib/AutoAffix';\nimport Alert from 'react-bootstrap/lib/Aler...
javascript
chosen
[ { "from": "system", "value": "Attach noScroll to global object if not CommonJS env\n" }, { "from": "human", "value": "var scrollbarSize;\nvar doc = global.document && global.document.documentElement;\n\nfunction getScrollbarSize() {\n if (typeof scrollbarSize !== 'undefined') return scrollbarSi...
javascript
chosen
[ { "from": "system", "value": "examples: Add name to position-offset shader\n" }, { "from": "human", "value": "FamousFramework.scene('famous-tests:webgl:custom-shader:vertex', {\n behaviors: {\n '$camera': {\n 'set-depth': 1000\n },\n '.sphere': {\n '...
javascript
chosen
[ { "from": "system", "value": "Add version updater and server health messages\n" }, { "from": "human", "value": "/*\n * Copyright 2018 ThoughtWorks, 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 License.\...
javascript
chosen
[ { "from": "system", "value": "Revert \"Revert \"feat: make results cacheable\"\"\n\nThis reverts commit 018018062b1a4f127d4861707ec9c438248a8dab.\n" }, { "from": "human", "value": "\"use strict\";\n\nvar glob = require(\"glob\");\nvar path = require(\"path\");\n\nmodule.exports = function (conte...
javascript
chosen
[ { "from": "system", "value": "Allow short hand function in jsx props, like `<C prop={ () => doX() }`." }, { "from": "human", "value": "module.exports = {\n parser: 'babel-eslint',\n extends: 'airbnb',\n globals: {\n before: true,\n beforeEach: true,\n after: true,\n afterEach: tru...
javascript
chosen
[ { "from": "system", "value": "Revert \"Make regex test strings smaller\"\n\nThis reverts commit 1f0d163b85ef67f8408f7cfcfa9de0afcf61f6d1.\n" }, { "from": "human", "value": "'use strict';\n\nvar path = require('path');\nvar isglob = require('is-glob');\n\nmodule.exports = function globParent(str)...
javascript
chosen
[ { "from": "system", "value": "Refactor to use generic `changeinside` in new retext\n" }, { "from": "human", "value": "'use strict';\n\nvar stemmer;\n\n/**\n * Module dependencies.\n */\n\nstemmer = require('stemmer');\n\n/**\n * `changetextinside` handler;\n *\n * @this Node\n */\n\nfunction onc...
javascript
chosen
[ { "from": "system", "value": "Fix problem with new tab button when private tab add-on is installed\n" }, { "from": "human", "value": "const core = require(\"sdk/view/core\");\nconst hotkeys = require(\"sdk/hotkeys\");\nconst tabs = require(\"sdk/tabs\");\nconst windows = require(\"sdk/windows\")...
javascript
chosen
[ { "from": "system", "value": "Fix typo in method name\n" }, { "from": "human", "value": "'use strict';\nvar postcssCached = require('postcss-cached');\nvar through = require('through2');\nvar applySourceMap = require('vinyl-sourcemaps-apply');\nvar gulpUtil = require('gulp-util');\n\nmodule.expo...
javascript
chosen
[ { "from": "system", "value": "Make it work with private messages, add env variables for stuff and refactor.\n" }, { "from": "human", "value": "var properties = {\n server: '',\n port: 9000,\n password: '',\n ssl: false,\n nick: ''\n};\n\nvar weechat = require('weechat');\nvar...
javascript
chosen
[ { "from": "system", "value": "Use cheerio for line number instead of jQuery\n\nOption available in MJML 3.2" }, { "from": "human", "value": "'use babel';\n\nimport { documentParser, MJMLValidator } from 'mjml'\nimport container from './container'\n\nexport default {\n activate() {\n require(...
javascript
chosen
[ { "from": "system", "value": "Add custom callback optional arg\n" }, { "from": "human", "value": "'use strict';\n\nvar Stopwatch = require('timer-stopwatch');\n\nfunction Hangman(timeLimit) {\n if (!timeLimit) { timeLimit = 60000; }\n var timer = new Stopwatch(timeLimit, {\n refreshRate: Ma...
javascript
chosen
[ { "from": "system", "value": "Add url props to simplify usage, let cable and url optional\n" }, { "from": "human", "value": "var React = require('react')\nconst { Component, PropTypes } = React\n\nclass ActionCableProvider extends Component {\n getChildContext () {\n return {\n cable: t...
javascript
chosen
[ { "from": "system", "value": "Fix a problem with this object passed to each expanded test function\n" }, { "from": "human", "value": "/*!\n * data-driven\n * Copyright(c) 2013 Fluent Software Solutions Ltd <info@fluentsoftware.co.uk>\n * MIT Licensed\n */\n\n module.exports = function(data, fn) ...
javascript
chosen
[ { "from": "system", "value": "Switch developement to production check" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name: 'ember-cli-hot-loader',\n serverMiddleware: function (config){\n if (config.options.environment === 'developmen...
javascript
chosen
[ { "from": "system", "value": "Use new regex to select more patterns\n" }, { "from": "human", "value": "var postcss = require('postcss');\n\nmodule.exports = postcss.plugin('postcss-optional-comments', function() {\n\n return function (root) {\n root.walkDecls(function(decl){\n ...
javascript
chosen
[ { "from": "system", "value": "Adjust regex & add error\n\nAdjust regex to accept url() paths with no quotes, reject paths with unmatched quotes, and trim spaces between parens and quotes. Also throws a descriptive error when it cannot find a valid path.\n" }, { "from": "human", "value": "'use st...
javascript
chosen
[ { "from": "system", "value": "Index.js: Add hideSections function to hide unused sections\n" }, { "from": "human", "value": "window.onload = function() {\n sectionShow();\n};\n\nfunction sectionShow() {\n var sectionControls = {'home_btn': 'home', 'about_btn': 'about', 'projects_btn': 'project...
javascript
chosen
[ { "from": "system", "value": "Remove line ending on end\n" }, { "from": "human", "value": "'use strict';\n\nvar assign = require('object-assign');\nvar chalk = require('chalk');\nvar ProgressBar = require('progress');\n\n/**\n * Progress bar download plugin\n *\n * @param {Object} res\n * @api p...
javascript
chosen
[ { "from": "system", "value": "Add prop type functions for songs and categories\n" }, { "from": "human", "value": "import { PropTypes } from 'react';\n\nexport function navigatorPropTypes (params) {\n return PropTypes.shape({\n state: PropTypes.shape({\n params: PropTypes.shape(params)\n...
javascript
chosen
[ { "from": "system", "value": "Test serialization a bit more\n" }, { "from": "human", "value": "var testBase = require('./_test-base');\n\nvar BillForward = testBase.BillForward;\n\ncontext(testBase.getContext(), function () {\n\tdescribe('Account', function () {\n\t\tdescribe('#new', function ()...
javascript
chosen
[ { "from": "system", "value": "Fix id for scaffolded objects\n" }, { "from": "human", "value": "import ApolloClient, { createNetworkInterface } from 'apollo-client';\nimport { printRequest } from 'apollo-client/transport/networkInterface';\nimport qs from 'qs';\n\nfunction buildApolloClient(baseU...
javascript
chosen
[ { "from": "system", "value": "Change reported vsn from bogus 1.0.0.0 to v0.3-alpha\n" }, { "from": "human", "value": "define(['jquery'], function ($) {\n return {\n init: function (wrapper, util, params, callback) {\n const vsn = \"1.0.0.0\";\n $.ajax({\n ...
javascript
chosen
[ { "from": "system", "value": "Update data chart controller to use route params\n" }, { "from": "human", "value": "define(function() {\n var DataChartController = function($rootScope, $q, HubResource, HubSelectionService) {\n var self = this\n this.isLoaded = false\n\n // ...
javascript
chosen
[ { "from": "system", "value": "Remove Utils events from advert\n" }, { "from": "human", "value": "define([], function () {\n /**\n * Rockabox JSHook class, it will setup custom hooks set in the Placement js\n * for Load, Init, View initial, Engagement and Click.\n *\n * @param ...
javascript
chosen
[ { "from": "system", "value": "Check if username only in dashboard users screen\n" }, { "from": "human", "value": "import React,{ Component } from 'react';\n\nexport default class DashboardUserSingle extends Component {\n render() {\n return(\n <tr>\n <td>{this.props.user.emails[0...
javascript
chosen
[ { "from": "system", "value": "Remove usage of deprecated `Ember.keys`" }, { "from": "human", "value": "import { beforeEach, afterEach, describe } from 'mocha';\nimport Ember from 'ember';\nimport { getContext } from 'ember-test-helpers';\n\nexport function createModule(Constructor, name, descrip...
javascript
chosen
[ { "from": "system", "value": "Fix 404 error on request page\n" }, { "from": "human", "value": "/* eslint-disable @typescript-eslint/no-var-requires */\nconst http = require('http');\nconst express = require('express');\nconst url = require('url');\nconst next = require('next');\nconst { pathname...
javascript
chosen
[ { "from": "system", "value": "Save selected theme in localStorage\n" }, { "from": "human", "value": "'use strict';\n\nvar themeIcons = null;\nvar themeLink = null;\n\n\nvar loadTheme = function (src) {\n themeLink.href = src;\n};\n\n\nvar putIcon = (function () {\n var newIcon = function () {\...
javascript
chosen
[ { "from": "system", "value": "fix(tasks): Change accessSync to statSync, for older nodejs versions compatibility\n" }, { "from": "human", "value": "\"use strict\";\n\nvar gulp = require(\"gulp\");\nvar argv = require(\"yargs\").argv;\nvar gutil = require(\"gulp-util\");\nvar bump = require(\"gul...
javascript
chosen
[ { "from": "system", "value": "Add user.name field to user objects.\n" }, { "from": "human", "value": "var passport = require('passport');\nvar LocalStrategy = require('passport-local').Strategy;\nvar config = require('../config.json');\n\npassport.use(new LocalStrategy(function(usern...
javascript
chosen
[ { "from": "system", "value": "Add link to github on about us page\n" }, { "from": "human", "value": "// Page to create/About Us\n\nimport React from 'react';\n\nconst AboutUs = (props) => {\n return (\n <div>\n <h1>AboutUs page</h1>\n </div>\n );\n};\n\nexport default AboutUs;" },...
javascript
chosen
[ { "from": "system", "value": "Add test of main view\n" }, { "from": "human", "value": "'use babel';\n\nlet {jsdom} = require('jsdom');\n\nglobal.document = jsdom('<!doctype html><html><body></body></html>');\nglobal.window = document.defaultView;\nglobal.navigator = window.navigator;\nglobal.loc...
javascript
chosen
[ { "from": "system", "value": "Move test.run() into before() phase.\n" }, { "from": "human", "value": "/*global describe, it */\n'use strict';\nvar path = require('path');\nvar yeoman = require('yeoman-generator');\n\ndescribe('yui generator', function () {\n var TMP_DIR = path.join(__dirname,...
javascript
chosen
[ { "from": "system", "value": "Use node command instead of running directly\n" }, { "from": "human", "value": "((req) => {\n const { spawn } = req('child_process');\n\n describe('Server Binary Test', () => {\n const config = req('./fixtures/karma_single.conf.js');\n before(() => {\n ...
javascript
chosen
[ { "from": "system", "value": "Stop initial fetch of CSRF token.\n" }, { "from": "human", "value": "\"use strict\";\nimport Ember from 'ember';\nimport config from '../config/environment';\n\nvar csrfTokenRequest;\n\nexport default Ember.Object.extend({\n init: function() {\n // Since the CSR...
javascript
chosen
[ { "from": "system", "value": "[router] Add error messages when the route is unknown\n" }, { "from": "human", "value": "var render = require('../application/render');\nvar Backbone = require('backbone');\nmodule.exports = Backbone.Router.extend({\n /**\n * Render the compoennt into the page co...
javascript
chosen
[ { "from": "system", "value": "Add ability to submit input with Enter key.\n" }, { "from": "human", "value": "$(\"#todoSubmitButton\").click(function(e) {\n e.preventDefault();\n $.post(\"/eval\", { evalInput: $(\"#evalInput\").val() } ,\n function(response) {\n $(\"#displ...
javascript
chosen
[ { "from": "system", "value": "Add CSP to stop it whining!\n" }, { "from": "human", "value": "/* jshint node: true */\n\nmodule.exports = function(environment) {\n var ENV = {\n modulePrefix: 'dummy',\n environment: environment,\n baseURL: '/',\n locationType: 'auto',\n EmberENV: ...
javascript
chosen
[ { "from": "system", "value": "Change format in input file\n\nSigned-off-by: soupette <0a59f0508aa203bc732745954131d022d9f538a9@gmail.com>\n" }, { "from": "human", "value": "import React from 'react';\nimport PropTypes from 'prop-types';\nimport { get } from 'lodash';\nimport { prefixFileUrlWithB...
javascript
chosen