1.0.0 • Published 5 years ago

heading-id v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

heading-id

NPM version build status Test coverage David deps Known Vulnerabilities npm download

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.

License

MIT