Comparing version 1.0.0 to 1.0.1
@@ -13,3 +13,3 @@ 'use strict' | ||
function generate () { | ||
var result = id + '/' + count++ | ||
var result = id + count++ | ||
@@ -31,3 +31,3 @@ if (count === maxInt) { | ||
function baseId (id) { | ||
return new Buffer(uuid.parse(id)).toString('base64') | ||
return new Buffer(uuid.parse(id)).toString('base64').replace(/==$/, '/') | ||
} | ||
@@ -43,3 +43,3 @@ | ||
const result = { | ||
uuid: uuid.unparse(new Buffer(a[1], 'base64')), | ||
uuid: uuid.unparse(new Buffer(a[1] + '==', 'base64')), | ||
count: parseInt(a[2]) | ||
@@ -46,0 +46,0 @@ } |
{ | ||
"name": "hyperid", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Uber-fast unique id generation, for Node.js and the browser", | ||
@@ -5,0 +5,0 @@ "main": "hyperid", |
@@ -33,6 +33,8 @@ # hyperid | ||
const id = hyperid() | ||
const id = instance() | ||
console.log(id) | ||
console.log(instance()) | ||
console.log(hyperid.decode(id)) | ||
console.log(hyperid.decode(instance())) | ||
``` | ||
@@ -39,0 +41,0 @@ |
6755
9
111
74