Skip to content

isDate

Return true if the given value is a Date object. Instances from [other realms][1] are also supported. [1]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/instanceof#instanceof_and_multiple_realms

Usage

isDate(new Date()); // => true
isDate("hello"); // => false

Installation

Terminal window
npx atmx add helper is-date