Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
376 B

  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. };