Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Mar 17, 2024 via pnpm

jsdom 22.1.0

A JavaScript implementation of many web standards
Package summary
Share
0
issues
5
licenses
38
MIT
2
BSD-3-Clause
2
BSD-2-Clause
2
other licenses
ISC
1
Apache-2.0
1
Package created
21 Nov 2011
Version published
27 May 2023
Maintainers
6
Total deps
44
Direct deps
23
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
38 Packages, Including:
@tootallnate/once@2.0.0
agent-base@6.0.2
asynckit@0.4.0
combined-stream@1.0.8
cssstyle@3.0.0
data-urls@4.0.0
debug@4.3.4
decimal.js@10.4.3
delayed-stream@1.0.0
domexception@4.0.0
form-data@4.0.0
html-encoding-sniffer@3.0.0
http-proxy-agent@5.0.0
https-proxy-agent@5.0.1
iconv-lite@0.6.3
is-potential-custom-element-name@1.0.1
jsdom@22.1.0
mime-db@1.52.0
mime-types@2.1.35
ms@2.1.2
nwsapi@2.2.7
parse5@7.1.2
psl@1.9.0
punycode@2.3.1
querystringify@2.2.0
requires-port@1.0.0
rrweb-cssom@0.6.0
safer-buffer@2.1.2
symbol-tree@3.2.4
tr46@4.1.1
universalify@0.2.0
url-parse@1.5.10
w3c-xmlserializer@4.0.0
whatwg-encoding@2.0.0
whatwg-mimetype@3.0.0
whatwg-url@12.0.1
ws@8.16.0
xmlchars@2.2.0

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
abab@2.0.6
tough-cookie@4.1.3

BSD 2-Clause "Simplified" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
entities@4.5.0
webidl-conversions@7.0.0

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
saxes@6.0.0

Apache License 2.0

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
use-patent-claims
place-warranty
Cannot
hold-liable
use-trademark
Must
include-copyright
include-license
state-changes
include-notice
1 Packages, Including:
xml-name-validator@4.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

23
All Dependencies CSV
β“˜ This is a list of jsdom 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
abab2.0.64.52 kBBSD-3-Clause
prod
cssstyle3.0.029.46 kBMIT
prod
data-urls4.0.03.48 kBMIT
prod
decimal.js10.4.367.79 kBMIT
prod
domexception4.0.05.52 kBMIT
prod
form-data4.0.010.24 kBMIT
prod
html-encoding-sniffer3.0.03.75 kBMIT
prod
http-proxy-agent5.0.05.72 kBMIT
prod
https-proxy-agent5.0.18.21 kBMIT
prod
is-potential-custom-element-name1.0.11.86 kBMIT
prod
nwsapi2.2.71 BMIT
prod
parse57.1.286.24 kBMIT
prod
rrweb-cssom0.6.011.98 kBMIT
prod
saxes6.0.034.54 kBISC
prod
symbol-tree3.2.48.6 kBMIT
prod
tough-cookie4.1.330.52 kBBSD-3-Clause
prod
w3c-xmlserializer4.0.05.2 kBMIT
prod
webidl-conversions7.0.07.38 kBBSD-2-Clause
prod
whatwg-encoding2.0.03.95 kBMIT
prod
whatwg-mimetype3.0.05.18 kBMIT
prod
whatwg-url12.0.118.6 kBMIT
prod
ws8.16.032.35 kBMIT
prod
xml-name-validator4.0.04.58 kBApache-2.0
prod

Visualizations

Frequently Asked Questions

What does jsdom do?

jsdom is a JavaScript implementation of various web standards, particularly the WHATWG DOM (Document Object Model) and HTML standards. It's designed to be utilized with Node.js and aims to mirror a subset of a web browser to allow for testing and scraping of real-world web applications. jsdom emulates a browser environment, such as JavaScript in an HTML page, running directly in Node.js. It does this by giving JavaScript a sandbox to interact with the DOM, as a web browser would do.

How do you use jsdom?

To use jsdom in your application, you first need to install it via npm by running npm install jsdom. Once it is installed, you can bring it into your JavaScript file and use it as follows:

const jsdom = require("jsdom");
const { JSDOM } = jsdom;

const dom = new JSDOM(`<!DOCTYPE html><p>Hello world</p>`);
console.log(dom.window.document.querySelector("p").textContent); // Logs "Hello world"

In this code, a new instance of JSDOM is created, with the HTML string <!DOCTYPE html><p>Hello world</p> passed into the constructor. The dom object has a window property, which gives access to the entire emulated browser environment. From there, you can use familiar DOM APIs such as document.querySelector.

This is a simple usage example, but jsdom is highly adaptable with numerous options for simulating different scenarios.

Where are the jsdom docs?

The official documentation for jsdom, including a comprehensive API reference and usage examples, is available in the "README" file of the jsdom GitHub repository. The documentation covers everything from basic usage to advanced features and options for customizing the behavior of a jsdom instance.