{"name":"semver-store","version":"0.2.2","description":"An extremely fast semver based store","main":"index.js","scripts":{"test":"standard && tap test.js"},"repository":{"type":"git","url":"git+https://github.com/delvedor/semver-store.git"},"keywords":["semver","store","tree"],"author":{"name":"Tomas Della Vedova - @delvedor","url":"http://delved.org"},"license":"MIT","bugs":{"url":"https://github.com/delvedor/semver-store/issues"},"homepage":"https://github.com/delvedor/semver-store#readme","devDependencies":{"benchmark":"^2.1.4","pre-commit":"^1.2.2","standard":"^11.0.1","tap":"^12.0.1"},"gitHead":"7d060d3f7b1f76c5c2d2e662cf8a8f3cc7f01981","_id":"semver-store@0.2.2","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"delvedor","email":"tommydelved@gmail.com"},"dist":{"integrity":"sha512-+cXXIIkMjw1O6MJFlsQgHokDtz3PeCfY2YZVP3D6LmKjKotUOzAeRYGCjEPiR3QivM7Jkacme+66EqwptG1HMg==","shasum":"e6c65e4e94e2e5f662e1efaaa8112dae302cbdcf","tarball":"http://registry-npm.ywwl.com/semver-store/download/semver-store-0.2.2.tgz","fileCount":7,"unpackedSize":17927,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbIX9mCRA9TVsSAnZWagAAdZQP/j4cyC9Fwy5aS6cwGGm3\nWG5cACHT1E3vr7WeCO4STBfarehmpVoINPnZcgZDuhporH9IYu6fsS1I00AO\nPhmdVBCgFKuEF8t+6C9c8n0CYDvGc62DTcOfv3ehBWhl1clC36Jg2ZAB0cVr\nhfFKfYPRUEqx2irdX7uGk3flLBaMRjXJc1hbTe+LTDk2J8Bq427uAq+UbMHP\nowuGWKve1rD0ENnCHOTtvJnoLvlxWPeHtOLvgcb0CdxiZ4hqgyvGcn3NA6rT\nCZiAqLOc5dywg2rK7TqMoYln63TAsT8CNe0+b+xAluzOu8dDG0ignYxkJfdf\nET6FHOMx09+w1BAiD7fiejHinz8CuMDzphrfTcDDv3Xo0DfFmPdkji6C/gtX\nTokGclmKHIAZXGwvcsA7JoAmMqokdEjGzcIHH0pAMlLoYFLA3pnsLKzqEkiP\nqrlIldMdV4tAMuu5Jyx820RSnuRmIkP+2QkakRLPR/FA1OWhkbu2MXCbazas\n+9w08RkErMehxUGeJlKkAOefXr5LoxnOnjBti3RixN8FLTlrYxqygshBGXRi\n/oLvgre4wKKW5NTs4vTEgyW30CH1lioPDcCAQcRey/U7PZJqQ0LoWJAZv6Q1\njwlpxRBwz4QtaZhdZdq7xmYyp4kHbYyaDULYsuLH6CCRRTsG2Pc4QwoFbEpD\nqTmo\r\n=WgsW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB4ffDLY7Fgzvcw3MuXPxcIptGXcZWvY3DkKdKYl+L+EAiEAk7YRZHFQYnQ3ntTYzAw3OiZiy9NTSX4XGAgTQTfuwRE="}],"size":4043,"noattachment":false,"key":"/semver-store/-/semver-store-0.2.2.tgz"},"maintainers":[{"name":"delvedor","email":"tommydelved@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/semver-store_0.2.2_1528921957670_0.7061852014953718"},"_hasShrinkwrap":false,"readme":"# semver-store\n\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/)  [![Build Status](https://travis-ci.org/delvedor/semver-store.svg?branch=master)](https://travis-ci.org/delvedor/semver-store)\n\nAn extremely fast semver based store.\n\n## Install\n```\nnpm i semver-store\n```\n## Usage\nUse it is very easy, you just need to require the library and start adding values.\n```js\nconst store = require('semver-store')()\n\nstore.set('1.2.0', { value: 42 })\n\nconsole.log(\n  store.get('1.2.0') // { value: 42 }\n)\n```\n\n## API\n#### `set(version, store)`\nAdd a document to the store with the specified version.<br/>\nThe version **must** be conform with the [semver](http://semver.org/) specification.\n\n#### `get(version)`\nGet a document from the store with the specified version.<br/>\nThe version string could be a full version string or specify a range, such as `1.x`, in which case the highest version compatible will be returned. Specify `*` to get the highest version available.\n\n#### `del(version)`\nDeletes a document from the store with the specified version.<br/>\nThe version string could be a full version string or specify a range, such as `1.x`, in which case all the compatible values will be deleted.\n\n#### `empty()`\nEmpties the store.\n\n### Why is fast?\n  Internally uses a [prefix tree](https://en.wikipedia.org/wiki/Trie), which allows the search to be extremely performant.\n\n## License\n\nLicensed under [MIT](./LICENSE).\n","publish_time":1528921957753,"_cnpm_publish_time":1528921957753,"dist-tags":{"latest":"0.3.0"}}