string-wrapper

0.3.1 • Public • Published

what is this?

Returns string wrapped in specified wrapper string

installation

npm i string-wrapper

usage

wrap(<string_to_wrap>, <wrapper_string>)

import { wrap, wrapP, wrapC, wrapA, wrapS, wrapQ, wrapD } from string-wrapper;

wrap('hello', '#'); // #hello#
wrap(' world ', '***'); // *** world ***
wrap('parenthesis', '()'); // (parenthesis)
wrap('square', '[]'); // [square]
wrap('curly', '{}'); // {curly}
wrap('angle', '<>'); // <angle>

wrapP('paren'); // (paren)
wrapC('curly'); // {curly}
wrapA('angle'); // <angle>
wrapS('square'); // [square]
wrapQ('quote'); // 'quote'
wrapD('double quote'); // "double quote"

Readme

Keywords

Package Sidebar

Install

npm i string-wrapper

Weekly Downloads

1

Version

0.3.1

License

MIT

Unpacked Size

2.43 kB

Total Files

4

Last publish

Collaborators

  • suregi