pad

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.number

Pad a number n of x 0 or another passed character

Params

  1. number*-Number

    The number to pad

  2. width*-Integer

    The width of pad to apply

  3. character”0”String

    The character to use

Example

import { pad } from '@blackbyte/sugar/number'
pad(123, 4) // 0123

Todo

  • testsnormal