Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/josepot/int32-fnv1a
https://github.com/josepot/int32-fnv1a
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/josepot/int32-fnv1a
- Owner: josepot
- License: mit
- Created: 2016-07-24T23:21:52.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-07-25T01:20:34.000Z (over 8 years ago)
- Last Synced: 2024-10-31T19:42:06.639Z (7 days ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A 32 bit FNV-1a hash algorithm implementation for hashing `Int32` values (rather than `Strings`).
The output it's also a `Int32`.## Usage
```js
var assert = require('assert');
var hash = require('int32-fnv1a'),assert.ok(
hash(0xe04d9fcb) === 0,
'The hash did not return the expected value'
);
/**
* If you are wondering why the result of this is 0
* visit this page: http://isthe.com/chongo/tech/comp/fnv/
* and look for the following text: `FNV32_1a(e0 4d 9f cb)`
*/```
## Installation
With npm:
npm install --save int32-fnv1a
With git:
git clone git://github.com/josepot/int32-fnv1a.git
## License
[MIT license](https://github.com/josepot/int32-fnv1a/blob/master/LICENSE).