Nondeterministic Palindrome Machine
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

is-relative-url

2.0.0 • Public • Published

is-relative-url Build Status

Check if an URL is relative

Install

$ npm install --save is-relative-url

Usage

const isRelativeUrl = require('is-relative-url');
 
isRelativeUrl('foo/bar');
//=> true
 
isRelativeUrl('http://sindresorhus.com/foo/bar');
//=> false
 
isRelativeUrl('//sindresorhus.com');
//=> true

Related

See is-absolute-url for the inverse.

License

MIT © Sindre Sorhus

install

npm i is-relative-url

Downloadsweekly downloads

51,907

version

2.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability