Comparing version 0.0.2 to 0.0.3
@@ -54,2 +54,7 @@ var hat = module.exports = function (bits, base) { | ||
fn.set = function (id, value) { | ||
fn.hats[id] = value; | ||
return fn; | ||
}; | ||
fn.bits = bits || 128; | ||
@@ -56,0 +61,0 @@ fn.base = base || 16; |
{ | ||
"name" : "hat", | ||
"version" : "0.0.2", | ||
"version" : "0.0.3", | ||
"description" : "generate random IDs and avoid collisions", | ||
@@ -5,0 +5,0 @@ "main" : "index.js", |
@@ -33,2 +33,5 @@ var hat = require('../'); | ||
assert.deepEqual(rack.hats[c], [ 'c', 'c', 'c' ]); | ||
rack.set(a, 'AAA'); | ||
assert.equal(rack.get(a), 'AAA'); | ||
}; | ||
@@ -35,0 +38,0 @@ |
Sorry, the diff of this file is not supported yet
6581
150
72