valid-url

URI validation functions

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
valid-url
1.0.911 years ago11 years agoMinified + gzip package size for valid-url in KB

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

` isuri(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
httpuri(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
httpsuri(value) `
accepts value as string to be checked as HTTPS url
returns undefined if is not url, returns RFC 3986 url if valid
` is
weburi(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