1.0.0 • Published 4 years ago

get-redirects v1.0.0

Weekly downloads
49
License
MIT
Repository
github
Last release
4 years ago

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.