{"name":"warehouse","version":"3.0.1","keywords":["database","json","db"],"author":{"url":"http://zespia.tw","name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"warehouse@3.0.1","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":"4b57b6192fdb89ff77a9f346381048c5488c2b35","tarball":"http://registry-npm.ywwl.com/warehouse/download/warehouse-3.0.1.tgz","fileCount":26,"integrity":"sha512-wd/rUHimdlgYlyPZrqnUUQS0yK8yimFQc5W6ttvC0I9EVaObtIWjzWo8YDaxRuPeq6ukNqlRDIj+3pEo/7H9+A==","signatures":[{"sig":"MEQCIAMKxNLWZYXPwG0DLKHRpzc5++/GOu3sKXQbqa9M05GVAiAyWZ17irQl7g4ZinwL+L1lhLUIq1pCQYyh6s/3qL6dow==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":90321,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoWssCRA9TVsSAnZWagAAXcgP/Rpb5gDKArUMZ8kXxh4b\n0tGM3zI8hWRUJX7rkfkrqGzi0ltAW+IGf/WGufpvuVUI0BJggOIo+WnDmU2A\nZw/I64yl3XyTR4Wc4kNplzBDia/X2EE+FRi/mO6dALTWyPraI8YQ8l4Yrr74\nWo336aP48tuwpShw1Es6/wc5VoHnaISiJSieCtPcajB5svEwxOmpGxbtuAm9\nRkswZy5k7hrx8r9O+BVZ6YLQsnPwds39BK5NHQgvxPW7JlXCSU5R1vALKUbe\nxnYJXhDUU8hhm/OD5bT6A0rkgCRxYnwFYp/Zwd7dZjuvFO1PxhN8GKJeS0/J\nTedUCczyQ5K3gisEJlifB1tLgC0fGePdfvtJDFDSOg6mmzUwa2AYBw0YS3Er\nLbvbq+M4i4O2s/0V+F8B8maKMuHGEAx1JriaU3s7E+D9mJX+fUQxWXfD9LL1\nvQTUyHLV3cAnyVUrhpzj/kMnllRMSFp6XtMceaQOvIEo8KIrYHP09yLzz2fJ\nSYpPSMQXWlOG9M7XnfmVn4rzk69W2TAfOv+0gx0SvmgVsbmiCXj/5yu1T5DO\nwTjx7w7IKqLj4gmqeGws10wRJncQyrnlRYMcdSdt+CVAr1e/NoilB7gTehiZ\naMIdUofNBgY3z0i0cC062ah+E56+OiiU1fPS5gsGx89QF2tL3ijP8E+i+mul\npAPC\r\n=p/Rh\r\n-----END PGP SIGNATURE-----\r\n","size":17332,"noattachment":false,"key":"/warehouse/-/warehouse-3.0.1.tgz"},"main":"lib/database","engines":{"node":">=8.6.0"},"gitHead":"3e281613c9326d466036454f93ca1f3543a7f590","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.10.2","description":"Simple JSON-based database","directories":{"lib":"./lib"},"_nodeVersion":"12.12.0","dependencies":{"cuid":"^2.1.4","lodash":"^4.17.10","bluebird":"^3.2.2","JSONStream":"^1.0.7","graceful-fs":"^4.1.3","is-plain-object":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.1.1","chai":"^4.2.0","jsdoc":"^3.4.0","mocha":"^6.0.2","sinon":"^7.1.1","eslint":"^6.1.0","minami":"^1.1.1","chai-as-promised":"^7.1.1","eslint-config-hexo":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/warehouse_3.0.1_1570859819488_0.9026970530953253","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":1570859819598,"_cnpm_publish_time":1570859819598,"dist-tags":{"latest":"7.0.0"}}