Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
get-dom-document
Advanced tools
Get a [DOM document](https://developer.mozilla.org/en-US/docs/Web/API/Document) in both Node.js and the browser environment.
Get a DOM document in both Node.js and the browser environment.
getDomDocument
will firstly try to get the DOM document from the global document
object. If it is not available, it will try to create a new DOM document using jsdom
in Node.js environment. If jsdom
is not available or it's not running in Node.js environment, it will return null
.
This package use the browser
field in package.json
and conditional exports to provide different implementations for Node.js and the browser environment.
npm install get-dom-document
CommonJS:
const { getDomDocument } = require("get-dom-document");
const document = getDomDocument();
ES module:
import { getDomDocument } from "get-dom-document";
const document = getDomDocument();
FAQs
Get a [DOM document](https://developer.mozilla.org/en-US/docs/Web/API/Document) in both Node.js and the browser environment.
The npm package get-dom-document receives a total of 21,632 weekly downloads. As such, get-dom-document popularity was classified as popular.
We found that get-dom-document demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.