npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

is-absolute-url

3.0.0 • Public • Published

is-absolute-url Build Status

Check if an URL is absolute

Install

$ npm install is-absolute-url

Usage

const isAbsoluteUrl = require('is-absolute-url');
 
isAbsoluteUrl('https://sindresorhus.com/foo/bar');
//=> true
 
isAbsoluteUrl('//sindresorhus.com');
//=> false
 
isAbsoluteUrl('foo/bar');
//=> false

Related

See is-relative-url for the inverse.

License

MIT © Sindre Sorhus

install

npm i is-absolute-url

Downloadsweekly downloads

2,913,674

version

3.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability