# @types/passthrough-encoding

> TypeScript definitions for passthrough-encoding

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

## Install

```sh
npm install @types/passthrough-encoding
pnpm add @types/passthrough-encoding
yarn add @types/passthrough-encoding
bun add @types/passthrough-encoding
```

## Health

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

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.2.2 |
| Published | 2023-11-07 |
| First published | 2022-11-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51420 |
| Maintainers | types |

## Links

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

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) *

## Recent versions

- 1.2.2 (latest) — 2023-11-07
- 1.2.0 (ts4.1) — 2022-11-04
- 1.2.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/passthrough-encoding`

# Summary
This package contains type definitions for passthrough-encoding (https://github.com/mafintosh/passthrough-encoding).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passthrough-encoding.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/passthrough-encoding/index.d.ts)
````ts
/// <reference types="node" />

/**
 * An encoder that encodes buffers/strings to a buffer and is
 * [abstract-encoding](https://github.com/mafintosh/abstract-encoding) compatible.
 *
 * @example
 * import * as codec from 'passthrough-encoding'
 *
 * console.log(codec.encode(Buffer.from('hello'))) // prints Buffer('hello')
 * console.log(codec.encode('hello')) // prints Buffer('hello')
 */
export function encode(value: Buffer | string | null | undefined, buffer?: Buffer, offset?: number): Buffer;
export namespace encode {
    const bytes: number;
}

/**
 * An decoder that decodes a buffer to a buffer and is
 * [abstract-encoding](https://github.com/mafintosh/abstract-encoding) compatible.
 *
 * @example
 * import * as codec from 'passthrough-encoding'
 *
 * console.log(codec.decode(Buffer.from('hello'))) // prints Buffer('hello')
 */
export function decode(buffer: Buffer, offset?: number, end?: number): Buffer;
export namespace decode {
    const bytes: number;
}

export function encodingLength(buf: Buffer | string | null | undefined): number;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)

# Credits
These definitions were written by [BendingBender](https://github.com/BendingBender).

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