{"name":"datastore-core","version":"6.0.3","description":"Wrapper implementation for interface-datastore","leadMaintainer":"Alex Potsides <alex.potsides@protocol.ai>","main":"./cjs/src/index.js","types":"types/src/index.d.ts","exports":{"./":{"browser":"./esm/src/index.js","require":"./cjs/src/index.js","import":"./esm/src/index.js"},"./base":{"browser":"./esm/src/base.js","require":"./cjs/src/base.js","import":"./esm/src/base.js"},"./errors":{"browser":"./esm/src/errors.js","require":"./cjs/src/errors.js","import":"./esm/src/errors.js"},"./keytransform":{"browser":"./esm/src/keytransform.js","require":"./cjs/src/keytransform.js","import":"./esm/src/keytransform.js"},"./memory":{"browser":"./esm/src/memory.js","require":"./cjs/src/memory.js","import":"./esm/src/memory.js"},"./mount":{"browser":"./esm/src/mount.js","require":"./cjs/src/mount.js","import":"./esm/src/mount.js"},"./namespace":{"browser":"./esm/src/namespace.js","require":"./cjs/src/namespace.js","import":"./esm/src/namespace.js"},"./shard":{"browser":"./esm/src/shard.js","require":"./cjs/src/shard.js","import":"./esm/src/shard.js"},"./sharding":{"browser":"./esm/src/sharding.js","require":"./cjs/src/sharding.js","import":"./esm/src/sharding.js"},"./tiered":{"browser":"./esm/src/tiered.js","require":"./cjs/src/tiered.js","import":"./esm/src/tiered.js"}},"scripts":{"clean":"rimraf dist types","prepare":"aegir build --no-bundle && cp -R types dist","lint":"aegir ts -p check && aegir lint","build":"aegir build","release":"aegir release --target node","release-minor":"aegir release --type minor --target node","release-major":"aegir release --type major --target node","pretest":"aegir build --esm-tests","test":"aegir test","dep-check":"aegir dep-check -i rimraf"},"repository":{"type":"git","url":"git+https://github.com/ipfs/js-datastore-core.git"},"keywords":["interface","key-value","ipfs","datastore"],"author":{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/ipfs/js-datastore-core/issues"},"homepage":"https://github.com/ipfs/js-datastore-core#readme","devDependencies":{"@types/debug":"^4.1.5","aegir":"^35.0.2","interface-datastore-tests":"^2.0.3","it-all":"^1.0.4","rimraf":"^3.0.2","util":"^0.12.4"},"dependencies":{"debug":"^4.1.1","err-code":"^3.0.1","interface-datastore":"^6.0.2","it-drain":"^1.0.4","it-filter":"^1.0.2","it-map":"^1.0.5","it-merge":"^1.0.1","it-pipe":"^1.1.0","it-pushable":"^1.4.2","it-take":"^1.0.1","uint8arrays":"^3.0.0"},"engines":{"node":">=12.0.0"},"eslintConfig":{"extends":"ipfs","parserOptions":{"sourceType":"module"}},"contributors":[{"name":"achingbrain","email":"alex@achingbrain.net"},{"name":"David Dias","email":"daviddias.p@gmail.com"},{"name":"Friedel Ziegelmayer","email":"dignifiedquire@gmail.com"},{"name":"Hugo Dias","email":"hugomrdias@gmail.com"},{"name":"Hector Sanjuan","email":"code@hector.link"},{"name":"Zane Starr","email":"zcstarr@zaner.attlocal.net"},{"name":"Jacob Heun","email":"jacobheun@gmail.com"},{"name":"ᴠɪᴄᴛᴏʀ ʙᴊᴇʟᴋʜᴏʟᴍ","email":"victorbjelkholm@gmail.com"},{"name":"Pedro Teixeira","email":"i@pgte.me"},{"name":"Bryan Stenson","email":"bryan.stenson@gmail.com"},{"name":"Richard Schneider","email":"makaretu@gmail.com"},{"name":"Vasco Santos","email":"vasco.santos@moxy.studio"}],"browser":{"./":"./cjs/src/index.js","./base":"./cjs/src/base.js","./errors":"./cjs/src/errors.js","./keytransform":"./cjs/src/keytransform.js","./memory":"./cjs/src/memory.js","./mount":"./cjs/src/mount.js","./namespace":"./cjs/src/namespace.js","./shard":"./cjs/src/shard.js","./sharding":"./cjs/src/sharding.js","./tiered":"./cjs/src/tiered.js"},"_id":"datastore-core@6.0.3","_nodeVersion":"16.8.0","_npmVersion":"7.21.0","dist":{"integrity":"sha512-rjDXOFYbVed++FbTn2r2MHQX4YjA+3AaniuepymaDlUNiL+weWLb2eCrEQf9Caq2yxiYovML4QAW6vORlIoXRw==","shasum":"5b2b78a202160525be8784ea84c87ea775c0627d","tarball":"http://registry-npm.ywwl.com/datastore-core/download/datastore-core-6.0.3.tgz","fileCount":90,"unpackedSize":153529,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOM11CRA9TVsSAnZWagAAxO4QAJdwI4hGHx36nAGwwfjZ\nBCeV9qjUaFd3jzW4Us8v+X33S/6wKVWyKIAIuhopjWmpC+3w9Emoq3hEuAoO\nRv0LkAFabnUaG0IjlsZnumgniqtYVdhAQCecJwTdsvt0FDJs/TheMGpG2/fv\n6kS8qK3A+3zpXb5Y/yShmymoh6W74TIwOqHru4Ffd1DXLiSxq8aQmHfdT/bw\nS0NTn3cSYpzt1BPceiV1KJD3DpnpWJXY6YT4GfzMuYnmGWBeSxWZuTUDd0qi\nZR1Wcwmgc9D7w4T37bL/BzNIR3fkbfjjIaSCrLodWL00D+4lZRlKZOnt24cI\nGuORIcx5oXbpW9FAC0FNTznbJ8d+u70RWB3wt96hqLv9T61+Jmub8vIbpm9D\nkrEoaaYp6N92sru8fqYc1veD83+VhR2uoJ0CEXuGW0RqZ7S3jZQJMv/SvJhB\n7ArHAemx4MJNJgqONUQ7o8x0vwmuGSIPtMhlBEimH0GwM9E5xJTBZZb/dKOA\n+7gbAmZup187v7VF7hKWobR8oq8mLtKJNqwQZpaZkDHaTdJa9aleGK12zBoI\nfR71U9A9yXE1RY7r4euMMF3f6p+tHNx5wijgnTwP0EpAXgXa7BikVd467ED1\nGA6EA2SEo897BFhjtxok4atZOTTvEG8DEisTmgZvUYWYKTCvgdjFnUM5pW26\nqgFw\r\n=5H5L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAQ798dc/F0ZslK/x2k+sAS+rRjSIB3inKNB3Js86TsOAiA82+0bvE8g9KF5A8tE2dqCQ5yTPukgjpDoeYTnR4vHXw=="}],"size":30759,"noattachment":false,"key":"/datastore-core/-/datastore-core-6.0.3.tgz"},"_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"directories":{},"maintainers":[{"name":"daviddias","email":"mail@daviddias.me"},{"name":"dignifiedquire","email":"dignifiedquire@gmail.com"},{"name":"achingbrain","email":"alex@achingbrain.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/datastore-core_6.0.3_1631112564993_0.7731024885855771"},"_hasShrinkwrap":false,"readme":"# datastore-core\n\n[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)\n[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)\n[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-stores.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-stores)\n[![CI](https://img.shields.io/github/actions/workflow/status/ipfs/js-stores/js-test-and-release.yml?branch=main\\&style=flat-square)](https://github.com/ipfs/js-stores/actions/workflows/js-test-and-release.yml?query=branch%3Amain)\n\n> Wrapper implementation for interface-datastore\n\n# About\n\n<!--\n\n!IMPORTANT!\n\nEverything in this README between \"# About\" and \"# Install\" is automatically\ngenerated and will be overwritten the next time the doc generator is run.\n\nTo make changes to this section, please update the @packageDocumentation section\nof src/index.js or src/index.ts\n\nTo experiment with formatting, please run \"npm run docs\" from the root of this\nrepo and examine the changes made.\n\n-->\n\nVarious Datastore implementations are available.\n\n## Implementations\n\n- Mount: [`src/mount`](src/mount.ts)\n- Keytransform: [`src/keytransform`](src/keytransform.ts)\n- Sharding: [`src/sharding`](src/sharding.ts)\n- Tiered: [`src/tiered`](src/tirered.ts)\n- Namespace: [`src/namespace`](src/namespace.ts)\n- BlackHole: [`src/black-hole`](src/black-hole.ts)\n\n## Example - BaseDatastore\n\nAn base store is made available to make implementing your own datastore easier:\n\n```javascript\nimport { BaseDatastore } from 'datastore-core'\n\nclass MyDatastore extends BaseDatastore {\n  constructor () {\n    super()\n  }\n\n  async put (key, val) {\n    // your implementation here\n  }\n\n  async get (key) {\n    // your implementation here\n  }\n\n  // etc...\n}\n```\n\nSee the [MemoryDatastore](./src/memory.js) for an example of how it is used.\n\n## Example - Wrapping Stores\n\n```js\nimport { Key } from 'interface-datastore'\nimport {\n  MemoryStore,\n  MountStore\n} from 'datastore-core'\n\nconst store = new MountStore({prefix: new Key('/a'), datastore: new MemoryStore()})\n```\n\n## Example - BlackHoleDatastore\n\nA datastore that does not store any data.\n\n```js\nimport { BlackHoleDatastore } from 'datastore-core/black-hole'\n\nconst store = new BlackHoleDatastore()\n```\n\n# Install\n\n```console\n$ npm i datastore-core\n```\n\n## Browser `<script>` tag\n\nLoading this module through a script tag will make it's exports available as `DatastoreCore` in the global namespace.\n\n```html\n<script src=\"https://unpkg.com/datastore-core/dist/index.min.js\"></script>\n```\n\n# API Docs\n\n- <https://ipfs.github.io/js-stores/modules/datastore_core.html>\n\n# License\n\nLicensed under either of\n\n- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)\n- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)\n\n# Contribute\n\nContributions welcome! Please check out [the issues](https://github.com/ipfs/js-stores/issues).\n\nAlso see our [contributing document](https://github.com/ipfs/community/blob/master/CONTRIBUTING_JS.md) for more information on how we work, and about contributing in general.\n\nPlease be aware that all interactions related to this repo are subject to the IPFS [Code of Conduct](https://github.com/ipfs/community/blob/master/code-of-conduct.md).\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.\n\n[![](https://cdn.rawgit.com/jbenet/contribute-ipfs-gif/master/img/contribute.gif)](https://github.com/ipfs/community/blob/master/CONTRIBUTING.md)\n","publish_time":1631112565138,"_cnpm_publish_time":1631112565138,"dist-tags":{"latest":"12.0.1"}}