{"name":"semver-store","version":"0.1.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","semver":"^5.5.0","standard":"^11.0.1","tap":"^12.0.1"},"gitHead":"1ac262163419e91ca6be6a36f3aacb23d2b8144d","_id":"semver-store@0.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.11.1","_npmUser":{"name":"delvedor","email":"tommydelved@gmail.com"},"dist":{"integrity":"sha512-/kwe+u/pHhkz11ZMJc9mxXugK4otm9n2PsHYfVSF/QTerZEAfD/HHtS10G4X60DKdjE+HDmVJj2sWtleHSInCg==","shasum":"3eebc35f14ad0eeb97e195c6336bb999283fe4a1","tarball":"http://registry-npm.ywwl.com/semver-store/download/semver-store-0.1.0.tgz","fileCount":7,"unpackedSize":8791,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbGp8FCRA9TVsSAnZWagAA0hYQAIobUQ078BS/aGKas/RA\nClBEw5ql3pC7V0tc6d/PW7ihbaUsinEzybW1ET2dP026h483Oo/kLFCOC5SF\nPpvARLQc7pdyLw3jjQMdAoJdf2ycN925qyNnt4jBZv5fu1gtCyCpL0ygP7vH\newIE5Bg5uhgWmo7/qbbKLlhCMyVU5NhhgAkPDdpEjB3u2RGNgRLgrWKbERhK\ngc5XnIN43cfdWXglPUVA7yhiojJNYVf+Ib0P+gONENivpUcoiHXWavk3sUp0\n7L3fe1x5U6jvFE21O1SZk9hRH5zdH0w83AmeOwfsFbOZ1ldqnskXOO4A++mI\n8W5iaPFqQQjUx2n0mQoZT+Ee6Hl7k/cDZ76LRrpWB20LPj4mUxCeGHZfQR8F\nyPm9DPgnzkXnia41sxCxaDQJGcCSuh6bqYFtnJuB0T2Q+6A3ZzDGcYutCLpF\nBtLCxPFz65IHUYqWDXJFNPrzLqJaECafvjtoXMYuL67NV7PZHCyRj9Xasof9\noZQZsz3IkyEq4IDkQHV21Xbz8Vr6g7I3C4dDkCwiSvzV/8SxoIphrF0xBTub\ncFGXQ8RVtA8SxZ0VsLYwRvUN/YPvHSWlo63jyFMahIDdO+FZLmHIQcxOL0M9\n65Ciha72tXJZnklQuYCcaZLYqW89e1+T7XB+osDmgl4NGzp+h++NJGvIuvH2\nyev8\r\n=wzge\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICDy34yFw7Ekz3u6aHsJKyDwArUvCnodtlc8fiUo/lBaAiBNNcwjm6HQ4VuypX1/8EOdlvDDG+7krbGBMfiL6+RSmw=="}],"size":2928,"noattachment":false,"key":"/semver-store/-/semver-store-0.1.0.tgz"},"maintainers":[{"name":"delvedor","email":"tommydelved@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/semver-store_0.1.0_1528471300294_0.7894550318090641"},"_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":1528471300347,"_cnpm_publish_time":1528471300347,"dist-tags":{"latest":"0.3.0"}}