trim-http
v1.0.2
Published
Removes the http:// or https:// prefix from a URL string
Maintainers
Readme
trim-http
Canonical URL:
https://alexstevovich.com/a/trim-http-nodejs
Software URL:
https://midnightcitylights.com/software/trim-http-nodejs
Removes the http:// or https:// prefix from a URL string.
Installation
npm install trim-httpExample
import trimHttp from 'trim-http';
console.log(trimHttp('https://alexstevovich.com'));
// → "alexstevovich.com"
console.log(trimHttp('http://example.org'));
// → "example.org"
console.log(trimHttp('ftp://example.org'));
// → "ftp://example.org" (unchanged)License
Licensed under the MIT License.
