lironzluf / dynamic-truncator

Lightweight cross-browser helper library that enables you to truncate by the dimensions of a given element

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dynamic Truncator

Build Status npm version

A Lightweight cross-browser helper library that enables you to truncate text by the dimensions of a given element.

Example

// element is the HTMLDOMElement
// text (string) is optional and taken from the element if not supplied
var dynamicTruncator = DynamicTruncator(element,text);

Install

npm install --save dynamic-truncator

Contribute

Start by

npm install

And then run with

npm start

About

Lightweight cross-browser helper library that enables you to truncate by the dimensions of a given element

License:MIT License


Languages

Language:JavaScript 100.0%