{"name":"semver-store","version":"0.2.1","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","standard":"^11.0.1","tap":"^12.0.1"},"gitHead":"bd3b73419d320cf4a6dfc4d8e48b633d4bad2e15","_id":"semver-store@0.2.1","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"delvedor","email":"tommydelved@gmail.com"},"dist":{"integrity":"sha512-+/F6G1OpOIU82U6oBruSL24TfvF3rtTgP/3tiBktMNazXcr2qS+Zp1pPyBHMyXIhjlBzRhAfjck1wfVawxqPCQ==","shasum":"fdf86374052bb903251c5336ec1aa1d14cc93c13","tarball":"http://registry-npm.ywwl.com/semver-store/download/semver-store-0.2.1.tgz","fileCount":7,"unpackedSize":17748,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbIOD3CRA9TVsSAnZWagAAANQP/j1RlDXWhMDeyn0ioyMr\nq5vUa7vXxdVRNpA3sKq6hxyCVdaZayPZv9KY8yONvNAEmz70VhqQxp1iZ3Ki\nsy1x5vdQ9BFRhjv8ig+uRLGIDLzB3ymKgBbNNN0j8LYm38V6d8e7QWVYiHUE\nK5nphF8LF7jBpHo0iVDg31JL9+1kyPQB5PWMh9yMt71Qler3fIAPnO+JoUsN\nH8NT5fB8hsjo8DdqLQOLRu+Z5HhPn7yAGo2KAqlDKK1bl+LgILkjkYkwaQhG\ngVpS7VffK3F9Wksa9+NVErKc34oKIbN83EhHWz9CFo08G05nQBwy8HsawG0S\nmiDTZ5B/Z8309/DUiZFglHjARmIY2oYd0CLACNNxfDROECfBebF1M5VEtH6k\nXROljuWMyEp/Oy5yxF6CT14yMtravL39h1vHYn8YPzsW3c0ydb9uOpdc9l/i\nZOo1X5fQKsCXasEG9XgodrM3FQ+W98KtMtD55LtmFBF34KZaIQ0XXLSHK/rd\ncRe7wLdguyic3ou9aHnOtYeN57kS6787VlDs+qRZoNh37hU3xgrGpK9B+mBg\nt9MWKtOgHdeSE6zeoEX9SIEfnv/BFPsT66ORMQOR70q/nnjHkaM5rreLiecS\nNIC+juGzg4jQz7yU2lMzTqmVCojINMiNp8dwr+vuyzPZEg3s6Zc5MWW20Nvp\npM8Z\r\n=MmPU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+hZezLukCGOQI/JyQkifO8QAu04JYvtnIVjjjH2dGaAIgGwMItx7RoSfyUZX0rseULXo1XqeO2Ek09rjw/aJ9DpA="}],"size":3968,"noattachment":false,"key":"/semver-store/-/semver-store-0.2.1.tgz"},"maintainers":[{"name":"delvedor","email":"tommydelved@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/semver-store_0.2.1_1528881399292_0.1886140673567953"},"_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":1528881399356,"_cnpm_publish_time":1528881399356,"dist-tags":{"latest":"0.3.0"}}