href-type
Test whether an href string is absolute, relative, protocol-relative, #fragment, mailto:, tel:, sms:, etc
Installation
npm install href-type --save
Usage
const hrefType = require('href-type')
hrefType('mailto:zeke@sikelianos.com')
hrefType('tel:+15054592942')
hrefType('sms:+15054592942')
hrefType('https://example.com')
hrefType('http://example.com')
hrefType('irc://irc.example.com')
hrefType('/foo/bar.html')
hrefType('baz/qux.css')
Tests
npm install
npm test
Dependencies
None
Dev Dependencies
- chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
- mocha: simple, flexible, fun test framework
License
MIT
Generated by package-json-to-readme