A Lightweight cross-browser helper library that enables you to truncate text by the dimensions of a given element.
// element is the HTMLDOMElement
// text (string) is optional and taken from the element if not supplied
var dynamicTruncator = DynamicTruncator(element,text);
npm install --save dynamic-truncator
Start by
npm install
And then run with
npm start