Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

isuri

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isuri

Pure Javascript implementation for truly checking if the provided input is an URI. Based on RFC 3986.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
638
increased by10.57%
Maintainers
1
Weekly downloads
 
Created
Source

isUri

NPM version Build Status Code Climate Test Coverage

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'); // returns true
isUri.test('Bananas in pajamas are coming down the stairs'); // returns false

Benchmarks

> Benchmarking complex-ipv4.js

  Testing URI "http://asdf:qw%20er@127.0.0.1:8000?asdf=12345&asda=fc%2F#bacon"

  isUri#test(uri) x 1,916,525 ops/sec ±0.22% (196 runs sampled)

> 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#test(uri) x 1,367,745 ops/sec ±0.18% (196 runs sampled)

> Benchmarking complex-ipvFuture.js

  Testing URI "http://asdf:qw%20er@[v1.09azAZ-._~!$&'()*+,;=:]:8000?asdf=12345&asda=fc%2F#bacon"

  isUri#test(uri) x 1,485,227 ops/sec ±0.19% (195 runs sampled)

> Benchmarking complex-uri.js

  Testing URI "http://asdf:qw%20er@localhost:8000?asdf=12345&asda=fc%2F#bacon"

  isUri#test(uri) x 2,100,513 ops/sec ±0.18% (197 runs sampled)

> Benchmarking simple-uri.js

  Testing URI "mailto:John.Doe@example.com"

  isUri#test(uri) x 2,314,868 ops/sec ±0.19% (195 runs sampled)

License

MIT

Keywords

FAQs

Package last updated on 16 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc