# @types/spark-md5

> TypeScript definitions for spark-md5

Latest version **3.0.5** (published 2024-10-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/spark-md5
pnpm add @types/spark-md5
yarn add @types/spark-md5
bun add @types/spark-md5
```

## Health

**Score 55/100 (C)** — status: stable.

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

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 3.0.5 |
| Published | 2024-10-29 |
| First published | 2017-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

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

## Recent versions

- 3.0.5 (latest) — 2024-10-29
- 3.0.4 (ts4.7) — 2023-11-07
- 3.0.2 (ts3.9) — 2019-11-18
- 3.0.1 (ts2.7) — 2018-08-24
- 3.0.3 — 2023-10-18
- 3.0.0 — 2017-07-14

## README

# Installation
> `npm install --save @types/spark-md5`

# Summary
This package contains type definitions for spark-md5 (https://github.com/satazor/js-spark-md5#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/spark-md5.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/spark-md5/index.d.ts)
````ts
// copy of ArrayBuffer because of a conflict with the class SparkMD5.ArrayBuffer
type JsArrayBuffer = ArrayBuffer;

declare class SparkMD5 {
    constructor();

    static hash(str: string, raw?: boolean): string;
    static hashBinary(content: string, raw?: boolean): string;

    append(str: string | JsArrayBuffer): SparkMD5;
    appendBinary(contents: string): SparkMD5;
    destroy(): void;
    end(raw?: boolean): string;
    getState(): SparkMD5.State;
    reset(): SparkMD5;
    setState(state: SparkMD5.State): SparkMD5.State;
}

declare namespace SparkMD5 {
    interface State {
        buff: Uint8Array;
        hash: number[];
        length: number;
    }

    class ArrayBuffer {
        constructor();

        static hash(arr: JsArrayBuffer, raw?: boolean): string;

        append(str: JsArrayBuffer): ArrayBuffer;
        destroy(): void;
        end(raw?: boolean): string;
        getState(): State;
        reset(): ArrayBuffer;
        setState(state: State): State;
    }
}

export = SparkMD5;

````

### Additional Details
 * Last updated: Tue, 29 Oct 2024 11:32:15 GMT
 * Dependencies: none

# Credits
These definitions were written by [Bastien Moulia](https://github.com/bastienmoulia), and [Florian Keller](https://github.com/ffflorian).

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