Gathering detailed insights and metrics for @zkochan/remark-toc
Gathering detailed insights and metrics for @zkochan/remark-toc
npm install @zkochan/remark-toc
Typescript
Module System
Min. Node Version
Node Version
NPM Version
70.9
Supply Chain
98.3
Quality
74.9
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
2,732
Last Day
2
Last Week
7
Last Month
34
Last Year
388
430 Stars
198 Commits
33 Forks
13 Watching
1 Branches
18 Contributors
Minified
Minified + Gzipped
Latest Version
0.2.0
Package Id
@zkochan/remark-toc@0.2.0
Size
6.21 kB
NPM Version
3.8.1
Node Version
5.11.0
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
75%
7
Compared to previous week
Last month
100%
34
Compared to previous month
Last year
-9.3%
388
Compared to previous year
Generate a Table of Contents in remark.
npm:
1npm install remark-toc
remark-toc is also available as an AMD, CommonJS, and globals module, uncompressed and compressed.
Dependencies:
1var remark = require('remark'); 2var toc = require('remark-toc');
Process:
1var doc = remark().use(toc).process([ 2 '# Alpha', 3 '', 4 '## Table of Contents', 5 '', 6 '## Bravo', 7 '', 8 '### Charlie', 9 '', 10 '## Delta', 11 '' 12].join('\n'));
Yields:
1# Alpha 2 3## Table of Contents 4 5- [Bravo](#bravo) 6 7 - [Charlie](#charlie) 8 9- [Delta](#delta) 10 11## Bravo 12 13### Charlie 14 15## Delta
remark.use(toc[, options])
Add a Table of Contents to a Markdown document.
Looks for the first heading containing "Table of Contents"
, "toc"
,
or table-of-contents
(case insensitive, supports alt/title attributes
for links and images too);
Removes all following contents until an equal or higher heading is found;
Inserts a list representation of the hierarchy of following headings;
Adds links to following headings, using the same slugs as GitHub.
Options (Object
, optional):
slug
— Passed to remark-slug
;
heading
(string?
, default: "toc|table[ -]of[ -]contents?"
)
— Heading to look for, wrapped in new RegExp('^(' + value + ')$', 'i');
;
maxDepth
(number?
, default: 6
)
— Maximum heading depth to include in the table of contents,
This is inclusive, thus, when set to 3
, level three headings,
are included (those with three hashes, ###
);
tight
(boolean?
, default: false
)
— Whether to compile list-items tightly.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
security policy file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 1/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-27
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