Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

is-dom

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-dom

Check if the given object is a dom node

  • 1.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
518K
decreased by-54.44%
Maintainers
1
Weekly downloads
 
Created

What is is-dom?

The is-dom npm package is a simple utility that allows developers to check if a given object is a DOM element. This can be particularly useful when working with the DOM in a web browser environment, ensuring that operations on elements are only attempted if the object in question is indeed a valid DOM element.

What are is-dom's main functionalities?

Check if an object is a DOM element

This feature allows developers to verify whether a given object is a DOM element. The code sample demonstrates how to use the is-dom package to check if 'document.body' is a DOM element.

var isDom = require('is-dom');

if (isDom(document.body)) {
  console.log('This is a DOM element.');
} else {
  console.log('This is not a DOM element.');
}

Other packages similar to is-dom

Keywords

FAQs

Package last updated on 19 Feb 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc