1.1.1 • Published 5 years ago

jsmp-infra-yk v1.1.1

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

JSMP Infra YK

The module provides methods for converting arrays and strings.

Installation

Use the package manager npm to install module.

npm install jsmp-infra-yk

Usage

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'
1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago