# @types/imurmurhash

> TypeScript definitions for imurmurhash

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

## Install

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

## 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; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2023-11-07 |
| First published | 2019-06-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51438 |
| Maintainers | types |

## Links

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

## Recent versions

- 0.1.4 (latest) — 2023-11-07
- 0.1.1 (ts3.0) — 2020-05-19
- 0.1.0 (ts2.7) — 2019-06-19
- 0.1.3 — 2023-10-18
- 0.1.2 — 2023-09-26

## README

# Installation
> `npm install --save @types/imurmurhash`

# Summary
This package contains type definitions for imurmurhash (https://github.com/jensyt/imurmurhash-js).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/imurmurhash.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/imurmurhash/index.d.ts)
````ts
/**
 * An incremental implementation of MurmurHash3 for JavaScript
 */
interface MurmurHash3 {
    /**
     * Get the result of the hash as a 32-bit positive integer.
     * This performs the tail and finalizer portions of the algorithm, but does not store the result in the state object.
     * This means that it is perfectly safe to get results and then continue adding strings via hash.
     */
    result(): number;

    /**
     * Reset the state object for reuse, optionally using the given seed (defaults to 0 like the constructor). Returns this so calls can be chained.
     * @default 0
     */
    reset(seed?: number): this;

    /**
     * Incrementally add string to the hash.
     * This can be called as many times as you want for the hash state object, including after a call to result()
     */
    hash(value: string): this;
}
declare var MurmurHash3: {
    /**
     * Get a hash state object, optionally initialized with the given string and seed.
     * Seed must be a positive integer if provided.
     * Calling this function without the new keyword will return a cached state object that has been reset.
     * This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one.
     * If this constraint cannot be met, you can use new to create a new state object
     */
    (text?: string, seed?: number): MurmurHash3;
    /**
     * Get a hash state object, optionally initialized with the given string and seed.
     * Seed must be a positive integer if provided.
     * Calling this function without the new keyword will return a cached state object that has been reset.
     * This is safe to use as long as the object is only used from a single thread and no other hashes are created while operating on this one.
     * If this constraint cannot be met, you can use new to create a new state object
     */
    new(text?: string, seed?: number): MurmurHash3;
};

export as namespace MurmurHash3;
export = MurmurHash3;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 03:09:37 GMT
 * Dependencies: none

# Credits
These definitions were written by [Jiayu Liu](https://github.com/Jimexist), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).

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