pad-both

1.0.2 • Public • Published

Pad Both

to add custom string between string

How to use

  var padBoth = require('pad-both')

  var str = 'test'
  var padded = padBoth(str, 8, '-') // --test--

  var padded1 = padBoth(str, 8) //  test  , by default is add space string

API

  padBoth(str: String, length: integer, addString: String(?optional))
  // by default

Readme

Keywords

Package Sidebar

Install

npm i pad-both

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

2.21 kB

Total Files

4

Last publish

Collaborators

  • dicka88