{
  "name": "hat",
  "version": "0.0.3",
  "description": "generate random IDs and avoid collisions",
  "main": "index.js",
  "directories": {
    "lib": ".",
    "example": "example",
    "test": "test"
  },
  "devDependencies": {
    "expresso": "0.7.x"
  },
  "scripts": {
    "test": "expresso"
  },
  "repository": {
    "type": "git",
    "url": "http://github.com/substack/node-hat.git"
  },
  "keywords": [
    "id",
    "uid",
    "uuid",
    "random",
    "hat",
    "rack",
    "unique"
  ],
  "author": {
    "name": "James Halliday",
    "email": "mail@substack.net",
    "url": "http://substack.net"
  },
  "license": "MIT/X11",
  "engine": {
    "node": ">=0.4"
  },
  "readme": "hat\n===\n\nGenerate random IDs and avoid collisions.\n\n![hat](http://substack.net/images/hat.png)\n\nexamples\n========\n\nhat\n---\n\n````javascript\nvar hat = require('hat');\n\nvar id = hat();\nconsole.log(id);\n````\n\noutput:\n\n````\n0c82a54f22f775a3ed8b97b2dea74036\n````\n\nrack\n----\n\n````javascript\nvar hat = require('hat');\nvar rack = hat.rack();\n\nconsole.log(rack());\nconsole.log(rack());\n````\n\noutput:\n\n````\n1c24171393dc5de04ffcb21f1182ab28\nfabe2323acc1b559dee43d4a1e16cbeb\n````\n\nmethods\n=======\n\nvar hat = require('hat');\n\nhat(bits=128, base=16)\n----------------------\n\nGenerate a random ID string with `bits` of data in a `base`.\n\nLeading zeros are appended such that all outputs for a given number of bits have\nequal length.\n\nvar rack = hat.rack(bits=128, base=16, expandBy)\n------------------------------------------------\n\nMake a new hat rack. Call `rack()` repeatedly to generate new IDs which are\nchecked for collisions.\n\nIf `expandBy` is specified, increment `bits` by this amount if too many\ncollisions occur. If `expandBy` isn't specified, `rack()` will throw if too many\ncollisions occur during generation.\n\nOptionally call `var id = rack(data)` to store `data` at the new ID.\n\nYou can get the data out again with `rack.get(id)` and set the data with\n`rack.set(id, value)`.\n",
  "readmeFilename": "README.markdown",
  "bugs": {
    "url": "https://github.com/substack/node-hat/issues"
  },
  "homepage": "https://github.com/substack/node-hat",
  "_id": "hat@0.0.3",
  "dist": {
    "shasum": "24c960983dc001ec5706bac44504967efc6785a2"
  },
  "_resolved": "https://registry.npmjs.org/hat/-/hat-0.0.3.tgz",
  "_from": "hat@0.0.3"
}
