Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

node-murmurhash

node-modules4.4kMIT2.1.0

murmurhash V2, support utf8 Buffer

node-murmurhash, murmurhash, murmurhashV2, murmurhash2

readme

node-murmurhash

NPM version build status Test coverage Gittip David deps node version npm download

murmurhash V2, support utf8 Buffer.

Install

$ npm install node-murmurhash --save

Usage

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

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

Benchmark

node version: v4.2.1, date: Sun Nov 15 2015 01:01:49 GMT+0800 (CST)
Starting...
2 tests completed.

murmurhash(new Buffer(ascii)) x 21,164,676 ops/sec ±0.85% (98 runs sampled)
murmurhash(new Buffer(utf8))  x 13,926,544 ops/sec ±0.59% (99 runs sampled)

see also: benchmark

License

MIT

changelog

2.1.0 / 2015-11-26

  • feat: use Math.imul (@alsotang)

2.0.1 / 2015-07-21

  • remove & 0xff when retrive byte (@alsotang)
  • simple benchmark. clean code.

2.0.0 / 2015-04-20

  • test: add more boundary test cases
  • feat: pure javascript impl murmurhash v2. Thanks @zhangzifa

1.1.0 / 2015-02-04

  • use node-pre-gyp-qn to prebuild binary package
  • upgrade nan to 1.5.2 support iojs and more node versions

1.0.1 / 2015-01-13

  • Upgrade nan to 1.4.1 for support alinode/iojs

1.0.0 / 2014-09-25

  • bump nan to 1.3.0 support node >= 0.11.13 now
  • add totoro ci tests
  • add missing line to murmur.cc
  • is hard to impl uint32 op in js

0.0.4 / 2014-03-22

  • update deps and add jshint

0.0.3 / 2013-12-10

  • remove node.h, because nan.h had include it

0.0.2 / 2013-12-10

  • .node-gyp/0.11.8/src/node.h:176: error: ‘ssize_t’ does not name a type bug fix

0.0.1 / 2013-12-04

  • add benchmark
  • add logo
  • init