SJMP-INFRA-TRANSFORMER
This package is my hometask. Don't download it! But if you want, yo could, why not?
DESCRIPTION
Has a set of two pure functions, which take string (transformString) orarray (transformArray).
- transformString arguments:
- string || null || undefined;
- object || null || undefined:
- repeat (number)
- capitalize (boolean)
- transformArray
- array || null || undefined;
- object || null || undefined:
- newLength (number)
- placeholder (string)
INSTALLATION
try npm i jsmp-infra-transformer -S
or yarn add jsmp-infra-transformer
EXAMPLES
You need to import this package into your project
; //ES6 modules const transformer = ; //Old-fashioned syntax
Next you could just use it like this:
const string = 'Hello!';const transformedString = transformer; // Hello!Hello!
const string = 'heLLO!';const transformedString = transformer; // Hello!
const string = 'hello!';const transformedString = transformer; // Hello!hello!
const array = ;const transformedArray = transformer; //[empty × 2]
const array = 'somedata' 'someAnotherData';const transformedArray = transformer; //['@', '@']
const array = 'somedata' 'someAnotherData';const transformedArray = transformer; //['@', '@', '@']