string-wrapper

wrap string with given string

Usage no npm install needed!

<script type="module">
  import stringWrapper from 'https://cdn.skypack.dev/string-wrapper';
</script>

README

what is this?

Returns string wrapped in specified wrapper string

installation

npm i string-wrapper

usage

wrap(<string_to_wrap>, <wrapper_string>)

import { wrap } from string-wrapper;

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