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

mokuji.js

Package Overview
Dependencies
Maintainers
0
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mokuji.js

A table of content JavaScript Library

  • 4.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
66
increased by106.25%
Maintainers
0
Weekly downloads
 
Created
Source

mokuji.js

A table of content JavaScript Library.

Installation

npm install --save mokuji.js

Usage

import { Mokuji } from 'mokuji.js';

const textElement = document.querySelector('.text');
const mokujiList = Mokuji(textElement);

if (!mokujiList) return;

const listElement = document.querySelector('.list');
listElement?.appendChild(mokujiList);

Options

{
  anchorType: true,
  anchorLink: false,
  anchorLinkSymbol: '#',
  anchorLinkPosition: 'before',
  anchorLinkClassName: '',
}

anchorType

(default: true)

Like Wikipedia's anchor, multibyte characters are replaced by escape sequences.

こんにちは.E3.81.93.E3.82.93.E3.81.AB.E3.81.A1.E3.81.AF

(default: false)

enable/disable the anchor link in the headings

anchorLinkSymbol

(default: '#')

set the anchor link symbol

anchorLinkPosition

(default: 'before')

set position (before/after) the anchor link in headings.

Set the position of the anchor link with 'before' or 'after'.

anchorLinkClassName

(default: '')

set anchor link class name.

Keywords

FAQs

Package last updated on 13 Aug 2024

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