get-redirects
TypeScript icon, indicating that this package has built-in type declarations

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.

Dependents (0)

Package Sidebar

Install

npm i get-redirects

Weekly Downloads

14

Version

1.0.0

License

MIT

Unpacked Size

3.99 kB

Total Files

6

Last publish

Collaborators

  • richienb