To use escapeRegExp
function from Lodash in TypeScript, you should first install the Lodash library:
index.ts19 chars2 lines
Then, you can import the escapeRegExp
function and use it in your TypeScript code as shown below:
index.ts169 chars6 lines
Note that _.escapeRegExp
takes a string argument and returns an escaped version of the string that can be used as a pattern in a regular expression.
gistlibby LogSnag