isDate
Validates if the supplied input is a date (Date
instance).
Signature
isDate(input: any): boolean
Parameters
Name | Type | Optional | Description |
---|---|---|---|
input | any | No | Input to validate. |
Return value
Returns true
if the input is a date.
Example
import { isDate } from "@tripetto/builder";
isDate(new Date()); // Returns `true`