conversations
listlengths
2
3
source
stringclasses
1 value
stack
stringclasses
1 value
[ { "from": "system", "value": "Fix a case for custom RequireJS loader which has exports in scope but not module\n" }, { "from": "human", "value": ";(function (f) {\n // CommonJS\n if (typeof exports === \"object\") {\n module.exports = f();\n\n // RequireJS\n } else if (typeof define === \...
javascript
chosen
[ { "from": "system", "value": "Add ability to match input field's height\n" }, { "from": "human", "value": "import classNames from 'classnames/dedupe';\nimport React from 'react';\n\nimport {omit} from '../../utils/Util';\n\nconst FieldLabel = (props) => {\n let {children, className, required} =...
javascript
chosen
[ { "from": "system", "value": "Change the file to support object\n\nAdd a basic Room constructor and an Object constructor" }, { "from": "human", "value": "/*\n * The actual code for the game\n */\n\nfunction processinput() {\n $(\"#world\").append(\"<p>\" + $(\"#he-said\").val() + \"</p>\");\...
javascript
chosen
[ { "from": "system", "value": "Remove template callback from template as it does not exist\n" }, { "from": "human", "value": "/* Has access to the following protected methods\n $config(NAME): Retrieves the template config named NAME\n $forms(NAME): Retrieves the forms templates config named...
javascript
chosen
[ { "from": "system", "value": "Fix initial query params not getting passed into recursive calls.\n" }, { "from": "human", "value": "import Ember from 'ember';\n\nexport default function loadAll(model, relationship, dest, options = {}) {\n var page = options.page || 1;\n var query = {\n ...
javascript
chosen
[ { "from": "system", "value": "Convert ContentLength of storage to number" }, { "from": "human", "value": "const AWS = require('aws-sdk');\nconst s3 = new AWS.S3();\n\nclass S3Storage {\n constructor(config, log) {\n this.bucket = config.s3_bucket;\n this.log = log;\n }\n\n async length(...
javascript
chosen
[ { "from": "system", "value": "ADD toId back to core for chromatic\n" }, { "from": "human", "value": "import { ClientApi, StoryStore, ConfigApi } from '@storybook/client-api';\nimport start from './start';\n\nexport default {\n start,\n ClientApi,\n ConfigApi,\n StoryStore,\n};\n" }, { ...
javascript
chosen
[ { "from": "system", "value": "Use simpler syntax for defining the root route\n" }, { "from": "human", "value": "Router.configure({ layoutTemplate: 'layout' });\n\nRouter.route('/', function () { this.render('pairs'); });\nRouter.route('/people');\nRouter.route('/fullscreen');\n" }, { "fr...
javascript
chosen
[ { "from": "system", "value": "Change to fast for now\n" }, { "from": "human", "value": "function showMetadata(map) {\n if(!$('.metadata').is(':visible')) $('.metadata').animate({width:'toggle'}, 'slow');\n \n $('.metadata--title').text(map.title);\n}" }, { "from": "gpt", "value": ...
javascript
chosen
[ { "from": "system", "value": "Tidy up the pot search javascript\n" }, { "from": "human", "value": "// Visit The Stimulus Handbook for more details\n// https://stimulusjs.org/handbook/introduction\n//\n// This example controller works with specially annotated HTML like:\n//\n// <div data-controll...
javascript
chosen
[ { "from": "system", "value": "Add name to the required inputs\n" }, { "from": "human", "value": "/*\n * Licensed to Cloudkick, Inc ('Cloudkick') under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyrigh...
javascript
chosen
[ { "from": "system", "value": "Reset edit_mode when submitting form\n" }, { "from": "human", "value": "import { createAction } from 'redux-actions'\nimport { get_body } from 'app/http'\n\nconst CHANGE_TAB =\n 'CHANGE_TAB'\nconst FETCH_USER_DETAILS =\n 'FETCH_USER_DETAILS'\nconst SUBMIT_USER_DET...
javascript
chosen
[ { "from": "system", "value": "Add cardFilename filter unit tests\n" }, { "from": "human", "value": "describe('card', function() {\n beforeEach(module('card'));\n\n describe('Card', function() {\n var Card;\n\n beforeEach(inject(function(_Card_) {\n Card = _Card_;\n...
javascript
chosen
[ { "from": "system", "value": "Remove debug output from insertDataTable\n" }, { "from": "human", "value": "\nfunction jsonRequestFailure(jqXHR, status, errorThrown){\n console.log(errorThrown);\n}\n\nfunction requestDataTable(target, dataSource){\n $.ajax({\n url: dataSource,\n ...
javascript
chosen
[ { "from": "system", "value": "Refactor permutation: remove duplicate code\n" }, { "from": "human", "value": "'use strict';\n\nconst transformGenerate = require('./transform-generate');\nconst transformApply = require('./transform-apply');\n\nmodule.exports = array => transformGenerate(array.leng...
javascript
chosen
[ { "from": "system", "value": "Fix callback and version check\n" }, { "from": "human", "value": "import { offline } from 'redux-offline';\nimport offlineConfig from 'redux-offline/lib/defaults';\nimport detectNetwork from 'redux-offline/lib/defaults/detectNetwork.native';\nimport { AsyncStorage }...
javascript
chosen
[ { "from": "system", "value": "Change API URL to new location\n" }, { "from": "human", "value": "import axios from 'axios';\nimport { push } from 'react-router-redux';\nimport { SIGN_UP_SUCCESS, SIGNING_UP, SIGN_UP_FAILURE } from './types';\n\nexport const apiURL = 'https://hellobooksv2.herokuapp...
javascript
chosen
[ { "from": "system", "value": "Fix module name ... grrr webstorm\n" }, { "from": "human", "value": "/** @license MIT License (c) copyright 2010-2014 original author or authors */\n/** @author Brian Cavalier */\n/** @author John Hann */\n\n/**\n * Abstract the particular Promise in use. Using whe...
javascript
chosen
[ { "from": "system", "value": "Rename constant ROOT to SERVER\n" }, { "from": "human", "value": "/**\n * Path Constants.\n *\n * @module server/constants/paths\n */\n\nconst path = require('path');\n\n// Define file paths.\nconst ROOT = path.resolve(__dirname, '..');\nconst PUBLIC = `${ROOT}/publ...
javascript
chosen
[ { "from": "system", "value": "Add a get request to get all pathways\n" }, { "from": "human", "value": "'use strict'\n\nangular.module('pathwayApp')\n.controller('HomeController', function ($scope) {\n});\n\n// app.controller('HomeController', function ($scope) {\n// $scope.event = \"hello\"\n/...
javascript
chosen
[ { "from": "system", "value": "Add header type for geojson\n" }, { "from": "human", "value": "var Layer = require('../models/Layer');\r\n\r\n\r\nvar getJSON = function(type, req, res) {\r\n var ops = {\r\n id: parseFloat(req.param(\"id\")),\r\n pid: parseFloat(req.param(\...
javascript
chosen
[ { "from": "system", "value": "Stop the madness and put things back\n" }, { "from": "human", "value": "(function(ext) {\n // Cleanup function when the extension is unloaded\n ext._shutdown = function() {};\n \n\n // Status reporting code\n // Use this to report missing hardware, pl...
javascript
chosen
[ { "from": "system", "value": "Print a message on success, too\n" }, { "from": "human", "value": "#import \"env.js\"\n\nvar target = UIATarget.localTarget();\n\nListScreen.tapCellWithName(\"coffee\")\n\ntarget.delay(0.5);\n\nvar text = DetailScreen.displayedText();\nif (text != \"coffee\") {\n U...
javascript
chosen
[ { "from": "system", "value": "Add app.all CORS header code\n" }, { "from": "human", "value": "\"use strict\";\n\nconst express = require(\"express\");\nconst app = express();\n\n// install request\nconst request = require('request');\n\nconst PORT = process.env.PORT || 3000;\nconst rovi = proces...
javascript
chosen
[ { "from": "system", "value": "Fix port issue for heroku deploy\n;\n" }, { "from": "human", "value": "var express = require('express');\nvar app = express();\nvar http = require('http').Server(app);\nvar io = require('socket.io')(http);\n\nvar size = 16;\nvar drumState = new Array(size*size);\nfo...
javascript
chosen
[ { "from": "system", "value": "refactor: Implement 'run' command with combining 'keygen' and 'add' command\n" }, { "from": "human", "value": "const yaml = require('js-yaml');\nconst passGen = require('generate-password');\n\nconst fs = require('./fs');\nconst util = require('./util');\n\n/**\n * ...
javascript
chosen
[ { "from": "system", "value": "Fix a bug in the plugin where multiple allowed policies were added to the header without spaces in between.\n" }, { "from": "human", "value": "const express = require('express');\n\nmodule.exports = (context, pluginOptions = {}, _plugin) => {\n const pathToPolicies...
javascript
chosen
[ { "from": "system", "value": "Add example for \"prev()\" reference to snippet\n\nChange-Id: I1b9fb2f97ca0e9aee1ba21e58a71527024d26538\n" }, { "from": "human", "value": "var page = tabris.create(\"Page\", {\n title: \"Layout - Relative Positioning\",\n topLevel: true\n});\n\nvar composite1 = ta...
javascript
chosen
[ { "from": "system", "value": "Fix regression when adding data-attributes to DOM elements\n" }, { "from": "human", "value": "var $ = require('jquery');\nvar Utils = require('./utils.js');\n\n\n// When passed to the template evaluator,\n// its render method will create actual DOM elements\nvar DOM...
javascript
chosen
[ { "from": "system", "value": "chore(rollup): Mark strip-ansi as an external dependency\n" }, { "from": "human", "value": "// @flow\nimport babel from 'rollup-plugin-babel';\n\n// eslint-disable-next-line\nexport default function buildConfig(\n // eslint-disable-next-line\n entry /*: string...
javascript
chosen
[ { "from": "system", "value": "Support for fonts in subdirectories, e.g. fonts from Alloy Widgets." }, { "from": "human", "value": "var log = require(\"/api/Log\");\nvar TiShadow = require(\"/api/TiShadow\");\nvar TiDynamicFont = require('yy.tidynamicfont');\n\nexports.loadCustomFonts = function(...
javascript
chosen
[ { "from": "system", "value": "Attach click handler to submit for review button to call API.\n" }, { "from": "human", "value": "function loadPageDataIntoEditor(collectionName){\n\n var pageurl = $('.fl-panel--preview__content').contents().get(0).location.href;\n var pageurldata = \"/data\" + pa...
javascript
chosen
[ { "from": "system", "value": "Fix test to remove dependency on missing controller\n\nThe programYear controller was removed and shouldn't be required in this\ntest.\n" }, { "from": "human", "value": "import { moduleFor, test } from 'ember-qunit';\n\nmoduleFor('controller:program-year/publication...
javascript
chosen
[ { "from": "system", "value": "Revert \"Enable minifying JS code.\" Breaks some code.\n\nThis reverts commit 04637023949910deb0a3f71cbd4784f4018ee680.\n" }, { "from": "human", "value": "var connect = require('connect');\nvar server = connect.createServer();\n\nserver.use(connect.static(__dirname)...
javascript
chosen
[ { "from": "system", "value": "Move into functions the logic for activating and deactivating the plugin on tabs\n" }, { "from": "human", "value": "var activeTabs = {};\n\nchrome.browserAction.onClicked.addListener(function (tab) {\n if (activeTabs[tab.id]) {\n chrome.tabs.sendMessage(ta...
javascript
chosen
[ { "from": "system", "value": "Handle users with PII blocked more gracefully\n" }, { "from": "human", "value": "/**\n * Parse profile.\n *\n * @param {Object|String} json\n * @return {Object}\n * @api private\n */\nexports.parse = function(json) {\n\tif ('string' == typeof json) {\n\t\tjson = JSO...
javascript
chosen
[ { "from": "system", "value": "Correct typo in NEP2 test\n" }, { "from": "human", "value": "import 'react-native'\nimport { encryptWIF, decryptWIF } from '../app/api/crypto'\n\n// use official test vectors from https://github.com/neo-project/proposals/blob/master/nep-2.mediawiki#test-vectors\ncon...
javascript
chosen
[ { "from": "system", "value": "Update labelPrefix to include correct period.\n\nNot sure if we need to add a new test for this file, since this is so minor?\n" }, { "from": "human", "value": "define([\n 'stache!common/templates/visualisations/completion_numbers',\n 'extensions/views/view',\n '...
javascript
chosen
[ { "from": "system", "value": "Fix for blogger vanityUrl in API\n" }, { "from": "human", "value": "var BloggerController = require('./controllers/blogger');\n\nexports.serveRoutes = function(app) {\n\tapp.get('/api/v0.1/bloggers', function(req, res) {\n\t\tBloggerController.getAllProfiles(true, f...
javascript
chosen
[ { "from": "system", "value": "Use a different method for locating an existing stack\n\nShould help with cases where there are too many stacks to receive in a single listStacks request. This way, we should only ever receive a single stack.\n" }, { "from": "human", "value": "\"use strict\";\n\ncon...
javascript
chosen
[ { "from": "system", "value": "Change ordering of test render\n" }, { "from": "human", "value": "import Player from 'props/player';\nimport Menu from 'props/menu';\nimport canvas from 'canvas';\n\nconst playerOne = new Player();\nconst playerTwo = new Player();\nconst menu = new Menu();\n\nplayer...
javascript
chosen
[ { "from": "system", "value": "Add basic JS runtime error notification\n" }, { "from": "human", "value": "/**\n * Copyright (c) 2014, Tidepool Project\n * \n * This program is free software; you can redistribute it and/or modify it under\n * the terms of the associated License, which is identical...
javascript
chosen
[ { "from": "system", "value": "Add for loop lines in the objects\n" }, { "from": "human", "value": "'use strict';\n\nvar firstAndPike = {\n minCust: 23;\n maxCust: 65;\n avgCookieSale: 6.3;\n totalSale[i]:\n\n}\n\nvar seaTacAirport = {\n minCust: 3;\n maxCust: 24;\n avgCookieSale: 1.2;\n ...
javascript
chosen
[ { "from": "system", "value": "Fix invalid path in command line.\n" }, { "from": "human", "value": "'use strict';\nconst program = require('commander');\n\nconst packageInfo = require('./package.json');\n\nconst confc = require('./');\n\nvar files;\n\nprogram\n\t.version(packageInfo.version)\n\t....
javascript
chosen
[ { "from": "system", "value": "Remove isomorphic-fetch exceptions for linting rules\n" }, { "from": "human", "value": "module.exports = {\n extends: '@dosomething/eslint-config/nodejs/8.x',\n globals: {\n // Support fetch mechanism through isomorphic-fetch module\n fetch: true,\n Respo...
javascript
chosen
[ { "from": "system", "value": "Remove previously removed files from serviceWorker cache list\n" }, { "from": "human", "value": "importScripts('js/sw-toolbox.js');\n\nconst version = '0.0.1';\nconst CACHE_NAME = 'inventory' + version;\nvar urlsToCache = [\n 'index.html',\n 'views/allInventor...
javascript
chosen
[ { "from": "system", "value": "Remove space before function parenthesis\n" }, { "from": "human", "value": "var ng = require('angular2/core');\nvar ngHttp = require('angular2/http');\nvar Tech = require('./tech');\nrequire('rxjs/Rx');\n\nmodule.exports = ng.Component({\n selector: 'Techs',\n tem...
javascript
chosen
[ { "from": "system", "value": "Replace hiding-face reaction with coffee reaction\n\nThe coffee reaction is meant to represent \"BRB\".\n" }, { "from": "human", "value": "import m from 'mithril';\n\nclass ReactionPickerComponent {\n\n oninit({ attrs: { game, session } }) {\n this.game = game;\...
javascript
chosen
[ { "from": "system", "value": "Add 'wink' emoji to reaction list\n" }, { "from": "human", "value": "import m from 'mithril';\n\nclass ReactionPickerComponent {\n\n oninit({ attrs: { game, session } }) {\n this.game = game;\n this.session = session;\n }\n\n sendReaction(reaction) {\n t...
javascript
chosen
[ { "from": "system", "value": "Change about section ID from header to about\n" }, { "from": "human", "value": "const About = () => {\n return (\n <header id=\"header\" className=\"component\">\n <a href=\"/\" id=\"about-mainPageButton\">Gå til hovedsiden</a>\n <img className=\"heade...
javascript
chosen
[ { "from": "system", "value": "Add reset() and fetcherOptions to second wrapper\n" }, { "from": "human", "value": "import containerFactory from 'second-container'\nimport Fetcher from 'second-fetcher'\nimport Renderer from 'second-renderer'\nimport createDehydrator from 'second-dehydrator'\n\ncla...
javascript
chosen
[ { "from": "system", "value": "[MTA] Add call function to call exported functions\n\nThe call function is (currently) the only function in the MTA's class prototype, it allows\nyou to easily call http exported functions by the resource's name and the function's name.\nIt also supports sending and returning d...
javascript
chosen
[ { "from": "system", "value": "Fix missing semi colon 🙄\n" }, { "from": "human", "value": "var box = document.getElementsByTagName('a-box')\n\nbox.addEventListener('mouseenter', function () {\n box.setAttribute('color', 'green');\n});" }, { "from": "gpt", "value": "var box = documen...
javascript
chosen
[ { "from": "system", "value": "Add a route called addCompleteMangas\n" }, { "from": "human", "value": "var subscriptions = new SubsManager();\n\nRouter.configure({\n layoutTemplate: 'layout',\n loadingTemplate: 'loading',\n notFoundTemplate: 'notFound'\n});\n\nRouter.route('/', {\n na...
javascript
chosen
[ { "from": "system", "value": "Fix parsing of item strings in first position\n" }, { "from": "human", "value": "import CodeMirror from 'codemirror';\nimport 'codemirror/addon/mode/simple';\n\nvar VAR_REGEX = /(\\?|\\$)[A-Za-z_][A-Za-z0-9\\-_]*/;\nvar STRING_REGEX = /\\\"(\\\\.|[^\\\"])*\\\"/;\nva...
javascript
chosen
[ { "from": "system", "value": "Add newline at end of data file\n" }, { "from": "human", "value": "export default [ { \"id\": \"001\", \"desc\": \"Mail (Primary Address)\"},\n { \"id\": \"002\", \"desc\": \"Email\" },\n { \"id\": \"003\", \"desc\": \"Text message\" ...
javascript
chosen
[ { "from": "system", "value": "Add better support for pug\n\nWhen using `lang=\"pug\"`, passing Boolean `true` as prop and using directives will case errors.\r\n\r\nSee: \r\nhttps://github.com/vuejs/vue-loader/issues/693\r\nhttps://github.com/vuejs/vue-loader/issues/55\r\n\r\nFor example:\r\n\r\n```html\r\n<...
javascript
chosen
[ { "from": "system", "value": "Make linter compatible with Windows\n" }, { "from": "human", "value": "'use strict'\n\nconst path = require('path')\nconst {spawn} = require('child_process')\nconst process = require('process')\n\nconst CONFIG = require('../config')\n\nmodule.exports = async functio...
javascript
chosen
[ { "from": "system", "value": "Add the :8080 part of the url to the socketurl\n" }, { "from": "human", "value": "// Filename: main.js\n\n// Require.js allows us to configure mappings to paths\nrequire.config({\n paths: {\n jquery: 'libs/jquery/jquery-min',\n underscore: 'libs/underscore/un...
javascript
chosen
[ { "from": "system", "value": "Fix drag and drop in Firefox\n" }, { "from": "human", "value": "/** @jsx React.DOM */\n\nvar React = require(\"react\");\n\nvar ModuleButton = React.createClass({\n propTypes: {\n text: React.PropTypes.string.isRequired,\n questionType: React.PropTypes.string...
javascript
chosen
[ { "from": "system", "value": "Allow editing if title description is undefined\n\nChange-Id: I908fd3380d81446f79485ad5ea286ef4861ae897\n" }, { "from": "human", "value": "'use strict';\n\nconst EditTransform = require('wikimedia-page-library').EditTransform;\nconst addHrefToEditButton = require('....
javascript
chosen
[ { "from": "system", "value": "Update the CPU js file\n" }, { "from": "human", "value": "// It's only ES3 compatible\n// You don't have a console.log, you need send a \"debug\"\n\nfunction play(params) {\n var return_obj = {\n 'debug': 'true',\n 'action': 'shoot',\n 'params': params\n ...
javascript
chosen
[ { "from": "system", "value": "Load boardsLink from local storage.\n" }, { "from": "human", "value": "/**\n * Created by xubt on 5/26/16.\n */\n\nkanbanApp.directive('boardBanner', function () {\n return {\n restrict: 'E',\n templateUrl: 'component/board/partials/board-banner.htm...
javascript
chosen
[ { "from": "system", "value": "Add domain and increase expiration" }, { "from": "human", "value": "/* global chrome */\n\nchrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) {\n var endiURL = 'http://www.elnuevodia.com';\n var startsWithURL = tab.url.slice(0, endiURL.length) === ...
javascript
chosen
[ { "from": "system", "value": "Fix exit code handling in Promise.\n" }, { "from": "human", "value": "var spawn = require(\"cross-spawn\");\n\nexport default function (cmd, subcmd = [], options = {}) {\n return new Promise((resolve, reject) => {\n options.maxBuffer = 1024 * 1024;\n ...
javascript
chosen
[ { "from": "system", "value": "Fix the current active template detection\n" }, { "from": "human", "value": "'use strict';\r\n\r\nangular.module('seblucas.slGridListToggle', [])\r\n .directive('slGridListToggle', function() {\r\n return {\r\n restrict: 'E',\r\n require: '^ngModel',\r...
javascript
chosen
[ { "from": "system", "value": "Put the get requests for updating the light into a success to keep things safe.\n" }, { "from": "human", "value": "'use strict';\n\nangular.module('yeoMeanApp')\n .controller('UmmCtrl', function ($scope, $http) {\n $scope.movieList = [];\n\n //Update movieLis...
javascript
chosen
[ { "from": "system", "value": "Update argument to createContentItem in Content\n" }, { "from": "human", "value": "\r\n// ----------------------------------------------------------------\r\n// Content Class\r\n\r\nclass Content {\r\n static get TYPE_NAME_KEY() {\r\n return 0;\r\n }\r\n \r\n ...
javascript
chosen
[ { "from": "system", "value": "Add try/catch into unhandled exception handler\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\n\n/*global nodeca*/\n\n\n\"use strict\";\n\n\nvar app = require('nlib').Application.create({\n name: 'fontomas',\n root: __dirname\n});\n\n\n//\n// Preset appl...
javascript
chosen
[ { "from": "system", "value": "Make sure we have an arg" }, { "from": "human", "value": "/*\n \n ## ##### Copyright (c) - Kevin McGinty\n # _ # ### \n # # # AtomicFrameworks\n \n*/\n\nfunction getParam(param) {\n var query = ne...
javascript
chosen
[ { "from": "system", "value": "Fix display of large components\n\nAdd CSS to allow for oversized components to scroll in all directions. See [issue #1225](https://github.com/storybooks/storybook/issues/1225#issuecomment-307259951)." }, { "from": "human", "value": "import React from 'react';\n\nco...
javascript
chosen
[ { "from": "system", "value": "Fix missing template variable for Location Name\n" }, { "from": "human", "value": "var express = require('express');\nvar router = express.Router();\nvar constants = require('../lib/constants')\nvar windspeed = require('../middleware/windspeed')\n\nrouter.use(windsp...
javascript
chosen
[ { "from": "system", "value": "Update service to get configuration files from public folder\n" }, { "from": "human", "value": "import \"whatwg-fetch\";\nimport { checkStatus, parseJSON } from \"../common\";\n\nconst config = {\n path: \"/src/configs/nuage/configurations/\",\n cachingTime: 3...
javascript
chosen
[ { "from": "system", "value": "Include fetch polyfill by default\n\nCurrently, fetch will be polyfilled for older browsers\nusing the polyfill.io service.\n" }, { "from": "human", "value": "export default ({title=\"\", meta=\"\", links=\"\", content=\"\", initialState={}, env={}, base_path=\"\" }...
javascript
chosen
[ { "from": "system", "value": "feat: Add in first-class citizen test\n" }, { "from": "human", "value": "describe(\"About Classes\", function () {\n\n describe(\"Basic Declaration\", function () {\n\n it(\"should understand base usage\", function () {\n\n //Sugar Syntax for car.prototype\...
javascript
chosen
[ { "from": "system", "value": "Use input event not keyup\n\nThe `oninput` event is a more performant way to detect changes to a\ntextbox’s contents (compared to `onkeydown`, `onpaste`, etc).\n\nIt’s not supported in older browsers, but since this is a likely to be\nused by platform admin users only that’s OK...
javascript
chosen
[ { "from": "system", "value": "Fix broken test in maybeSendVerificationEmail\n" }, { "from": "human", "value": "import Users from \"meteor/vulcan:users\";\nimport { addCallback } from 'meteor/vulcan:core';\n\nconst TRUSTLEVEL1_THRESHOLD = 2000\n\nfunction updateTrustedStatus ({newDocument, vote})...
javascript
chosen
[ { "from": "system", "value": "Copy task no longer in use. May come back in the future though.\n" }, { "from": "human", "value": "var gulp = require('gulp'),\n $ = require('gulp-load-plugins')(),\n browserSync = require('browser-sync'),\n reload = browserSync.reload,\n config = {\n ...
javascript
chosen
[ { "from": "system", "value": "Add update build task for gulp\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar uglify = require('gulp-uglify');\nvar mocha = require('gulp-mocha');\nvar coveralls = require('gulp-coveralls');\nvar rename = require('gulp-rename');\nvar lint = requ...
javascript
chosen
[ { "from": "system", "value": "Fix babel problems in node modules\n" }, { "from": "human", "value": "require('babel-register')();\nrequire('./gulpfile.babel.js');\n" }, { "from": "gpt", "value": "require('babel-register')({\n only: 'node_modules/grrr-gulpfile'\n});\nrequire('./gulpfi...
javascript
chosen
[ { "from": "system", "value": "Fix search bar, not render if fewer 1 or 0 characters\n" }, { "from": "human", "value": "function recipeSearch(input) {\n $(\".drop-down\").remove();\n $.ajax({\n url: \"/recipes\",\n data: input,\n }).done(function(recipeItemPartial) {\n $(recipeItemPar...
javascript
chosen
[ { "from": "system", "value": "Update basepath to new repo\n" }, { "from": "human", "value": "'use strict'\n/*\n * App config for production.\n */\n\nmodule.exports = {\n environment: 'production',\n APIBaseURL: 'https://ifc.ds.io/',\n dataHubURL: 'https://ifc.ds.io/',\n dataHubOrganization: ...
javascript
chosen
[ { "from": "system", "value": "feat(AnnotationStoreProvider): Add a delete method, and also improve method names on publicAPI\n" }, { "from": "human", "value": "import CompositeClosureHelper from '../../../Common/Core/CompositeClosureHelper';\n\n// ------------------------------------------------...
javascript
chosen
[ { "from": "system", "value": "Fix exception when one error is thrown during startup\n" }, { "from": "human", "value": "#!/usr/bin/env node\n\nvar argv = require('minimist')(process.argv.slice(2));\nvar injection = require('./services/injection');\n\nvar port = argv.port || process.env.PORT || 90...
javascript
chosen
[ { "from": "system", "value": "Remove regex pattern from start and stop\n\nIt appears these are no longer regex patterns. :(" }, { "from": "human", "value": "(function() {\n\nDiscourse.Dialect.inlineBetween({\n start: '\\[yuml\\]',\n stop: '\\[\\/yuml\\]',\n rawContents: true,\n emitt...
javascript
chosen
[ { "from": "system", "value": "Adjust jasmine task to generate coverage report\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar apigen = require('gulp-apigen');\nvar phpunit = require('gulp-phpunit');\nvar spawn = require('child_process').spawn;\nvar jasmine = require('gulp-jas...
javascript
chosen
[ { "from": "system", "value": "Add gulp watcher\nRejigged gulp tasks to remove repeated code to run browserify\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp'),\n browserify = require('browserify'),\n transform = require('vinyl-transform'),\n uglify = requir...
javascript
chosen
[ { "from": "system", "value": "Add bower_components path as lib to browser-sync\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar browserSync = require('browser-sync').create();\n\ngulp.task('default', function() {\n browserSync.init({\n server: {\n baseDir: \"./app\"\n...
javascript
chosen
[ { "from": "system", "value": "Add autogenerate code for angular app\n" }, { "from": "human", "value": "var gulp = require('gulp');\n\nvar script_name = \"xut.js\";\n\ngulp.task('download-deps', function (callback) {\n var tsd = require('gulp-tsd');\n tsd({\n command: 'reinstall',\n ...
javascript
chosen
[ { "from": "system", "value": "Put argument values to variables\n" }, { "from": "human", "value": "'use strict';\n\nconst gulp = require('gulp'),\n\n config = require('./gulp/config.json');\n\nlet tasks = Object.keys(config.task),\n defaultTasks = tasks.filter(taskName => {\n retur...
javascript
chosen
[ { "from": "system", "value": "Fix definition files not generating\n\n" }, { "from": "human", "value": "const gulp = require('gulp');\nconst gulp_ts = require('gulp-typescript');\nconst gulp_tslint = require('gulp-tslint');\nconst gulp_sourcemaps = require('gulp-sourcemaps');\nconst tslint = requ...
javascript
chosen
[ { "from": "system", "value": "Include subfolders of `demo` and `test` folders for linting\n" }, { "from": "human", "value": "'use strict';\n\nvar gulp = require('gulp');\nvar eslint = require('gulp-eslint');\nvar htmlExtract = require('gulp-html-extract');\nvar stylelint = require('gulp-stylelin...
javascript
chosen
[ { "from": "system", "value": "Disable comment stripping within cssnano\n\nStylus already strips non-important comments, so we can now keep the\ncopyright information.\n" }, { "from": "human", "value": "var gulp = require('gulp');\nvar sourcemaps = require('gulp-sourcemaps');\nvar stylus = requir...
javascript
chosen
[ { "from": "system", "value": "Fix deletion of code-formatted commands\n\nFixes deletion of commands formatted as code" }, { "from": "human", "value": "'use strict';\n\n// Utils\nconst { print, logError } = require('../../utils/log');\n\n// Bot\nconst bot = require('../../bot');\n\n// DB\nconst m...
javascript
chosen
[ { "from": "system", "value": "Update ignored string to be more specific\n" }, { "from": "human", "value": "// @flow\n\nimport {AppRegistry, YellowBox} from 'react-native'\nimport App from './app'\n\nYellowBox.ignoreWarnings(['Invalid prop `containerTagName`'])\n\nAppRegistry.registerComponent('A...
javascript
chosen
[ { "from": "system", "value": "Add descriptions for error message\n" }, { "from": "human", "value": "import request from \"browser-request\";\n\nconst url = \"http://beta.accesslint.com/api/v1/reports\";\n\nexport default function (message) {\n let violations = message.violations;\n\n if (viola...
javascript
chosen
[ { "from": "system", "value": "Fix regex so that it even passes for App.jsx\n" }, { "from": "human", "value": "var babel = require('babel-jest'),\n jsPath = /.*\\/react\\-seed\\/src\\/js(?:\\/[a-z]+)?(?:\\/__tests__)?\\/[a-zA-Z]+(?:\\-test)?\\.jsx?$/,\n lessPath = /.*\\/react\\-seed\\/src\\...
javascript
chosen
[ { "from": "system", "value": "Edit field encapsulation for cache\n" }, { "from": "human", "value": "\"use strict\";\n\nvar Cache = require('./Cache'),\n inherits = require('inherits');\n\nvar MemCache = function () {\n this._cache = { };\n this._timestamps = { };\n this._expireTime =...
javascript
chosen
[ { "from": "system", "value": "Add injectTapEventPlugin to prevent console error about onTapTouch\n" }, { "from": "human", "value": "import \"bootstrap/dist/css/bootstrap.css\"; //Bootstrap\nimport \"./index.css\"; //NWB Styles\nimport \"./theme.css\"; //Cayman Theme\nimport \"../../node_modules/...
javascript
chosen
[ { "from": "system", "value": "Disable a lot of unneeded events to save RAM\n" }, { "from": "human", "value": "const MotifulClient = require('./structures/MotifulClient');\nconst CommandController = require('./controllers/CommandController');\nconst DiscordAPIError = require('discord.js/src/rest/...
javascript
chosen