{"name":"semver-store","version":"0.3.0","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":"fc37430f3937da77021932dcabe42d03ab6f42f3","_id":"semver-store@0.3.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"delvedor","email":"tommydelved@gmail.com"},"dist":{"integrity":"sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg==","shasum":"ce602ff07df37080ec9f4fb40b29576547befbe9","tarball":"http://registry-npm.ywwl.com/semver-store/download/semver-store-0.3.0.tgz","fileCount":7,"unpackedSize":18697,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbOo9yCRA9TVsSAnZWagAAhqcP/1eJGMPkaXHP8BeCtumL\n8kmUHTrLGAD9Mnl9NGRvyNfKGHcAQH0UiLTmCClRnNlKXr3Zytq2qXaQgxhP\niaF5aLBM+srkOxyTXhSLd7z7kR+bGmb0kohHUO6Tj/ps3xn5bFhtYZg8cfnN\nW+attWrVNtMuvasgyTwVxVhky6HK4Aj/Dd5YkyrNl+CUNLqRL4N4dMYJJsmb\ny/4u8W74r4XW3foHvfbUD/MtK3rpnPd3uWsYM2h81a5yFrAZUgFr/QlxA2Lp\nbDtYEvcVonkqhGTZ6yZxJgqDmOYz5+shntCwAcUwlx+gwlUTKfAQII4spNSK\noGYTzIyUDABBcvID5zqbUBsp3XJucnf2DHFhmPJFJQJmULOJAOfW9iWrc6NC\nZ9pqBUHHJfXg4eb7KHuupsnMblsUlvaVOGwHWNlKYW3xCdTxg940hDErAy7G\nVHIADwqpxnrQ1GMlu7epkrh6oG30QFU15MwpWQuyPlUrovre+LBKv+su/2+c\np2FxukQOr9pGQlERiKxb+sL6wHcj22j3sYLEgy2Fw1VuwY3KqO0QIRkR/SOF\nOYqMuBt9lH3zz9X3L0SoJACMU1qb/f8kvPgXPLb9/B/Ps1k1zTXMnzxy8Xr4\nkOn95iJg6W84sEJVIwihxhq/dzpK44qhA0gwHl9rrVRQQXtI2hMt7QX6pU9i\n4CTJ\r\n=6x6o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJJP8FygM6plp3/qeM3iltwSXlEk5RPW3b+b51Kd8/8wIgWLFWsS9XodhKy/lZI1tNonTGcDECnaGCOhuvXx9GFBg="}],"size":4127,"noattachment":false,"key":"/semver-store/-/semver-store-0.3.0.tgz"},"maintainers":[{"name":"delvedor","email":"tommydelved@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/semver-store_0.3.0_1530564466633_0.02030655610187515"},"_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":1530564466688,"_cnpm_publish_time":1530564466688,"dist-tags":{"latest":"0.3.0"}}