3.0.3 • Published 5 years ago

@hahanova/jsmp-infrastucture-hahan v3.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

@hahanova/jsmp-infrastucture-hahan

npm.io npm.io

The lib can mostly everithing!

processArray

processArray(array, operationType, number) array - array of numbers operationType - type of math operations: sum, sub, mul, div, sqr number(optional) - number, which will be used for math calculation with each array number

processString

processString(string, processType) string - string processType - type of process that will be executed: removeSpaces, reverse, camelCase, emoji (replace all 'a' and 'o' with cock emoji)

Install

$ npm i hahanova/jsmp-infrastucture-hahan

Usage

const hahan = require('@hahanova/jsmp-infrastucture-hahan');

hahan.processArray([1, 2, 3], 'sum', 2);
//=> [3, 4, 5]

hahan.processArray([1, 2, 3], 'sub', 1);
//=> [0, 1, 2]

hahan.processArray([1, 2, 3], 'mul', 2);
//=> [2, 4, 6]

hahan.processArray([1, 2, 3], 'div', 2);
//=> [0.5, 1, 1.5]

hahan.processArray([1, 2, 3], 'sqr');
//=> [1, 4, 9]

hahan.processString('  H  el lo', 'removeSpaces');
//=> "Hello"

hahan.processString('hello world', 'camelCase');
//=> "helloWorld"

hahan.processString('Hello', 'reverse');
//=> "olleH"

hahan.processString('Hello', 'emoji');
//=> "Hell🐓"
3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.0

5 years ago

1.0.0

5 years ago