$ cnpm install prepend-http
Prepend
https://to humanized URLs likesindresorhus.comandlocalhost
$ npm install prepend-http
const prependHttp = require('prepend-http');
prependHttp('sindresorhus.com');
//=> 'https://sindresorhus.com'
prependHttp('localhost', {https: false});
//=> 'http://localhost'
prependHttp('https://sindresorhus.com');
//=> 'https://sindresorhus.com'
Type: string
URL to prepend https:// to.
Type: object
Type: boolean
Default: true
Prepend https:// instead of http://.
MIT © Sindre Sorhus
Copyright 2013 - present © cnpmjs.org