isDateRaw
Returns true
if the given object
is a Date
. Otherwise, returns false
.
const util = require('node:util');
util.isDate(new Date());
// Returns: true
util.isDate(Date());
// false (without 'new' returns a String)
util.isDate({});
// Returns: false
Content copied to clipboard
Since
v0.6.0