Gathering detailed insights and metrics for hast-util-is-body-ok-link
Gathering detailed insights and metrics for hast-util-is-body-ok-link
Gathering detailed insights and metrics for hast-util-is-body-ok-link
Gathering detailed insights and metrics for hast-util-is-body-ok-link
npm install hast-util-is-body-ok-link
Typescript
Module System
Node Version
NPM Version
99.7
Supply Chain
99.4
Quality
80.2
Maintenance
100
Vulnerability
100
License
rehype-minify-enumerated-attribute@5.0.2
Updated on Feb 19, 2025
7.0.1
Updated on Sep 27, 2024
rehype-minify-whitespace@6.0.1
Updated on Sep 17, 2024
hast-util-minify-whitespace@1.0.0
Updated on Sep 17, 2024
rehype-remove-comments@6.1.0
Updated on Sep 17, 2024
html-enumerated-attributes@1.1.0
Updated on Nov 01, 2023
JavaScript (100%)
Total Downloads
24,530,639
Last Day
18,560
Last Week
358,796
Last Month
1,530,444
Last Year
11,070,036
MIT License
95 Stars
252 Commits
16 Forks
8 Watchers
1 Branches
13 Contributors
Updated on Jun 03, 2025
Minified
Minified + Gzipped
Latest Version
3.0.1
Package Id
hast-util-is-body-ok-link@3.0.1
Unpacked Size
9.47 kB
Size
3.74 kB
File Count
9
NPM Version
10.8.3
Node Version
22.7.0
Published on
Sep 27, 2024
Cumulative downloads
Total Downloads
Last Day
-9.8%
18,560
Compared to previous day
Last Week
-7.5%
358,796
Compared to previous week
Last Month
2.8%
1,530,444
Compared to previous month
Last Year
212.6%
11,070,036
Compared to previous year
1
hast
utility to check if a link
element is “body OK”.
This package is a utility that, when given a hast node, checks whether it is a “body OK” link.
You can use this package to check whether links can exist inside <body>
(outside of <head>
).
This package is ESM only. In Node.js (version 16+), install with npm:
1npm install hast-util-is-body-ok-link
In Deno with esm.sh
:
1import {isBodyOkLink} from 'https://esm.sh/hast-util-is-body-ok-link@3'
In browsers with esm.sh
:
1<script type="module"> 2 import {isBodyOkLink} from 'https://esm.sh/hast-util-is-body-ok-link@3?bundle' 3</script>
1import {h} from 'hastscript' 2import {isBodyOkLink} from 'hast-util-is-body-ok-link' 3 4isBodyOkLink(h('link', {itemProp: 'foo'})) //=> true 5isBodyOkLink(h('link', {rel: ['stylesheet'], href: 'index.css'})) //=> true 6isBodyOkLink(h('link', {rel: ['author'], href: 'index.css'})) //=> false
This package exports the identifier
isBodyOkLink
.
There is no default export.
isBodyOkLink(node)
Check whether a node is a “body OK” link.
The following nodes are “body OK” links:
link
elements with an itemProp
link
elements with a rel
list where one or more entries are
pingback
, prefetch
, or stylesheet
node
(Node
) — node to check.Whether a node is a “body OK” link (boolean
).
HTML is parsed according to WHATWG HTML (the living standard), which is also followed by all browsers.
The syntax tree used is hast.
This package is fully typed with TypeScript.
Projects maintained by the unified collective are compatible with maintained versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line,
hast-util-is-body-ok-link@^3
,
compatible with Node.js 16.
As rehype works on HTML and improper use of HTML can open you up to a
cross-site scripting (XSS) attack, use of rehype can also be unsafe.
Use rehype-sanitize
to make the tree safe.
See contributing.md
in rehypejs/.github
for ways
to get started.
See support.md
for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
no SAST tool detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-06-23
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