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

@beneb/remark-behead

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@beneb/remark-behead

Add or remove heading levels

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

.

behead Build Status

Behead is a remark plugin to increase and decrease the weight of markdown headings. Passing a negative value to the weight option will decrease the heading weight. Passing a positive value to the weight option will increase the heading weight

install

npm install [ --save ] @ben-eb/remark-behead
then
import behead from 'remark-behead'

Meta

  • version: 1.5.2
  • author: mrzmmr

options

Properties

options.after

Manipulates heading nodes after but not including the given string. Note: When using this option, behead will start working after the first occurrence of the given string.

Examples

remark.use(behead, {weight: 1, after: '# After this'})
  .process('# After this\n## Hello\n## World')

  => '# After this\n# Hello\n# World\n'

options.before

Manipulates heading nodes before but not including the given string. Note: When using this option, behead will stop working at the first occurrence of the given string.

Examples

remark.use(behead, {weight: 1, before: '# Before this'})
  .process('# Hello\n# World\n# Before this')

  => '## Hello\n## World\n# Before this\n'

options.between

Manipulates heading nodes between but not including the two given strings, starting with options.between[0] and ending with options.between[1].

Examples

remark(behead, {weight: 1, between: ['# Hello', '# World']})
  .process('# Hello\n# Between\n# World')

  => '# Hello\n## Between\n# World\n'

Keywords

FAQs

Package last updated on 16 Dec 2016

Did you know?

Socket

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.

Install

Related posts

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