Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
react-toc-hash-link
Advanced tools
Create a table of contents for react hash link from the given markdown text.
: THIS NPM IS BASED ON react-toc
: JUST ADDED url parameter
and react-router-hash-link
ON HERE
npm install --save react-toc-hash-link
import React from "react";
import Toc from "react-toc-hash-link";
const Example = () => {
const yourMarkdownText = "# test \n your markdown Content # test2\n";
return <Toc markdownText={yourMarkdownText} className={"customClassName"} url={url}/>;
};
export default Example;
: Toc
will return a
tag as HashLink
in react-router-hash-link
: It will make you can use Anchor Link
on React Project
const markdownText = '### 3. This is Example';
...
return <Toc markdownText={markdownText} url={'/post'}/>;
// result : <ul><ul><ul><li><a href="#/post#3.-This-is-Example">3. This is Example</a></li></ul></ul></ul>
:blank
will be replace to '-' on href Anchor url
(url in url parament has no difference)
: result a tag
is adjusted as HashLink
in react-router-hash-link
FAQs
Create a table of contents for react hash link from the given markdown text.
The npm package react-toc-hash-link receives a total of 1 weekly downloads. As such, react-toc-hash-link popularity was classified as not popular.
We found that react-toc-hash-link 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.