Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@types/imurmurhash
Advanced tools
TypeScript definitions for imurmurhash
npm install --save @types/imurmurhash
This package contains type definitions for imurmurhash (https://github.com/jensyt/imurmurhash-js).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/imurmurhash.
/**
* 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;
These definitions were written by Jiayu Liu, and Piotr Błażejewicz.
FAQs
TypeScript definitions for imurmurhash
The npm package @types/imurmurhash receives a total of 52,010 weekly downloads. As such, @types/imurmurhash popularity was classified as popular.
We found that @types/imurmurhash demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.