is-url-relative-without-domain
![Known Vulnerabilities](https://snyk.io/test/github/arttse/node.is-url-relative-without-domain/badge.svg)
Node.js module. Checks if a URL is relative without domain
Version 2 requires Node.js >= 6.13.
Install
Package domains included
$ npm install is-url-relative-without-domain
$ yarn add is-url-relative-without-domain
Without package domains
$ npm install is-url-relative-without-domain --no-optional
$ yarn add is-url-relative-without-domain --ignore-optional
Usage
var isUrlRelativeWithoutDomain = require('is-url-relative-without-domain');
isUrlRelativeWithoutDomain('/show/must?go=on');
isUrlRelativeWithoutDomain('index.php');
isUrlRelativeWithoutDomain('https://site.com/index.php');
isUrlRelativeWithoutDomain('site.com/show/must?go=on');
By default package using optional dependency domains. But, if you want to using your own list of domains, you can install without optional dependencies and specify code like this:
isUrlRelativeWithoutDomain('site.com/foo/bar', ['com', 'рф', '世界']);
In second argument you can add your own array of domains in Unicode.
License
MIT © 2016-2019 Nikita Bystrov (Arttse)