https://github.com/chrisvogt/to-https
Transform HTTP URLs and IP addresses to HTTPS URLs
https://github.com/chrisvogt/to-https
convert ftp http https path ssl transform
Last synced: 22 days ago
JSON representation
Transform HTTP URLs and IP addresses to HTTPS URLs
- Host: GitHub
- URL: https://github.com/chrisvogt/to-https
- Owner: chrisvogt
- License: mit
- Created: 2019-01-18T03:30:46.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2025-05-24T07:24:05.000Z (9 months ago)
- Last Synced: 2025-10-05T14:07:50.345Z (4 months ago)
- Topics: convert, ftp, http, https, path, ssl, transform
- Language: JavaScript
- Homepage:
- Size: 724 KB
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# to-https [](https://codecov.io/gh/chrisvogt/to-https?branch=master)
> Convert (almost) any url to https.
## Install
```
$ npm install to-https
```
## Usage
```js
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](https://www.chrisvogt.me)