Comparing version 0.0.0 to 0.0.1
@@ -7,14 +7,23 @@ | ||
var redis = require('./redis') | ||
, Linear = require('./counters/linear'); | ||
, BitMap = require('./counters/bitmap'); | ||
/** | ||
* Create a counter for `key`. | ||
* | ||
* Note: were defaulting to `BitMap` counting for now. | ||
* | ||
* @public | ||
* @param {String} key | ||
* @return {BitMap} | ||
*/ | ||
module.exports = function(key){ | ||
return new Linear(key); | ||
return new BitMap(key); | ||
}; | ||
/** | ||
* Accessor for custom redis client. | ||
* Accessor for setting userland redis client. | ||
* | ||
* @public | ||
* @param {RedisClient} client | ||
*/ | ||
@@ -21,0 +30,0 @@ |
@@ -9,3 +9,3 @@ | ||
/** | ||
* Connection. | ||
* Cached connection. | ||
*/ | ||
@@ -16,3 +16,17 @@ | ||
/** | ||
* Lazy getters. | ||
* Lazy getters for getting our redis client. We | ||
* want it to be a little lazy because the user | ||
* has the option to set thier own redis client | ||
* from our top level api. | ||
* | ||
* Example: | ||
* | ||
* var redis = require('redis'); | ||
* var bitcrunch = require('bitcrunch'); | ||
* | ||
* bitcrunch.redis = redis.createClient(); | ||
* | ||
* @private | ||
* @param {RedisClient} other | ||
* @return {RedisClient} | ||
*/ | ||
@@ -19,0 +33,0 @@ |
{ | ||
"name": "bitcrunch", | ||
"version": "0.0.0", | ||
"description": "streaming cardinatility estimations", | ||
"version": "0.0.1", | ||
"description": "redis analytics for node", | ||
"author": "Garrett Johnson", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
# bitcrunch | ||
Probabilistic counters for node.js, backed by redis. | ||
Redis analytics for node.js. | ||
**Note:** *not ready for production use.* | ||
## linear counting | ||
## Bitmaps | ||
Currently the only structure implemented is a linear counter. It hashes and maps input values to an internal linear identifier via `redis-identity`. | ||
Hashes and maps input values to an internal linear identifier via [redis-identity](https://github.com/gjohnson/redis-identity). You can then ask the bitmap various questions ranging some simple membership to more complex bitwise operations. | ||
@@ -70,7 +70,6 @@ *Basic logic* | ||
- complex logic (and/or/and), kinda requires the promises. | ||
- do we really need to hash values (for linear). | ||
- max-size for linear | ||
- linear NOT. | ||
- linear XOR. | ||
- more counter types (HLL, Bloom, etc). | ||
- do we really need to hash values?. | ||
- NOT. | ||
- XOR. | ||
- more counter types (Linear, HLL, Bloom, etc). | ||
@@ -77,0 +76,0 @@ ## attribution |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
11919
372
84
1