Trimming string whitespace from object, array or string.
npm i trims -S
import trims from 'trims'
trims(' abc ') // => 'abc'
trims({ name: 'Tom ', age: 18 }) => // { name: 'Tom', age: 18 }
trims(['a ', ' b', ' c ']) // => ['a', 'b', 'c']
trims.left([' a', 'b ', ' c ']) // => ['a', 'b ', 'c ']
trims.right({ key: ' value ' }) // => { key: ' value' }
- trims(any)
- trims#left(any)
- trims#right(any)
MIT