node package manager

Cashew

Cashew - ID Generator for node.js

An ID generator which allows you generate IDs, and identify them based on their type.

Inspiration:

  • Facebook's graph API
  • MongoDB's ObjectIds

Example:

 
var cashew = require('cashew');
 
var userIDGenerator = cashew.generator('users');
 
var userId = userIDGenerator.uid();
 
console.log(cashew.key(userId)); //users