
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
tocbase-plugin-auto-id
Advanced tools
A tocbase plugin for automatically generating ids of headings.
A tocbase plugin for automatically generating ids of headings.
tocbase
version 8.4.5 or up.
In your HTML page's <head>
, include the following alongside tocbase
library:
<script src="https://unpkg.com/tocbase-plugin-auto-id@3.0.11/dist/cdn.umd.min.js"></script>
Note: It is recommend to use a fixed version(like above) instead of latest
keyword, to avoid any troubles if breaking changes happen.
This will result in a autoId
variable holding the plugin.
To install it run in your terminal:
npm i tocbase-plugin-auto-id
Import it in your script like below if you are using ESM syntax:
import autoId from "tocbase-plugin-auto-id";
You can also use common js syntax:
const autoId = require("tocbase-plugin-auto-id");
Follow your bundler's instructions for generating the output file and then load it in your HTML page through script tag to use it.
If used, it must be used as the first plugin:
const toc = createToc({
plugins: [ autoId(), ],
});
Below is an example that configures the plugin with options:
const toc = createToc({
plugins: [
autoId({
lowerCase: 0,
separator: "_",
}),
],
});
separator
Type: String
Default: "-"
This is the separator to join words of a heading.
lowerCase
Type: Any value
Default: 1
If it's a truthy value the resulted id is lowercased otherwise the case remains intact.
FAQs
A tocbase plugin for automatically generating ids of headings.
The npm package tocbase-plugin-auto-id receives a total of 0 weekly downloads. As such, tocbase-plugin-auto-id popularity was classified as not popular.
We found that tocbase-plugin-auto-id 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.