Skip to content

stringInsert

kherP edited this page Jan 2, 2020 · 2 revisions

This utility inserts values into a string.

Example

const result = stringInsert("this is a @stationery@.", { stationery: "pencil" });
console.log(result); // "this is a pencil."

Properties

Param Type Description
str string The string that contains the variables
params { [key: string]: string | number | boolean } The params to insert into the string message
symbol string Optional param - Default: @. The symbol to look for to insert the params in the string message
Clone this wiki locally