node-murmurhash

murmurhash V2, support utf8 Buffer

npm install node-murmurhash
8 downloads in the last week
16 downloads in the last month

node-murmurhash

Build Status Coverage Status Build Status

NPM

logo

murmurhash V2, support utf8 Buffer.

Install

$ npm install node-murmurhash

Usage

var murmurhash = require('node-murmurhash');

murmurhash('hello 中国', 97); // 1248731102

Benchmark

$ node test/benchmark.js
3389647783
3389647783
3864203294
3300337389
murmurhash(ascii) x 3,528,969 ops/sec ±4.52% (85 runs sampled)
murmurhash2js(ascii) x 4,386,007 ops/sec ±2.50% (93 runs sampled)
murmurhash(utf8) x 3,631,370 ops/sec ±3.10% (94 runs sampled)
murmurhash2js(utf8) x 2,514,194 ops/sec ±1.43% (94 runs sampled)

License

(The MIT License)

Copyright (c) 2013 fengmk2 <fengmk2@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

npm loves you