JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2380495
  • Score
    100M100P100Q186587F

URI validation functions

Package Exports

  • valid-url

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (valid-url) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

URI validation functions

Build Status

Synopsis

Replicates the functionality of http://search.cpan.org/~sonnen/Data-Validate-URI-0.01/lib/Data/Validate/URI.pm (http://anonscm.debian.org/gitweb/?p=users/dom/libdata-validate-uri-perl.git ) into a nodejs module.

#Description

Installation

*fork it to install
*TODO: need add to npm

Usage

var validUrl = require('validUrl');

Methods

is_uri(value)
accepts value as string to be checked as any protocol url
returns undefined if is not url, returns RFC 3986 url if valid

is_http_uri(value, allowHttps)
accepts value as string to be checked as HTTP url, allowHttps as boolean to include https urls (optional)
returns undefined if is not url, returns RFC 3986 url if valid

is_https_uri(value)
accepts value as string to be checked as HTTPS url
returns undefined if is not url, returns RFC 3986 url if valid

is_web_uri(value)
accepts value as string to be checked as HTTP or HTTPS url
returns undefined if is not url, returns RFC 3986 url if valid