@botmock-api/text
v0.2.2
Published
process text from the botmock api
Downloads
4
Readme
@botmock-api/text
process text from the botmock api
Installation
npm i @botmock-api/text
wrapEntitiesWithChar(text: string, leftReplacement: string): string
Wraps all occurances of entities in text within leftReplacement
import { wrapEntitiesWithChar } from "@botmock-api/text";
wrapEntitiesWithChar("%alaska% in alamo and %almadovar%", "{");
// {alaska} in alamo and {almadovar}
wrapEntitiesWithChar("%alaska% in alamo and %almadovar%", "[[");
// [[alaska]] in alamo and [[almadovar]]