1. valid-url
URI validation functions
valid-url
Package: valid-url
Created by: ogt
Last modified: Tue, 28 Jun 2022 08:24:01 GMT
Version: 1.0.9
Downloads: 9,725,341
Repository: https://github.com/ogt/valid-url

Install

npm install valid-url
yarn add valid-url

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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code