Licence
GPL-3.0-or-later
Version
1.0.1
Deps
0
Size
39 kB
Vulns
0
Weekly
0
trimer
Removes all characters from the left and right end of a string given an array of characters or a string with one character only.
Install
npm install trimer
Usage
With arrays
const trimer = require('trimer')
trimer(" bbbbbtest ////aaaaa", ["/", " ", "a", "b"])
// 'test'
With strings
const trimer = require('trimer')
trimer("/test////", "/")
// 'test'