Shave is a dependency-free javascript plugin for truncating multiline text to fit within an HTML element, coded and released by Dollar Shave Club.

View project page