🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

is-date-object

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-date-object

Is this value a JS Date object? This module works cross-realm/iframe, and despite ES6 @@toStringTag.

1.1.0
latest
Version published
Weekly downloads
42M
5.81%
Maintainers
1
Weekly downloads
 
Created

What is is-date-object?

The is-date-object npm package is primarily used for checking if a given value is a Date object. It is a simple utility that can be very useful in situations where type checking is necessary, especially when working with dates in JavaScript. This package provides a straightforward and reliable way to determine if a value is an instance of a Date object.

What are is-date-object's main functionalities?

Check if a value is a Date object

This feature allows you to check if a given value is a Date object. The function returns true if the value is a Date object, and false otherwise. This is particularly useful for validation and error handling in applications that deal with date inputs.

const isDateObject = require('is-date-object');

console.log(isDateObject(new Date())); // true
console.log(isDateObject('2020-01-01')); // false

Other packages similar to is-date-object

FAQs

Package last updated on 13 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts