to-https
v1.1.0
Published
Transform HTTP URLs and IP addresses to HTTPS URLs.
Downloads
6
Maintainers
Readme
to-https
Convert (almost) any url to https.
Install
$ npm install to-https
Usage
const toHttps = require('to-https');
toHttps('http://www.chrisvogt.me');
//=> 'https://www.chrisvogt.me'
toHttps('//my.cdn.com/image.png');
//=> 'https://my.cdn.com/image.png'
toHttps('127.0.0.1');
//=> 'https://127.0.0.1'
API
toHttps(input)
input
Type: string
The url or address to convert to HTTPS.
License
MIT © Chris Vogt