ismp-infra-updated-data
v1.0.9
Published
Super update array and string
Downloads
11
Readme
What is this?
This is a package for changing strings and update arrays.
UpdateArr multiplies each value in the array by the second argument passed and returns result array.
UpdateStr returns a reverse string in lowercase which passed as first params and adds to the end reversed string which passed as a second param.
Install the package:
npm install smp-infra-updated-data --save
Usage
const {updateArr, updateStr} = require('ismp-infra-updated-data');
updateArr([1,2,3], 3);
updateArr([1,2,3]);
updateStr('Summer', 'a', 's', 'qwerty');
Options
UpdateArr supports 2 params. First params are required, second is optional. The first param is an array of numbers. Second param is a number.
UpdateStr supports 2 params, both of which are strings and required.