fabiospampinato / is

The definitive collection of is* functions for runtime type checking. Lodash-compatible, tree-shakable, with types.
MIT License
16 stars 2 forks source link

New methods: `isURL`/`isURLObject` #7

Open danielbayley opened 3 months ago

danielbayley commented 3 months ago
import {isURL} from 'is';

isURL ( 'https://github.com/fabiospampinato/is' ); // => true
isURL ( new URL ( 'https://github.com/fabiospampinato/is' ) ); // => true
isURL ( 'invalid' ); // => false
import {isURLObject} from 'is';

isURLObject ( new URL ( 'https://github.com/fabiospampinato/is' ) ); // => true
isURLObject ( 'https://github.com/fabiospampinato/is' ); // => false