isUri
Pure Javascript implementation for truly checking if the provided input is an URI. Compliant with RFC 3986 and documented!
Install
NPM
$ npm install isuri
Node.js
var isUri = require('isuri');
isUri.test('http://example.com');
isUri.test('Bananas in pajamas are coming down the stairs');
Benchmarks
> Benchmarking complex-ipv4.js
Testing URI "http://asdf:qw%20er@127.0.0.1:8000?asdf=12345&asda=fc%2F#bacon"
isUri
> Benchmarking complex-ipv6.js
Testing URI "http://asdf:qw%20er@[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]:8000?asdf=12345&asda=fc%2F#bacon"
isUri
> Benchmarking complex-ipvFuture.js
Testing URI "http://asdf:qw%20er@[v1.09azAZ-._~!$&'()*+,;=:]:8000?asdf=12345&asda=fc%2F#bacon"
isUri
> Benchmarking complex-uri.js
Testing URI "http://asdf:qw%20er@localhost:8000?asdf=12345&asda=fc%2F#bacon"
isUri
> Benchmarking simple-uri.js
Testing URI "mailto:John.Doe@example.com"
isUri
License
MIT