Comparing version 1.1.1 to 1.2.0
11
index.js
@@ -5,2 +5,3 @@ /*jslint node: true */ | ||
var farmhash = require('./build/Release/farmhash'); | ||
var farmhashLegacy = require('./build/Release/farmhash-legacy'); | ||
@@ -66,2 +67,12 @@ // Input validation | ||
}, | ||
// v1 (legacy) implementation of platform dependent hash32 | ||
hash32v1: function(input) { | ||
if (typeof input === 'string') { | ||
return farmhashLegacy.Hash32String(input); | ||
} | ||
if (Buffer.isBuffer(input)) { | ||
return farmhashLegacy.Hash32Buffer(input); | ||
} | ||
throw new Error('Expected a String or Buffer for input'); | ||
}, | ||
@@ -68,0 +79,0 @@ // Fingerprint methods - platform independent |
{ | ||
"name": "farmhash", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"author": "Lovell Fuller <npm@lovell.info>", | ||
@@ -26,3 +26,3 @@ "contributors": [ | ||
"dependencies": { | ||
"nan": "^2.2.0" | ||
"nan": "^2.4.0" | ||
}, | ||
@@ -29,0 +29,0 @@ "license": "Apache-2.0", |
@@ -17,3 +17,3 @@ # farmhash | ||
This module uses FarmHash v1.1.0 (2015-03-01). | ||
It has been tested with Node.js v0.10, v0.12, v4, v5 | ||
It has been tested with Node.js v0.10, v0.12, v4, v6 | ||
on Linux, OS X and Windows. | ||
@@ -99,2 +99,10 @@ | ||
#### hash32v1(input) | ||
Legacy function to access v1 of the FarmHash implementation. | ||
* `input` is the Buffer or String to hash. | ||
Returns a Number containing the 32-bit unsigned integer v1 hash value of `input`. | ||
### Fingerprint | ||
@@ -101,0 +109,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1371839
30
91
167
Updatednan@^2.4.0