heading-id
v1.0.0
Published
Calculate Heading element id value
Downloads
16
Maintainers
Keywords
Readme
heading-id
Calculate Heading element id value.
Install
$ npm i heading-id --save
Usage
const HeadingId = require('heading-id');
const calculater = new HeadingId();
console.log(calculater.id('新闻标题'));
// 6f185474
console.log(calculater.id('新闻标题'));
// 6f185474-1
console.log(calculater.id('新闻标题'));
// 6f185474-2
console.log(calculater.id('awesome-news'));
// awesome-news
console.log(calculater.id('awesome-news'));
// awesome-news-1
console.log(calculater.id('awesome-news'));
// awesome-news-2
Questions & Suggestions
Please open an issue here.