{"_id":"numeric-id-map","_rev":"237289","name":"numeric-id-map","description":"Data structure that maps entries to numeric ids","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"mafintosh","email":""}],"time":{"modified":"2023-03-24T16:34:20.000Z","created":"2015-08-15T22:57:38.465Z","1.1.0":"2015-08-16T14:08:34.223Z","1.0.0":"2015-08-15T22:57:38.465Z"},"users":{},"author":{"name":"Mathias Buus","url":"@mafintosh"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/numeric-id-map.git"},"versions":{"1.1.0":{"name":"numeric-id-map","version":"1.1.0","description":"Data structure that maps entries to numeric ids","main":"index.js","dependencies":{},"devDependencies":{"standard":"^5.1.0","tape":"^4.2.0"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/numeric-id-map.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/numeric-id-map/issues"},"homepage":"https://github.com/mafintosh/numeric-id-map","gitHead":"949e3719f1f52163d13879e96aaf8a3a0782813e","_id":"numeric-id-map@1.1.0","_shasum":"1110e4445ae683e83d479eadd0f6d9249fda3bd6","_from":".","_npmVersion":"2.13.4","_nodeVersion":"2.5.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"1110e4445ae683e83d479eadd0f6d9249fda3bd6","size":2211,"noattachment":false,"key":"/numeric-id-map/-/numeric-id-map-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/numeric-id-map/download/numeric-id-map-1.1.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"publish_time":1439734114223,"_hasShrinkwrap":false,"_cnpm_publish_time":1439734114223,"_cnpmcore_publish_time":"2021-12-17T00:24:36.440Z"},"1.0.0":{"name":"numeric-id-map","version":"1.0.0","description":"Data structure that maps entries to numeric ids","main":"index.js","dependencies":{},"devDependencies":{"standard":"^5.1.0","tape":"^4.2.0"},"scripts":{"test":"standard && tape test.js"},"repository":{"type":"git","url":"git+https://github.com/mafintosh/numeric-id-map.git"},"author":{"name":"Mathias Buus","url":"@mafintosh"},"license":"MIT","bugs":{"url":"https://github.com/mafintosh/numeric-id-map/issues"},"homepage":"https://github.com/mafintosh/numeric-id-map","gitHead":"6543eed1c27ef5c4c082b1b82ed13da9ca96166f","_id":"numeric-id-map@1.0.0","_shasum":"aa527f51807f5bdda8abad952e8182cc861f85de","_from":".","_npmVersion":"2.13.4","_nodeVersion":"2.5.0","_npmUser":{"name":"mafintosh","email":"mathiasbuus@gmail.com"},"dist":{"shasum":"aa527f51807f5bdda8abad952e8182cc861f85de","size":2105,"noattachment":false,"key":"/numeric-id-map/-/numeric-id-map-1.0.0.tgz","tarball":"http://name.csiicloud.com:7001/numeric-id-map/download/numeric-id-map-1.0.0.tgz"},"maintainers":[{"name":"mafintosh","email":""}],"directories":{},"publish_time":1439679458465,"_hasShrinkwrap":false,"_cnpm_publish_time":1439679458465,"_cnpmcore_publish_time":"2021-12-17T00:24:36.637Z"}},"readme":"# numeric-id-map\n\nData structure that maps entries to numeric ids\n\n```\nnpm install numeric-id-map\n```\n\n[![build status](http://img.shields.io/travis/mafintosh/numeric-id-map.svg?style=flat)](http://travis-ci.org/mafintosh/numeric-id-map)\n\n## Usage\n\n``` js\nvar map = require('numeric-id-map')\nvar ids = map()\n\n// map an entry to a numeric id\nvar id = ids.add({hello: 'world'})\n\n// remove an id and get the data back\n// the id will be reused for another entry\nvar entry = map.remove(id)\n```\n\n## API\n\n#### `var ids = map()`\n\nCreate a new instance\n\n#### `id = ids.add(entry)`\n\nMap an entry to a numberic id.\n\n#### `entry = ids.remove(id)`\n\nRemove an id and return the previously mapped entry.\nAfter removing the id might be reused in the future.\n\n#### `entry = ids.get(id)`\n\nLookup a mapped entry by it's id without removing it\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/mafintosh/numeric-id-map","bugs":{"url":"https://github.com/mafintosh/numeric-id-map/issues"},"license":"MIT"}