Quick module to trim any characters from either side of a string.
MIT License
Trim characters from either side of a string.
npm install trimmer --save
var trim = require('trimmer')
trim(string [, characters])
trim.left(string [, characters])
trim.right(string [, characters])
P.S.: characters
can be one of either an string, array or function.
trim(' test ') //=> 'test'
trim.left(' test ') //=> 'test '
trim.right(' test ') //=> ' test'
trim('test', 't') //=> 'es'
trim('testing', 'ing') //=> 'test'
trim.left('test', 't') //=> 'est'
trim.right('test', 't') //=> 'tes'
MIT