Comparing version 1.16.1 to 1.16.2
@@ -5,2 +5,6 @@ # Change Log | ||
## [1.16.2] - 07-11-2018 | ||
### Fixed | ||
* Make farmhash an optional dependency due to its need for compilation, which some environments may not support | ||
## [1.16.1] - 07-05-2018 | ||
@@ -276,2 +280,3 @@ ### Fixed | ||
[1.16.2]: https://github.com/featureserver/winnow/compare/v1.16.1...v1.16.2 | ||
[1.16.1]: https://github.com/featureserver/winnow/compare/v1.16.0...v1.16.1 | ||
@@ -278,0 +283,0 @@ [1.16.0]: https://github.com/featureserver/winnow/compare/v1.15.3...v1.16.0 |
var Terraformer = require('terraformer') | ||
var farmhash = require('farmhash') | ||
var transformArray = require('./geometry/transform-array') | ||
@@ -13,2 +12,10 @@ var convertToEsri = require('./geometry/convert-to-esri') | ||
// Try to require farmhash, as it is an optional depenecy we can fall back to JavaScript only hashing library | ||
var hashFunction | ||
try { | ||
hashFunction = require('farmhash').hash32 | ||
} catch (e) { | ||
hashFunction = require('string-hash') | ||
} | ||
sql.MAXSQLCACHESIZE = 0 | ||
@@ -169,3 +176,3 @@ | ||
// Hash to 32 bit unsigned integer | ||
var hash = farmhash.hash32(inputStr) | ||
var hash = hashFunction(inputStr) | ||
// Normalize to range of postive values of signed integer | ||
@@ -172,0 +179,0 @@ return Math.round((hash / 4294967295) * (2147483647)) |
{ | ||
"name": "winnow", | ||
"version": "1.16.1", | ||
"version": "1.16.2", | ||
"description": "Apply sql-like filters to GeoJSON", | ||
@@ -38,3 +38,2 @@ "main": "dist/index.js", | ||
"classybrew": "0.0.3", | ||
"farmhash": "^2.0.5", | ||
"flora-sql-parser": "^0.7.5", | ||
@@ -48,2 +47,3 @@ "highland": "^3.0.0-beta.3", | ||
"srs": "^1.2.0", | ||
"string-hash": "^1.1.3", | ||
"terraformer": "^1.0.7" | ||
@@ -57,3 +57,6 @@ }, | ||
"tape": "^4.6.3" | ||
}, | ||
"optionalDependencies": { | ||
"farmhash": "^2.1.0" | ||
} | ||
} |
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
257879
1420
16
+ Addedstring-hash@^1.1.3
+ Addedstring-hash@1.1.3(transitive)
- Removedfarmhash@^2.0.5