Skip to content

Richienb/get-redirects

Repository files navigation

Get Redirects Travis CI Build Status

Get the urls redirected to when loading a url.

NPM Badge

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.

About

Get the urls redirected to when loading a url.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published