jsmp-infra-yk

1.1.1 • Public • Published

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'

/jsmp-infra-yk/

    Package Sidebar

    Install

    npm i jsmp-infra-yk

    Weekly Downloads

    1

    Version

    1.1.1

    License

    ISC

    Unpacked Size

    4.53 kB

    Total Files

    6

    Last publish

    Collaborators

    • yevhen_kurylo