:scissors: Trim characters from a string.
Trim characters from a string.
$ npm install --save trim-char
import trim from 'trim-char';
trim('foobar', 1); // -> ooba
trim('foobar', 2); // -> ob
Trims the value on both ends.
Type: String
The string to trim.
Type: Number
How much characters to cut off on each end.
MIT © Vu Tran