Package Exports
- html-truncate
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (html-truncate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
motivation
To create a library ease to truncate HTML text and keep tag safe
example
var string = '<p><div>hello world</div></p>';
truncate(string, 5) =======> '<p><div>hello</div></p>'
output HTML
string = '<p><div>Do you <b>think</b> it is useful</div></p>';
truncate(string, 10) =======> '<p><div>Do you <b>thi</b></div></p>'
output HTML
demo
./demo
npm package
npm install html-truncate