@botmock-api/text
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

@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]]

Readme

Keywords

Package Sidebar

Install

npm i @botmock-api/text

Weekly Downloads

3

Version

0.2.2

License

MIT

Unpacked Size

8.3 kB

Total Files

15

Last publish

Collaborators

  • zohaibahmed92
  • obaidahmed