# @types/replacestream

> TypeScript definitions for replacestream

Latest version **4.0.4** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/replacestream
pnpm add @types/replacestream
yarn add @types/replacestream
bun add @types/replacestream
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 4.0.4 |
| Published | 2023-11-07 |
| First published | 2018-10-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51448 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/replacestream
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/replacestream
- npm.io page: https://npm.io/package/@types/replacestream

## Recent versions

- 4.0.4 (latest) — 2023-11-07
- 4.0.1 (ts3.6) — 2021-07-08
- 4.0.0 (ts2.0) — 2018-10-11
- 4.0.3 — 2023-10-18
- 4.0.2 — 2023-09-27

## README

# Installation
> `npm install --save @types/replacestream`

# Summary
This package contains type definitions for replacestream (https://github.com/eugeneware/replacestream#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/replacestream.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/replacestream/index.d.ts)
````ts
declare namespace ReplaceStream {
    interface Options {
        /**
         * Sets a limit on the number of times the replacement will be made. This
         * is forced to one when a regex without the global flag is provided.
         *
         * Default: `Infinity`
         */
        limit?: number | undefined;
        /**
         * The text encoding used during search and replace.
         *
         * Default: `"utf8"`
         */
        encoding?: string | undefined;
        /**
         * When doing cross-chunk replacing, this sets the maximum length match
         * that will be supported.
         *
         * Default: `100`
         */
        maxMatchLen?: number | undefined;
        /**
         * When doing string match (not relevant for regex matching) whether to do a
         * case insensitive search.
         *
         * Default: `true`
         */
        ignoreCase?: boolean | undefined;
        /**
         * When provided, these flags will be used when creating the search regexes
         * internally.
         *
         * @deprecated as the flags set on the regex provided are no longer mutated
         * if this is not provided.
         */
        regExpOptions?: string | undefined;
    }

    type ReplaceFunction = (match: string, p1: string, offset: number, string: string) => string;
}

declare function ReplaceStream(
    search: RegExp | string,
    replace: ReplaceStream.ReplaceFunction | string,
    options?: ReplaceStream.Options,
): any;

export = ReplaceStream;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Piotr Roszatycki](https://github.com/dex4er).

---
_Source: https://npm.io/package/@types/replacestream · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
