UNPKG

@maddimathon/utility-typescript

Version:

TypeScript utilities (types, functions, classes) to use in various projects.

29 lines (28 loc) 459 B
/** * @since 0.1.0 * * @packageDocumentation */ /*! * @maddimathon/utility-typescript@2.0.0-beta.5 * @license MIT */ /** * Escapes a string for use in a regular expression. * * @category Functions – Regex * * @source * * @example * ```ts * new RegExp( `^${ escRegExp( filePath ) }\\/.+`, 'g' ); * ``` * * @param str To convert. * * @return Escaped string. * * @since 0.1.0 */ export declare function escRegExp(str: string): string;