UNPKG

shave

Version:

Shave is a javascript plugin that truncates multi-line text within a html element based on set max height

25 lines (23 loc) 429 B
type Link = { [key: string]: string | number | boolean; }; type Opts = { character?: string; classname?: string; spaces?: boolean; charclassname?: string; link?: Link; delimiter?: string; }; interface Plugin { fn: { shave: (maxHeight: number, opts?: Opts) => void; }; } declare global { interface Window { $: Plugin; jQuery: Plugin; Zepto: Plugin; } }