jsmp-infra-utils

1.0.4 • Public • Published

Functions

  • replaceElements; Replace all elements of array with provided element
  • replaceWords; Replace all words in string with provided string

Examples

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) // "? ? ?";

Readme

Keywords

Package Sidebar

Install

npm i jsmp-infra-utils

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

6.74 kB

Total Files

6

Last publish

Collaborators

  • ayzrian