npm

Share private packages across your team with npm Orgs, now with simplified billing via the aws marketplace!Learn more »

hugg

1.1.2 • Public • Published

hugg Build Status npm version

Append strings on both sides of deeply nested strings


Install

npm install --save hugg

Usage

const hugg = require('hugg');
 
hugg(['word1', 'word2'], '$');
//=> ['$word1$', '$word2$']
 
hugg('secondWord', '<br>');
//=> '<br>secondWord<br>'

API

hugg(target, pattern)

target

Type: Anything

pattern

Type: string

Appends pattern on each side of target. Target can be of any data type - although changes will only happen if it contains a nested string as described in deep-blue-string. Hugg will iterate into deeply nested strings in order to alter all occurences of the target


Related


License

MIT © dawsonbotsford

install

npm i hugg

Downloadsweekly downloads

4

version

1.1.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability