8000 GitHub - alexghr/html-ellipsis: truncates a html string without messing up the tags
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

alexghr/html-ellipsis

Repository files navigation

html-ellipsis

NPM Test semantic-release: angular npm npm

Truncates a html string without messing up HTML tags

npm install --save html-ellipsis

Example

var ellipsis = require('html-ellipsis');
var text = 'Lorem <span class="ipsum"><b>ips<i>um</i></b></span>';
console.log(ellipsis(text, 11, true)); // Lorem <span class="ipsum"><b>ips<i>u</i></b></span>&hellip;

License

See LICENSE

About

truncates a html string without messing up the tags

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  
0