Utils package, that provides simple functions to work with arrays and strings
npm install jsmp-infra-utils- replaceElements; Replace all elements of array with provided element
- replaceWords; Replace all words in string with provided string
Here is example how to use replaceElements
``
const {replaceElements} = require("jsmp-infra-utils");
const array = [123, 15 ,55];
const newArray = replaceElements(array, "?");
console.log(newArray) // ["?", "?", "?"];
`
Here is example how to use replaceWords
`
const {replaceWords} = require("jsmp-infra-utils");
const string = "adsf, asdf fd";
const newString = replaceWords(string, "?");
console.log(newString) // "? ? ?";
``