Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

get-redirects

1.0.0 • Public • Published

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.

Install

npm i get-redirects

DownloadsWeekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.99 kB

Total Files

6

Last publish

Collaborators

  • avatar