pad-component

Pad strings to a given length

1 个版本
安装
npm install pad-component
yarn add pad-component
pnpm add pad-component
bun add pad-component
README

pad

Trims string whitespace.

Installation

$ npm install pad-component
$ component install component/pad

API

pad(str, len[, char])

Pad str on both sides to the given len, with optional char defaulting to a space.

pad.left(str, len[, char])

Pad str on the left to the given len with optional char.

pad.right(str, len[, char])

Pad str on the right to the given len with optional char.

License

MIT

版本列表
0.0.1 2012-09-26