1.0.1 • Published 2 years ago

safer-url v1.0.1

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

safer-url

Wrapper around the native URL type but returns null for invalid URLs instead of throwing an error.

Installation

Install safer-url with your favorite package manager:

npm install safer-url

Usage

import safeURL from 'safer-url';

console.log(safeURL('https://tunnel.dev')); // new URL(...)
console.log(safeURL('invalid')); // null
1.0.1

2 years ago

1.0.0

2 years ago