UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

6 lines (4 loc) 301 B
type ReplaceFunction = (match: string, ...args: any[]) => string; declare function replace(string: string, pattern: RegExp | string, replacement: ReplaceFunction | string): string; declare function replace(pattern: RegExp | string, replacement: ReplaceFunction | string): string; export { replace };