Installations
npm install dom-parser
Developer Guide
Typescript
Yes
Module System
CommonJS
Node Version
18.18.2
NPM Version
9.8.1
Score
99.5
Supply Chain
89.2
Quality
76
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (98.54%)
JavaScript (1.46%)
Developer
ershov-konst
Download Statistics
Total Downloads
6,470,272
Last Day
4,241
Last Week
22,341
Last Month
174,465
Last Year
2,212,289
GitHub Statistics
111 Stars
78 Commits
22 Forks
5 Watching
7 Branches
3 Contributors
Bundle Size
5.11 kB
Minified
1.91 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.1.5
Package Id
dom-parser@1.1.5
Unpacked Size
14.73 kB
Size
4.73 kB
File Count
11
NPM Version
9.8.1
Node Version
18.18.2
Publised On
12 Nov 2023
Total Downloads
Cumulative downloads
Total Downloads
6,470,272
Last day
12%
4,241
Compared to previous day
Last week
-37.1%
22,341
Compared to previous week
Last month
-14.4%
174,465
Compared to previous month
Last year
59.5%
2,212,289
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
dom-parser
Fast, tiny, zero-dependency DOM parser based on RegExps
Installation
npm install dom-parser
Usage
1import { parseFromString } from 'dom-parser'; 2 3const html = await fs.readFileAsync('htmlToParse.html'); 4 5// Getting DOM model 6const dom = parseFromString(html); 7 8// Searching Nodes 9const rootNode = dom.getElementById('rootNode'); 10const childNodes = rootNode.getElementsByClassName('childNodeClass'); 11
API
Dom
Implemented methods
- getElementById
- getElementsByClassName
- getElementsByTagName
- getElementsByName
Node
Implemented properties
- nodeType
- nodeName
- childNodes
- firstChild
- lastChild
- parentNode
- attributes
- innerHTML
- outerHTML
- textContent
Implemented methods
- getAttribute
- getElementById
- getElementsByClassName
- getElementsByTagName
- getElementsByName
Usage - https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
Contributing
Issues and pull requests are welcome!
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: ISC License: LICENSE:0
Reason
dependency not pinned by hash detected -- score normalized to 5
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bump-build-release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/ershov-konst/dom-parser/bump-build-release.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/bump-build-release.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/ershov-konst/dom-parser/bump-build-release.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/bump-build-release.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/ershov-konst/dom-parser/bump-build-release.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/coverage-badge.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/ershov-konst/dom-parser/coverage-badge.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/coverage-badge.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/ershov-konst/dom-parser/coverage-badge.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/coverage-badge.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/ershov-konst/dom-parser/coverage-badge.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/default.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/ershov-konst/dom-parser/default.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/default.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/ershov-konst/dom-parser/default.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/default.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/ershov-konst/dom-parser/default.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/default.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/ershov-konst/dom-parser/default.yml/main?enable=pin
- Info: 0 out of 8 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 third-party GitHubAction dependencies pinned
- Info: 4 out of 4 npmCommand dependencies pinned
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/bump-build-release.yml:1
- Warn: no topLevel permission defined: .github/workflows/coverage-badge.yml:1
- Warn: no topLevel permission defined: .github/workflows/default.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 6 are checked with a SAST tool
Reason
13 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-h6q6-9hqw-rwfv
- Warn: Project is vulnerable to: GHSA-5fg8-2547-mr8q
- Warn: Project is vulnerable to: GHSA-crh6-fp67-6883
Score
2.8
/10
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More