@jswork/next-pad-start
v1.0.0
Published
Pad start for next.
Downloads
10
Readme
next-pad-start
Pad start for next.
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.