up-down-pad

0.0.2 • Public • Published

up-down-pad

Adds a given number of newline characters to both before and after a given string.

NPM Version

Install

$ npm install up-down-pad

Usage

upDownPad = require('up-down-pad')
 
upDownPad('foo', 5)// => "\n\n\n\n\nfoo\n\n\n\n\n"
 
upDownPad('foobar', 6) // => "\n\n\n\n\n\nfoobar\n\n\n\n\n\n"
 
upDownPad(1, 2) // => "\n\n1\n\n"
 
upDownPad(20, -1) // => "20"

Package Sidebar

Install

npm i up-down-pad

Weekly Downloads

8

Version

0.0.2

License

GPL 2.0

Last publish

Collaborators

  • aaliahmad