Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

13 Zeilen
376B

  1. 'use strict';
  2. const url = require('url');
  3. const prependHttp = require('prepend-http');
  4. module.exports = (input, options) => {
  5. if (typeof input !== 'string') {
  6. throw new TypeError(`Expected \`url\` to be of type \`string\`, got \`${typeof input}\` instead.`);
  7. }
  8. const finalUrl = prependHttp(input, Object.assign({https: true}, options));
  9. return url.parse(finalUrl);
  10. };