{"name":"warehouse","version":"3.0.2","keywords":["database","json","db"],"author":{"url":"http://zespia.tw","name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"warehouse@3.0.2","maintainers":[{"name":"abnerchou","email":"hi@abnerchou.me"},{"name":"curben","email":"bushedge@protonmail.com"},{"name":"ertrzyiks","email":"mateusz.derks@gmail.com"},{"name":"hexobot","email":"hexojs@gmail.com"},{"name":"jlhwung","email":"i@jhuang.me"},{"name":"tomap","email":"piartt@gmail.com"},{"name":"tommy351","email":"tommy351@gmail.com"},{"name":"yoshinorin","email":"nayo-msoft@outlook.jp"}],"homepage":"https://github.com/hexojs/warehouse#readme","bugs":{"url":"https://github.com/hexojs/warehouse/issues"},"dist":{"shasum":"4c02f6fcf2b33130656f3d033c44bf5673af0433","tarball":"http://registry-npm.ywwl.com/warehouse/download/warehouse-3.0.2.tgz","fileCount":26,"integrity":"sha512-NTaUFkDcRKFx477NflL3doMhnmPobpL+uF66s0ozAhjob+UCHcOzE77GvYR1sjyu+LR4SstPz3xGxYLOKQCvMg==","signatures":[{"sig":"MEYCIQC6BD3xZq5ppvcKA94oUxHLYj4U2ZOeF1gtIwQRu5uLkAIhAKgNNei7cVnRHJo1jxDMMiImomADn5m/QmXqvH/BOYCQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeHO0JCRA9TVsSAnZWagAAD9QP/3uG/gWdRVbc2VDJnZkh\nRxY7QKCElTJLRwU6uQag2EsG4TEYmmf5mjMZUTCAgr0XWHK6KXgtpNQGM1V2\nRD4gt/CgkB4HgaRX2HiyM/Yh8pdMhVsKCwB1LR/AjUMHmVfo+XTKt1d5SLIV\nVYteSQ6hk/SoFCIWfHLvmZMKgNhykPowZ9Wskoo/BcN+bEXPjKOuHOOJWR7U\nLNma3EaQwT34OM9SFGOUYWfiC7t0RLTQ+3VMO0fBT6KTWOAtwEIYsZ42jQeJ\nwl6QnBsJWYBXKAOzQrctNk1oRolJX2g6uG+eDvMsPoV9VK6HEsPKLOrkE03p\nS2jGD8DOp6Gc6jHxTZRZTxwHdZkGus2Ukx7HpPCv+xQmRqvlyetnH1Muk3Yb\n8GKXlCfV/HVOVWAibfP58dXMHseG88RAQinooqJu01+XqgTj6a6DypSYvbtt\nwlPttH5/Qz7Btqs+dlGRpF+KE/qDGqNqiBqKjt+3LqjhjRvgMD12s5EBUQaI\nhN/uBQyOhilZT5xz06AYScygpSFltBOS45lxRqKvWaX3N+clwSGfH8BGeZL5\nsjqAlo8F6xNafRO9A5wPMaE/VRiOSpgYFNKsIenfNphx7Vp9BM0whimX4x15\nLc5QTX9VooqvtnCIWyfD59JXNIS9UWpxLnrP52px6klWpBQpL/k5Y4ei9pEQ\nXtlX\r\n=oLoR\r\n-----END PGP SIGNATURE-----\r\n","size":17668,"noattachment":false,"key":"/warehouse/-/warehouse-3.0.2.tgz"},"main":"lib/database","engines":{"node":">=8.6.0"},"gitHead":"89e6d4cbc64dcef7c8efa24c0ac6e9456a975fa1","scripts":{"test":"mocha \"test/scripts/**/*.js\"","jsdoc":"jsdoc --configure .jsdoc.json","eslint":"eslint lib test","test-cov":"nyc npm run test"},"_npmUser":{"name":"curben","email":"bushedge@protonmail.com"},"repository":{"url":"git+https://github.com/hexojs/warehouse.git","type":"git"},"_npmVersion":"6.13.4","description":"Simple JSON-based database","directories":{"lib":"./lib"},"_nodeVersion":"13.6.0","dependencies":{"cuid":"^2.1.4","rfdc":"^1.1.4","bluebird":"^3.2.2","JSONStream":"^1.0.7","graceful-fs":"^4.1.3","is-plain-object":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","chai":"^4.2.0","jsdoc":"^3.4.0","mocha":"^7.0.0","sinon":"^8.0.1","eslint":"^6.1.0","lodash":"^4.17.15","minami":"^1.1.1","chai-as-promised":"^7.1.1","eslint-config-hexo":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/warehouse_3.0.2_1578953993223_0.25629126657459045","host":"s3://npm-registry-packages"},"readme":"# Warehouse\n\n![Tester](https://github.com/hexojs/warehouse/workflows/.github/workflows/ci.yml/badge.svg)\n![Pages Deployer](https://github.com/hexojs/warehouse/workflows/.github/workflows/pages.yml/badge.svg)\n[![NPM version](https://badge.fury.io/js/warehouse.svg)](https://www.npmjs.com/package/warehouse)\n[![Coverage Status](https://coveralls.io/repos/github/hexojs/warehouse/badge.svg?branch=master)](https://coveralls.io/github/hexojs/warehouse?branch=master)\n\nA JSON database with Models, Schemas, and a flexible querying interface. It powers the wildly successful static site generator [Hexo](https://hexo.io).\n\n## Installation\n\n``` bash\n$ npm install warehouse\n```\n\n## 3.0 BREAKING CHANGE\n\nIn `warehouse@3`, the constructor has been changed from function declaration to `class` declaration or definition by `class` expression.\nDerived classes of classes defined by `class` declarations and `class` expressions must also be defined in `class` declaration, `class` expression.\nAnyone who created their own SchemaType will need to change.\n\n``` js\nconst SchemaType = require('warehouse/schematype');\n\nclass MySchemaType extends SchemaType {\n  constructor(name, options = {}) {\n    super(name, Object.assign({ foo: 'foo' }, options));\n  }\n}\n```\n\nIt changes to a class declaration or a class expression, but it does not need to deal with other than the definition of the constructor.\n\n``` js\n// It work!\n\nMySchemaType.prototype.cast = function (value, data) {\n  let result = SchemaType.prototype.cast.call(this, value, data);\n  return result ? result : '';\n}\n```\n\n## Usage\n\n``` js\nvar Database = require('warehouse');\nvar db = new Database();\n\nvar Post = db.model('posts', {\n  title: String,\n  created: {type: Date, default: Date.now}\n});\n\nPost.insert({\n  title: 'Hello world'\n}).then(function(post){\n  console.log(post);\n});\n```\n\n+ [API documentation](https://hexojs.github.io/warehouse/)\n+ [Examples of `Model`, `Schema`, and `SchemaType`](https://github.com/hexojs/hexo/tree/master/lib/models)\n+ [More examples in `./test/scripts`](./test/scripts)\n\n## Test\n\n``` bash\n$ npm test\n```","publish_time":1578953993335,"_cnpm_publish_time":1578953993335,"dist-tags":{"latest":"7.0.0"}}