@types/imurmurhash

  • Version 0.1.1
  • Published
  • 4.91 kB
  • No dependencies
  • MIT license

Install

npm i @types/imurmurhash
yarn add @types/imurmurhash
pnpm add @types/imurmurhash

Overview

TypeScript definitions for imurmurhash

Index

Variables

variable MurmurHash3

var MurmurHash3: {
(text?: string, seed?: number): MurmurHash3;
new (text?: string, seed?: number): MurmurHash3;
};

    Interfaces

    interface MurmurHash3

    interface MurmurHash3 {}
    • An incremental implementation of MurmurHash3 for JavaScript

    method hash

    hash: (value: string) => 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()

    method reset

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

    method result

    result: () => number;
    • 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.

    Package Files (1)

    Dependencies (0)

    No dependencies.

    Dev Dependencies (0)

    No dev dependencies.

    Peer Dependencies (0)

    No peer dependencies.

    Badge

    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/imurmurhash.

    • Markdown
      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/imurmurhash)
    • HTML
      <a href="https://www.jsdocs.io/package/@types/imurmurhash"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>