The module provides methods for converting arrays and strings.
Use the package manager npm to install module.
npm install jsmp-infra-yk
import { arrayTransformer, stringTransformer } from 'jsmp-infra-yk';
arrayTransformer([array], ['type', [ number ]]);
type = 'sum' | 'mul' | 'dif' | 'div' # default 'sum'
value = number # default 1
# Example
arrayTransformer([1,2,3], 'mul', 2) # returns [2,4,6]
stringTransformer(string, [trim, [ classify ]]);
trim = true/false # default 'false'
classify = true/false # default 'false'
# Example
stringTransformer(' rest test ', true, true), # returns 'RestTest'