Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "pad-left"

Index

Variables

Variables

Const padLeft

padLeft: function = memoizeJ<number, string, Stringer<any>>((n, ch = " ") => {const buf = repeat(ch, n);return (x: any) =>x != null? ((x = x.toString()), x.length < n ? buf.substr(x.length) + x : x): buf;})
param

target length

param

pad character(s)

Type declaration

    • (n: number, ch?: string | number): Stringer<any>
    • Parameters

      • n: number
      • Optional ch: string | number

      Returns Stringer<any>

Generated using TypeDoc