underscore.string
underscore.string copied to clipboard
add mixed arguments (string, array with strings, object with strings) - to library funcs support
The improuvment required.
All func must get not a strings, but a mixed argument: string, array of strings or object. Then fuc must check arg in typeof() and if the arg is array call _.each() for each element of array or object. F.e. var w = _.words(" a, b, c ", ","); var trimmed = _.trim(w);