Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

text-clamp

penyuying16MIT1.0.2TypeScript support: included

处理文字超出最大行数显示...

clamp, text-clamp, 超出行显示点点点

readme

text-clamp

Installation

You can use this package on the server side as well as the client side.

Node.js:

npm install text-clamp

API

clamp(element, options)

Usage

import {clamp} from 'text-clamp'
clamp(element, {
    clamp:2
})