0.0.3 • Published 7 years ago

mid-pad v0.0.3

Weekly downloads
1
License
WTFPL
Repository
github
Last release
7 years ago

mid-pad

Pads each middle character of a string with supplied string.

Build Status

Requirements

  • node 6.x
  • ES2016

Install

$ npm install mid-pad

Usage

const midPad = require('mid-pad')

midPad('foobar', 1)
// => "f o o b a r"

midPad('foobar', 2, ' ')
// => "f  o  o  b  a  r"

midPad('foobar', 3, '--')
// => "f------o------o------b------a------r"

The third argument can be either a single character or a string.

Changelog

0.0.3

  • Corrected version number sync

0.0.2

  • Fixed some documentation

0.0.1

  • First release.