1.0.0 • Published 4 years ago
get-redirects v1.0.0
Get Redirects
Get the urls redirected to when loading a url.
Install
npm install get-redirects
Usage
const getRedirects = require("get-redirects");
(async () => {
await getRedirects("https://google.com")
//=> ['https://www.google.com/']
await getRedirects("http://richienb.github.io")
//=> ['http://www.richie-bendall.ml/', 'https://www.richie-bendall.ml/']
})()
API
getRedirects(url)
url
Type: string
The URL to check.
1.0.0
4 years ago