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

Package detail

@jswork/next-pad-start

afeiship8MIT1.0.0

Pad start for next.

pad, pad-left, pad-start

readme

next-pad-start

Pad start for next.

version license size download

installation

npm install -S @jswork/next-pad-start

usage

import '@jswork/next-pad-start';

nx.padStart('abc', 3, '0'); // 'abc'
nx.padStart('abc', 5, '0'); // '00abc'

other solution

('0' + 1).slice(-2)
// "01"
('0' + 12).slice(-2)
// "12"

license

Code released under the MIT license.