conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Introduce temporary error to test logging\n" }, { "from": "human", "value": "/*global angular:true, browser:true */\n\n(function (angular) {\n 'use strict';\n\n angular.module('JcApp').controller(\n 'HomeCtrl', \n ['$scope',\n function ($scope) {\n\n ...
javascript
chosen
[ { "from": "system", "value": "Add /welcome link that always brings you too welcome flow\n" }, { "from": "human", "value": "var Commuter = require('commuter');\nvar onLoad = require('on-load');\nvar page = require('page');\nvar Plan = require('plan');\nvar utils = require('router-utils');\nvar se...
javascript
chosen
[ { "from": "system", "value": "Add colour to gulp output\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar webpack = require('webpack');\n\nvar clientConfig = require('./config/webpack.prod.client.js')\nvar serverConfig = require('./config/webpack.prod.server.js')\n\n\ngulp.task...
javascript
chosen
[ { "from": "system", "value": "Test 4minitz.com:4000 developer branch deployment\n" }, { "from": "human", "value": "\nTemplate.topics.created = function () {\n};\n\nTemplate.topics.rendered = function () {\n};\n\nvar collapseID = 0;\nTemplate.topics.helpers({\n detailsArray: function () {\n ...
javascript
chosen
[ { "from": "system", "value": "Add correct client GitHub ID [ci skip]\n" }, { "from": "human", "value": "// Angular js application\n(function() {\n var app = angular.module('checkit', ['satellizer'])\n .config(function($authProvider){\n $authProvider.github({\n clientId: '86d32105...
javascript
chosen
[ { "from": "system", "value": "Test folder will contain the expected output.\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n\tusemin = require('./gulp-usemin-reloaded');\n\ngulp.task('test', function() {\n\treturn gulp\n\t.src( 'test/*.html' )\n\t.pipe(\n\t\tusemin()\n\t);\n});\n...
javascript
chosen
[ { "from": "system", "value": "Fix no minify build with processor options\n" }, { "from": "human", "value": "!function () {\n 'use strict';\n\n module.exports = function (inputs, outputs, callback) {\n callback(null, inputs.all);\n };\n}();" }, { "from": "gpt", "value"...
javascript
chosen
[ { "from": "system", "value": "Update isActive when destroying the promiseMonitor\n" }, { "from": "human", "value": "(function () {\n angular.module('eyecatch.promise-monitor', []).provider('promiseMonitor', function () {\n this.$get = ['$q', function ($q) {\n // ReSharper di...
javascript
chosen
[ { "from": "system", "value": "Adjust padding loop so n.length is called only once\n" }, { "from": "human", "value": "var zpad = function(n, m, c) {\n if (!m) m = zpad.default$;\n if (!c) c = zpad.character$;\n if (m < 1) m = 1;\n n = \"\" + n;\n while(n.length < m) n = c + n;\n return n;\n...
javascript
chosen
[ { "from": "system", "value": "Speed up account creation by lowering password security\n\nReduce saltRounds to 8 saves ~50ms per password hash generation.\n" }, { "from": "human", "value": "var bcrypt = require('bcrypt');\nvar mongoose = require('mongoose');\nconst saltRounds = 10;\n\nvar userSch...
javascript
chosen
[ { "from": "system", "value": "Edit typo of extra space" }, { "from": "human", "value": "//reviews/index.html.erb for 'Load Reviews' link on Show Page\n$(function() {\n $(\"a.load_more_reviews\").on(\"click\", function(e) {\n//Send AJAX HIGH-LEVEL get request\n $.get(this.href).success(function...
javascript
chosen
[ { "from": "system", "value": "Include recommended on eslint config\n" }, { "from": "human", "value": "// https://eslint.org/docs/user-guide/configuring\n\nmodule.exports = {\n root: true,\n parserOptions: {\n parser: 'babel-eslint'\n },\n env: {\n browser: true,\n },\n extends: [\n ...
javascript
chosen
[ { "from": "system", "value": "CHANGE path to markdown code example eslint config to relative path\n" }, { "from": "human", "value": "module.exports = {\n plugins: [\n 'remark-preset-lint-recommended',\n ['remark-lint-list-item-indent', false],\n [\n 'remark-lint-code',\n {\n ...
javascript
chosen
[ { "from": "system", "value": "Enable tests for Safari 9" }, { "from": "human", "value": "var argv = require('yargs').argv;\n\nmodule.exports = {\n plugins: {\n 'random-output': true\n },\n registerHooks: function(context) {\n var saucelabsPlatforms = [\n 'macOS 10.12/iphone@10.3',\...
javascript
chosen
[ { "from": "system", "value": "Comment out require of events\n" }, { "from": "human", "value": "'use strict';\n\nconst lib = require('./lib');\nconst events = require('./events');\n\nmodule.exports = {\n notifyUser : (to, notification) => {\n return lib.notify(to, notification);\n }\n};\n" ...
javascript
chosen
[ { "from": "system", "value": "Add support for mongolabs URI and a more complete mongodb url\n" }, { "from": "human", "value": "var mongoose = require('mongoose'),\n //Get the configuration from env or use defaults\n config = {\n host: process.env.MONGODB_HOST || 'localhost',\n port: proc...
javascript
chosen
[ { "from": "system", "value": "Remove null items from carousel slides\n" }, { "from": "human", "value": "import React, { PropTypes, Component } from 'react';\n\nimport Inner from './CarouselInner';\nimport getValidIndex from '../../utils/getValidIndex/getValidIndex';\n\nexport default class Carou...
javascript
chosen
[ { "from": "system", "value": "Extend takeAPhoto func to take a callback\n" }, { "from": "human", "value": "var Utils = (function($) {\n return {\n takeAPhoto: function takeAPhoto() {\n var photoChooser = $('#photoChooser');\n photoChooser.click();\n }\n ...
javascript
chosen
[ { "from": "system", "value": "Remove overrides after fixing them all\n" }, { "from": "human", "value": "module.exports = {\n parser: 'babel-eslint',\n extends: [\n 'eslint:recommended',\n 'plugin:react/recommended',\n 'plugin:redux-saga/recommended',\n 'prettier',\n ],\n plugins:...
javascript
chosen
[ { "from": "system", "value": "Remove mysql credentials and add dotenv function\n" }, { "from": "human", "value": "// Update with your config settings.\n\nmodule.exports = {\n\n development: {\n client: 'sqlite3',\n connection: {\n filename: './dev.sqlite3'\n },\n useNullAsDefau...
javascript
chosen
[ { "from": "system", "value": "Fix so you don't get banned after 5 refreshes.\n" }, { "from": "human", "value": "var auth = require('http-auth');\nvar util = require('util');\nvar app = require('../src/app');\nvar ip = require('./ip');\n\nvar loginAttempts= {};\n\nvar authCallback = function(user...
javascript
chosen
[ { "from": "system", "value": "refactor: Use domain to catch async exception\n" }, { "from": "human", "value": "const vm = require('vm');\nconst request = require('request');\nconst iconv = require('iconv-lite');\nconst ws = require('ws');\n/* eslint-disable no-console */\nconst TIMEOUT = 600;\ne...
javascript
chosen
[ { "from": "system", "value": "Fix packmeteor meteor package for meteor 0.9.2\n" }, { "from": "human", "value": "var crypto = Npm.require('crypto');\nvar fs = Npm.require('fs');\nvar path = Npm.require('path');\n\n\nvar beforeFiles = [];\nvar afterFiles = [];\n\nPackmeteor = {\n config: function...
javascript
chosen
[ { "from": "system", "value": "Use project-routes module to get route for projects.\n" }, { "from": "human", "value": "var mount = require('koa-mount');\nvar router = require('koa-router')();\nvar koa = require('koa');\nvar Bus = require('busmq');\nvar app = koa();\nrequire('koa-qs')(app);\nvar r...
javascript
chosen
[ { "from": "system", "value": "Add newline at end of file\n" }, { "from": "human", "value": "// ==UserScript==\n// @name Mijikai.jp prettify\n// @namespace curipha\n// @description Tweak mijikai.jp\n// @include http://mijikai.jp/\n// @version 0.0.1\n// @grant none\n// ==/Us...
javascript
chosen
[ { "from": "system", "value": "Add --debug option for basic compositor debugging\n" }, { "from": "human", "value": "var fs = require('fs');\n\nvar Canvas = require('canvas');\n\n\n/**\n * Composites a layout into a sprite image.\n * @param {Layout} layout The layout object to composite.\n * @para...
javascript
chosen
[ { "from": "system", "value": "Check for function to exists\n" }, { "from": "human", "value": "\"use strict\";\n\n/* istanbul ignore else */\nif(typeof process === 'object')\n module.exports = function(fn, bind) {\n return function() {\n var args = arguments;\n process.nextTick(func...
javascript
chosen
[ { "from": "system", "value": "Fix bug caused by merge from master\n" }, { "from": "human", "value": "$(document).ready(function () {\n\n /// write article nav\n $article = $('#artText');\n\n $('#nav-article').buildNav({\n content: $article\n });\n\n $('#nav-article').floatingNav({\n s...
javascript
chosen
[ { "from": "system", "value": "Add seqLength paramater to genRandomSeq\n" }, { "from": "human", "value": "\nvar genRandomSeq = function(seqLength) {\n\tvar dnaBases = [\"A\", \"T\", \"G\", \"C\"];\n\tvar ampSeqPlus = \"\";\n\tfor (i = 0; i < 64; i++) {\n\t\tampSeqPlus = ampSeqPlus + dnaBases[Math...
javascript
chosen
[ { "from": "system", "value": "Revert \"added a test for travis\"\n\nThis reverts commit b9aff738e8c17b3f980eb73a682aaac94bf8e7a1.\n\nSigned-off-by: Adam Berkovec <561a1aa9cd22ff35a4cd9f01778138c4df0df67b@pivotal.io>\n" }, { "from": "human", "value": "require('../spec_helper');\n\ndescribe('Hello...
javascript
chosen
[ { "from": "system", "value": "Add missing ./ in rollup input\n" }, { "from": "human", "value": "import buble from '@rollup/plugin-buble'\n\nexport default {\n input: 'src/dropcursor.js',\n output: {\n dir: 'dist',\n format: 'cjs',\n sourcemap: true\n },\n plugins: [buble()],\n exte...
javascript
chosen
[ { "from": "system", "value": "Make analytics work with require.js\n" }, { "from": "human", "value": "define(['json!/api/v1/client-config'], function (config) {\n\n if (!(config && config.ga_token)\n || \"localhost\" == window.location.hostname) {\n console.debug(\"Skipping analytics\");...
javascript
chosen
[ { "from": "system", "value": "[Fix] Fix login with error login data redirect to / with no message\n\n" }, { "from": "human", "value": "/**\n * Created by Indexyz on 2017/4/10.\n */\n\"use strict\";\n/**\n * Created by Indexyz on 2017/4/7.\n */\nconst db = require(\"mongoose\");\nconst userSchema...
javascript
chosen
[ { "from": "system", "value": "Remove green outline colouring when validation passes\n" }, { "from": "human", "value": "/**\r\n * Created by nkmathew on 05/07/2016.\r\n */\r\n\r\n$(\"#profile-form\").submit(function (e) {\r\n $(\"#btn-submit-profile\").spin(BIG_SPINNER);\r\n var url = '/sit...
javascript
chosen
[ { "from": "system", "value": "docs: Add comments to label prop types for docgeninfo\n" }, { "from": "human", "value": "import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { ThemeContext } from \"@hig/themes\";\n\nimport stylesheet from \"./stylesheet\";\n\n...
javascript
chosen
[ { "from": "system", "value": "Add most desired maintenance intervals: 14 days and 30 days\n" }, { "from": "human", "value": "// @flow\nexport const Maintenances = {\n off: \"off\",\n quarterHour: \"quarterHour\",\n oneHour: \"oneHour\",\n threeHours: \"threeHours\",\n sixHours: \"...
javascript
chosen
[ { "from": "system", "value": "Update calls to addFiles, onUse, and onTest\n" }, { "from": "human", "value": "Package.describe({\n summary: \"Wraps the request module from Npm in a fiber.\",\n version: '0.0.0'\n});\n\nNpm.depends({request: \"2.47.0\"});\n\nPackage.on_use(function (api) {\n api...
javascript
chosen
[ { "from": "system", "value": "Change var to const in webpack file\n" }, { "from": "human", "value": "var path = require('path');\nvar webpack = require('webpack');\nvar APP_DIR = path.resolve(__dirname, 'client');\nvar SERVER_DIR = path.resolve(__dirname, 'server');\n\nconsole.log('=============...
javascript
chosen
[ { "from": "system", "value": "Fix Script: URL Encode, Same-origin policy problem\n" }, { "from": "human", "value": "jQuery(document).ready(function($) {\n\tif ('undefined' != typeof WPCOM_sharing_counts) {\n\t\tfor (var url in WPCOM_sharing_counts) {\n\t\t\tget_feedly_counts(url);\n\t\t}\n\t}\n\...
javascript
chosen
[ { "from": "system", "value": "Remove buffer block on web\n" }, { "from": "human", "value": "const path = require(\"path\");\nconst { DefinePlugin } = require(\"webpack\");\nconst { BundleAnalyzerPlugin } = require(\"webpack-bundle-analyzer\");\n\nconst SOURCE = path.resolve(__dirname, \"./source...
javascript
chosen
[ { "from": "system", "value": "Remove unneeded noParse build rules\n" }, { "from": "human", "value": "'use strict';\n\nconst path = require('path');\nconst loaders = require('./webpack/loaders');\nconst plugins = require('./webpack/plugins');\n\nmodule.exports = {\n entry: {\n app: './src/ind...
javascript
chosen
[ { "from": "system", "value": "Add chat.auth module to main module.\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('chat', ['ngTouch', 'restangular', 'ui.router', 'ui.bootstrap'])\n .config(function($stateProvider, $urlRouterProvider) {\n $stateProvider\n .state('home...
javascript
chosen
[ { "from": "system", "value": "Add headers for sending JSON data\n" }, { "from": "human", "value": "import 'whatwg-fetch';\n\nvar helpers = {\n checkStatus,\n parseJSON\n};\n\nfunction checkStatus(res) {\n if (res.status >= 200 && res.status < 300) {\n return res;\n } else {\n var error...
javascript
chosen
[ { "from": "system", "value": "Use variable instead of selector where possible" }, { "from": "human", "value": "(function( $ ) {\n $.fn.searchify = function() {\n return this.each(function() {\n $(this).autocomplete({\n source: $(this).data(\"search-url\"),\n ...
javascript
chosen
[ { "from": "system", "value": "Fix : nowthe box for 3dimpacst is better.\n" }, { "from": "human", "value": "\n\n/* We pin in the buttong MB a overlay box of 800*800, for\n the 3dimpact page*/\nwindow.addEvent('domready', function(){ \n\tvar box = new MultiBox('mb', { \n\t\t/*overlay: over*/\n\t\t...
javascript
chosen
[ { "from": "system", "value": "Enable eventlog in public brokerage mode (SAAS-840)\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('ncsaas')\n .constant('MODE', {\n modeName: 'modePublicBrokerage',\n toBeFeatures: [\n 'eventlog',\n 'localSignup',\n 'users'...
javascript
chosen
[ { "from": "system", "value": "Update expected endpoint object structure\n" }, { "from": "human", "value": "/* global describe, context, it */\n'use strict';\n\nconst path = require('path');\nconst chai = require('chai');\nconst endpoints = require(path.normalize(`${__dirname}/../lib/endpoints`))...
javascript
chosen
[ { "from": "system", "value": "Use promise's then() method instead of success due to error message\n" }, { "from": "human", "value": "var app = angular.module('plugD', [\n 'angularUtils.directives.dirPagination'\n]);\n\napp.controller(\"PluginController\",function(){\n});\n\napp.directive(\"pl...
javascript
chosen
[ { "from": "system", "value": "Add temporary stub for orders route\n" }, { "from": "human", "value": "import Ember from 'ember';\nimport config from './config/environment';\n\nvar Router = Ember.Router.extend({\n location: config.locationType\n});\n\nexport default Router.map(function() {\n /...
javascript
chosen
[ { "from": "system", "value": "Add test for getLastError selector\n" }, { "from": "human", "value": "import * as selectors from '../src/selectors'\n\ndescribe('selectors', () => {\n it('includes selector to get session data', () => {\n const state = {\n session: {\n data: { token:...
javascript
chosen
[ { "from": "system", "value": "Watch stream and not peer for change\n" }, { "from": "human", "value": "angular.module('palava-portal').directive('webrtcStream', function(){\n return {\n restrict: 'E',\n replace: true,\n scope: {\n peer: \"=\",\n },\n link: funct...
javascript
chosen
[ { "from": "system", "value": "Add the check for children\n" }, { "from": "human", "value": "import { enqueueRender } from './component';\n\nexport let i = 0;\n\n/**\n *\n * @param {any} defaultValue\n */\nexport function createContext(defaultValue) {\n\tconst ctx = {};\n\n\tconst context = {\n\t...
javascript
chosen
[ { "from": "system", "value": "FIX temp bug w/ webpack\n" }, { "from": "human", "value": "module.exports = {\n stories: [\n \"../stories/**/*.stories.mdx\",\n \"../stories/**/*.stories.@(js|jsx|ts|tsx)\"\n ],\n addons: [\n \"@storybook/addon-links\",\n \"@storybook/addon-essentials...
javascript
chosen
[ { "from": "system", "value": "Check browser has notification capability\n" }, { "from": "human", "value": "class Notifications {\n constructor() {\n Notification.requestPermission();\n }\n\n notifyTurn(player) {\n this.notify({\n body: \"Your opponent has moved.\",\n icon: `/i...
javascript
chosen
[ { "from": "system", "value": "Improve user link function test\n" }, { "from": "human", "value": "describe('User defined link function', function() {\n\tvar $compile, $rootScope, called;\n\n\tbeforeEach(module('underscoreExample'));\n\tbeforeEach(module('programmable'));\n\n\tvar Mock = {\n\t\tli...
javascript
chosen
[ { "from": "system", "value": "Make Tael container resize height on document load\n" }, { "from": "human", "value": "function resizeTaelContainer() {\n $('.tael-container').css('bottom', 16);\n}\n\n$(document).ready(function () {\n var header_bbox = $('.header')[0].getBoundingClientRect();\...
javascript
chosen
[ { "from": "system", "value": "Add normal numbers to Gams\n" }, { "from": "human", "value": "/*\n Language: GAMS\n Author: Stefan Bechert <stefan.bechert@gmx.net>\n Contributors: Oleg Efimov <efimovov@gmail.com>\n Description: The General Algebraic Modeling System language\n Category: scientific\...
javascript
chosen
[ { "from": "system", "value": "Add rough middleware support to proxyResponder\n" }, { "from": "human", "value": "'use strict';\n\nfunction passthrough(originalReq, originalRes, proxyRes){\n console.log(proxyRes.statusCode, 'PASSTHROUGH', originalReq.url);\n\n originalRes.writeHead(\n proxyRe...
javascript
chosen
[ { "from": "system", "value": "Change how the search is loaded\n" }, { "from": "human", "value": "window.onload = () => {\n var instance = new Index();\n\n var filePath = document.getElementById('filePath');\n var createIndexButton = document.getElementById('createIndexButton');\n var...
javascript
chosen
[ { "from": "system", "value": "Add histroy location paramter to routes\n" }, { "from": "human", "value": "\"use strict\";\n\nwindow.$ = window.jQuery = require('jquery');\n\nvar React = require('react');\nvar Router = require('react-router');\nvar routes = require('./routes');\n\nRouter.run(route...
javascript
chosen
[ { "from": "system", "value": "Use new attribute API with HasMany\n" }, { "from": "human", "value": "var Collection = require('./collection');\n\nfunction HasMany(options) {\n return {\n staticValue: new Collection(),\n //hasMutableValue: false // unjoinable, unsettable\n };\n}\n\nmodule....
javascript
chosen
[ { "from": "system", "value": "Change word joining format to match gfycat (PascalCase)\n" }, { "from": "human", "value": "\"use strict\";\n\nvar Bluebird = require(\"bluebird\");\nvar randWord = require(\"./cryptoRand\");\n\nmodule.exports = function (numAdjectives) {\n\tif (!numAdjectives) {\n\t...
javascript
chosen
[ { "from": "system", "value": "Change route from user to contractcontroller\n" }, { "from": "human", "value": "var express = require('express');\nvar contractController = require('./contractController.js');\n\nmodule.exports = function(app){\n\tapp.post('/createjob', contractController.createJob)...
javascript
chosen
[ { "from": "system", "value": "Support operation name in DDP method\n" }, { "from": "human", "value": "import { runQuery } from 'graphql-server-core';\n\nexport function createGraphQlMethod (schema) {\n return function graphQlMethod({ query, variables }) {\n this.unblock();\n\n c...
javascript
chosen
[ { "from": "system", "value": "Add type and variable setting\n" }, { "from": "human", "value": "'use strict';\n\n/* value.js\n * Object to represent CSS Values.\n */\n\nmodule.exports = exports = Value;\n\nfunction Value(){\n\n}\n" }, { "from": "gpt", "value": "'use strict';\n\n/* val...
javascript
chosen
[ { "from": "system", "value": "Add point() helper function for creating objects representing coordinate pairs\n" }, { "from": "human", "value": "// Stores all created nodes, indexed by their unique 2-letter keys\nvar nodes = {};\n\n/* Return a new node object & add it to list of nodes\n *\n * nam...
javascript
chosen
[ { "from": "system", "value": "Revert \"Hopefully fixed the double request issues\"\n\nThis reverts commit 23a6d2219ac9057e87b0e4a2088d79f2d17fbbab.\n" }, { "from": "human", "value": "Checklist.Router = Ember.Router.extend({\n location: 'hash',\n\n root: Ember.Route.extend({\n home: Ember.Ro...
javascript
chosen
[ { "from": "system", "value": "Update API url to prod.\n" }, { "from": "human", "value": "export default function ({ $axios }) {\n $axios.defaults.baseURL = process.env.API_URL || 'https://csk7a21fb4.execute-api.us-east-1.amazonaws.com/dev';\n $axios.defaults.headers.post['Content-Type'] = 'app...
javascript
chosen
[ { "from": "system", "value": "Update network timeout for web3 calls\n" }, { "from": "human", "value": "import axios from 'axios';\nimport { Manager as Web3RequestManager } from 'web3-core-requestmanager';\nclass HttpRequestManager {\n constructor(host, options) {\n options = options || {};\n...
javascript
chosen
[ { "from": "system", "value": "Fix path to the typescript output path.\n" }, { "from": "human", "value": "var runSequence = require('run-sequence');\n\nvar typescript = require('./typescript');\n\nexports.config = function(gulp, packageName, locations) {\n\tgulp.task('compile', ['compile.debug'])...
javascript
chosen
[ { "from": "system", "value": "Use requestAnimationFrame for happo examples\n" }, { "from": "human", "value": "/* global happo */\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport { getStories } from '../StoryManager';\n\n// stories\nimport '../stories/Image';\nimport '../sto...
javascript
chosen
[ { "from": "system", "value": "Add more info to the AuthController\n" }, { "from": "human", "value": "var authController = {};\nvar UserCollection = require('../models').collections.UserCollection;\nvar User = require('../models').models.User;\n\nauthController.getUser = function (req, res) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add support for LZMA compressed SWF\n\nFixes #1.\n" }, { "from": "human", "value": "'use strict';\n\nmodule.exports = function (buf) {\n\tif (!buf || buf.length < 2) {\n\t\treturn false;\n\t}\n\n\treturn (buf[0] === 0x43 || buf[0] === 0x46) && buf[1] === 0x57 && buf...
javascript
chosen
[ { "from": "system", "value": "Simplify regex replacement of environment variables\n" }, { "from": "human", "value": "var path = require('path')\nvar url = require('url')\nvar tokenKey = ':_authToken'\n\nmodule.exports = function (registryUrl, opts) {\n var options = opts || {}\n var npmrc = re...
javascript
chosen
[ { "from": "system", "value": "Update up to changes in site-tree\n" }, { "from": "human", "value": "'use strict';\n\nvar setPrototypeOf = require('es5-ext/object/set-prototype-of')\n , ensureCallable = require('es5-ext/object/valid-callable')\n , d = require('d')\n , SiteTree ...
javascript
chosen
[ { "from": "system", "value": "Disable the addon in Fastboot.\nFastclick automatically touches 'navigator' for feature detection, which crashes fastboot because navigator doesn't exist in node\n" }, { "from": "human", "value": "/* jshint node: true */\n'use strict';\n\nmodule.exports = {\n name:...
javascript
chosen
[ { "from": "system", "value": "Add alternative names of menus.\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar path = require('path');\nvar adventure = require('adventure');\nvar jsing = adventure('javascripting-jp');\n\nvar problems = require('./menu.json');\n\nproblems.forEach(fun...
javascript
chosen
[ { "from": "system", "value": "Send an object instead of the get-filters string\n" }, { "from": "human", "value": "var browser = browser || chrome\n\nlet filters = []\n\nbrowser.runtime.sendMessage('get-filters', getFilters)\nbrowser.runtime.onMessage.addListener(getFilters)\n\nfunction getFilter...
javascript
chosen
[ { "from": "system", "value": "Add changes for test 4\n" }, { "from": "human", "value": "#!/usr/bin/env node\nconst inquirer = require('inquirer')\nconst Listr = require('listr')\n\nconst steps = [{\n type: 'input',\n name: 'userName',\n message: 'Whats your name?'\n}]\n\n\nconst tasks = [{\n ...
javascript
chosen
[ { "from": "system", "value": "Update get route to \"name\"\n" }, { "from": "human", "value": "var ApiBuilder = require('claudia-api-builder'),\n api = new ApiBuilder();\n\nmodule.exports = api;\n\napi.get('/', function () {\n 'use strict';\n return 'Hello World';\n});\n\napi.get('/echo', func...
javascript
chosen
[ { "from": "system", "value": "Fix buildpack typo to buildpacks\n" }, { "from": "human", "value": "exports.topics = [\n { name: 'apps', description: 'manage apps' },\n { name: 'info', hidden: true, },\n { name: 'maintenance', description: 'manage maintenance mode for an app' },\n...
javascript
chosen
[ { "from": "system", "value": "Remove new JS syntax usage\n\nAdd support for Node.js 4.x\n" }, { "from": "human", "value": "/*eslint-env node*/\n\nconst _ = require('lodash');\n\nconst ERROR_SEVERITY = 2;\n\nfunction logIssue(issue) {\n const attributes = _.chain(_.toPairs(issue))\n ...
javascript
chosen
[ { "from": "system", "value": "Fix scan not emitting initial value\n" }, { "from": "human", "value": "const combine = (combiner, ...observables) => next => {\n let state = Array(observables.length)\n\n observables.forEach((base, index) => base(value => {\n state[index] = value\n\n if(Obje...
javascript
chosen
[ { "from": "system", "value": "Add cheat to the game\n" }, { "from": "human", "value": "var LEDModule = require('./lib/modules/LEDModule');\nvar ModuleLoader = require('./lib/ModuleLoader');\nvar WebSocketServer = require('./lib/WebSocketServer');\nvar led = new LEDModule();\nvar server = new Web...
javascript
chosen
[ { "from": "system", "value": "[GREEN] Add success status to res.jSend\n" }, { "from": "human", "value": "/*jslint node:true indent:2 unparam:true */\n'use strict';\n\nmodule.exports = function (req, res, next) {\n res.jSend = function () {\n return res.json({});\n };\n return next();\n};\n...
javascript
chosen
[ { "from": "system", "value": "Fix \"undefined function\" bug when iterating an object created with Object.create(null)" }, { "from": "human", "value": "\n/*\n * Module requirements.\n */\n\nvar isArray = require('isarray');\n\n/**\n * Module exports.\n */\n\nmodule.exports = hasBinary;\n\n/**\n ...
javascript
chosen
[ { "from": "system", "value": "Support 'legacy' API in CLI project\n" }, { "from": "human", "value": "/**\n * the top-level API for `manifoldjs`. provides access to the key libraries in\n * manifoldjs so you can write your own tools using `manifoldjs` as a library.\n *\n * Usage\n * -----\n *\n ...
javascript
chosen
[ { "from": "system", "value": "Add early return for files without _contents\n\nErrors occurred if a file was streamed through that did not have a\n_contents value, so we are now exiting the function altogether if\nthat case fails. In the future we may want to find out what kinds\nof objects are being streame...
javascript
chosen
[ { "from": "system", "value": "Fix para no permitir insertar jugadores sin nombre\n" }, { "from": "human", "value": "var UI = (function () {\n\n var ui, game, html;\n\n function UI(_game) {\n game = _game;\n ui = this;\n html = $('.principal-wrapper');\n html\n ...
javascript
chosen
[ { "from": "system", "value": "Add support for scoping the query to an element\n" }, { "from": "human", "value": "const { querySelectorDeep } = require('query-selector-shadow-dom');\n\nexports.getDocument = () => document.getElementById('app').contentDocument;\n\nexports.querySelectorDeep = query...
javascript
chosen
[ { "from": "system", "value": "Disable no-redeclare lint rule for deprecated `root` global\n" }, { "from": "human", "value": "'use strict';\n\n// MODULES //\n\nvar root = require( 'system.global' )();\n\n\n// MAIN //\n\nvar nodeList = root.document && root.document.childNodes;\n\n\n// EXPORTS //\...
javascript
chosen
[ { "from": "system", "value": "Add ember eslint plugin rules\n" }, { "from": "human", "value": "module.exports = {\n root: true,\n parserOptions: {\n ecmaVersion: 2017,\n sourceType: 'module'\n },\n extends: 'eslint:recommended',\n env: {\n browser: true\n },\n rules: {\n }\n};\n...
javascript
chosen
[ { "from": "system", "value": "Add tests to be implemented for persist\n" }, { "from": "human", "value": "import { createCookieStore } from '../../src/storage'\nimport Cookie from 'js-cookie'\n\ndescribe('cookie store', () => {\n describe('#persist', () => {\n it('returns resolved promise', (...
javascript
chosen
[ { "from": "system", "value": "FIx bug when the dep names regexp doesn't have a match\n" }, { "from": "human", "value": "(function (ng) {\n 'use strict';\n\n /**\n * Angular.js utility for cleaner dependency injection.\n */\n var $inject = function (cls, self, args) {\n var i;\n var ...
javascript
chosen
[ { "from": "system", "value": "Work around the core issue with the api http endpoint\n" }, { "from": "human", "value": "export const WEATHER_API_URL = 'http://api.openweathermap.org/data/2.5';\nexport const WEATHER_APP_ID = process.env.REACT_APP_WEATHER_APP_ID;\n// Please replace with your app id...
javascript
chosen
[ { "from": "system", "value": "Enable updating a module-wire position with a bound port\n" }, { "from": "human", "value": "(function(app) {\n 'use strict';\n\n var jCore = require('jcore');\n var helper = app.helper || require('../helper.js');\n\n var ModuleWireRelation = helper.inherits(func...
javascript
chosen
[ { "from": "system", "value": "Fix account sidenav hash click\n" }, { "from": "human", "value": "$(document).ready(function() {\n\n var sideNav = $('#sidenav');\n var sideNavActiveScope = sideNav.attr('data-active-scope');\n\n if ($('.active', sideNavActiveScope).length === 0) {\n ...
javascript
chosen
[ { "from": "system", "value": "Add inline comment explaining why on Chrome we don't know the sender of the message\n" }, { "from": "human", "value": "// Listen for messages from clients.\nself.addEventListener('message', function(event) {\n event.waitUntil(\n // Get all the connected clients ...
javascript
chosen
[ { "from": "system", "value": "Remove temporary test for ResultCtrl\n" }, { "from": "human", "value": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * ...
javascript
chosen
[ { "from": "system", "value": "Remove before and beforeEach functions in leiu of a getHub function\n" }, { "from": "human", "value": "var _ = require( 'lodash' );\nvar should = require( 'should' );\nvar sinon = require( 'sinon' );\nvar pequire = require( 'proxyquire' );\n\nvar TYPES = [ ...
javascript
chosen