Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rehype-slug

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rehype-slug - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

20

package.json
{
"name": "rehype-slug",
"version": "2.0.2",
"description": "Add id attributes to headings",
"version": "2.0.3",
"description": "rehype plugin to add id attributes to headings",
"license": "MIT",
"keywords": [
"unified",
"rehype",
"plugin",
"heading",
"slug",

@@ -30,13 +32,13 @@ "id"

"browserify": "^16.0.0",
"nyc": "^13.0.0",
"prettier": "^1.13.7",
"rehype": "^6.0.0",
"nyc": "^14.0.0",
"prettier": "^1.0.0",
"rehype": "^7.0.0",
"remark-cli": "^6.0.0",
"remark-preset-wooorm": "^4.0.0",
"remark-preset-wooorm": "^5.0.0",
"tape": "^4.0.0",
"tinyify": "^2.4.3",
"xo": "^0.23.0"
"tinyify": "^2.0.0",
"xo": "^0.24.0"
},
"scripts": {
"format": "remark . -qfo && prettier --write '**/*.js' && xo --fix",
"format": "remark . -qfo && prettier --write \"**/*.js\" && xo --fix",
"build-bundle": "browserify index.js -s rehypeSlug > rehype-slug.js",

@@ -43,0 +45,0 @@ "build-mangle": "browserify index.js -s rehypeSlug -p tinyify > rehype-slug.min.js",

@@ -6,15 +6,18 @@ # rehype-slug

[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]
Add `id`s to headings with [**rehype**][rehype].
[**rehype**][rehype] plugin to add `id`s to headings.
## Installation
## Install
[npm][]:
```bash
```sh
npm install rehype-slug
```
## Usage
## Use

@@ -33,3 +36,3 @@ Say we have the following file, `fragment.html`:

```javascript
```js
var fs = require('fs')

@@ -62,5 +65,5 @@ var rehype = require('rehype')

Adds `id` properties to h1-h6 headings which don’t already have one.
Add `id` properties to h1-h6 headings that don’t already have one.
Uses [**github-slugger**][ghslug] (thus creating GitHub style `id`s).
Uses [**github-slugger**][ghslug] to create GitHub style `id`s.

@@ -74,7 +77,9 @@ ## Related

See [`contributing.md` in `rehypejs/rehype`][contribute] for ways to get
started.
See [`contributing.md`][contributing] in [`rehypejs/.github`][health] for ways
to get started.
See [`support.md`][support] for ways to get help.
This organisation has a [Code of Conduct][coc]. By interacting with this
repository, organisation, or community you agree to abide by its terms.
This project has a [Code of Conduct][coc].
By interacting with this repository, organisation, or community you agree to
abide by its terms.

@@ -99,2 +104,12 @@ ## License

[size-badge]: https://img.shields.io/bundlephobia/minzip/rehype-slug.svg
[size]: https://bundlephobia.com/result?p=rehype-slug
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[collective]: https://opencollective.com/unified
[chat-badge]: https://img.shields.io/badge/join%20the%20community-on%20spectrum-7b16ff.svg

@@ -106,2 +121,10 @@

[health]: https://github.com/rehypejs/.github
[contributing]: https://github.com/rehypejs/.github/blob/master/contributing.md
[support]: https://github.com/rehypejs/.github/blob/master/support.md
[coc]: https://github.com/rehypejs/.github/blob/master/code-of-conduct.md
[license]: license

@@ -114,5 +137,1 @@

[ghslug]: https://github.com/Flet/github-slugger
[contribute]: https://github.com/rehypejs/rehype/blob/master/contributing.md
[coc]: https://github.com/rehypejs/rehype/blob/master/code-of-conduct.md
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc