{"name":"warehouse","version":"5.0.0","keywords":["database","json","db"],"author":{"url":"https://zespia.tw","name":"Tommy Chen","email":"tommy351@gmail.com"},"license":"MIT","_id":"warehouse@5.0.0","maintainers":[{"name":"ertrzyiks","email":"mateusz.derks@gmail.com"},{"name":"abnerchou","email":"hi@abnerchou.me"},{"name":"tommy351","email":"tommy351@gmail.com"},{"name":"hexobot","email":"hexojs@gmail.com"},{"name":"jlhwung","email":"i@jhuang.me"},{"name":"tomap","email":"piartt@gmail.com"},{"name":"curben","email":"bushedge@protonmail.com"},{"name":"yoshinorin","email":"yoshinorin.net@outlook.com"}],"homepage":"https://github.com/hexojs/warehouse#readme","bugs":{"url":"https://github.com/hexojs/warehouse/issues"},"dist":{"shasum":"b3892ad133a517d8d235fa6b9aea8752b8db34d6","tarball":"http://registry-npm.ywwl.com/warehouse/download/warehouse-5.0.0.tgz","fileCount":75,"integrity":"sha512-3NDCqIF1r83ermIM6QffsJPn9sYoNN/aohb87edraeE2NF57yjSd651f+G7tqOgg4SZuD2DgGmwekc8fTIdi2g==","signatures":[{"sig":"MEYCIQDo+HJyEdNO88poLncDMU4ddm40mmOIU2zPFJyvu/8RrQIhAOBGlSW4/Of4i82nxDAKg3D+mfq2Hx1o7VVNoSzP6OTo","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":255787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJja6RYACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo77g//SzqrQUB1gpp7IuV4d9PBlYBAPg58peyWAJd4g2O35Yme1/x9\r\ngIS+RhniH0S8r5zHzy0fbGrgMgDOH8QlOhGw2bGD0dO/trQIH4muPsfYW2FR\r\ntsGB24S16aMM5d60mC0GKwJ1+ckO/hmRLAeDdCAdOo3BhfhsMjcpst8oxyIM\r\nlEEbVfwUHhTk0ezP2wSAWL6tgMnNOaf9WXn1ABf5bom6zWqk8yGHiiqP1Eso\r\nUSA1vRC7sAlng07x1ljyDTmZ6ZRiGXmd1zM9y2OIBotvaiJZe+TFgnqil1Dw\r\nIejYIzvDidqUWdSL8TQPK37Xng0xNfCitndNh5FTedyw3g167RFCFDnzKryU\r\nyzHU7m0JBnWSsZzL2Jjel7fvEAfWctfJEI7DtPZniKMdfQaIfMTYkyY09+9c\r\nOkUkINo/Hvvk/Ar/Xz8vOE+X3QlG67uxSuSkQNXa9o0d99vbPKysPZvXgPkp\r\nKCPnnFkCykITb0u8w8bzx3j3X55VIbNeP90jaoLjDuuc/GeuglJKrPh7Qct+\r\ntg9N/gyfVZMv5RqrUrWmFGLwDQnHNzd1F0N9nVqO53hAjT5QVkwI/dZWrUDz\r\nJ6KEAkSdZr2V96Fh4nu3GJ+9Cd3Jb4o2fiafEFIvE+tTuBrwvFjLz8Dsh/GQ\r\nH+6xYzWYd1JYeixPKTxIFfiw5z2acuSxaMU=\r\n=uAnu\r\n-----END PGP SIGNATURE-----\r\n","size":41928,"noattachment":false,"key":"/warehouse/-/warehouse-5.0.0.tgz"},"main":"dist/database","types":"./dist\\database.d.ts","engines":{"node":">=14"},"gitHead":"c6abb0149d053514610e5d3525721485cad659bf","scripts":{"test":"mocha -r ts-node/register 'test/scripts/**/*.ts'","build":"tsc -b","clean":"tsc -b --clean","eslint":"eslint src test","pretest":"npm run clean && npm run build","typedoc":"typedoc --entryPointStrategy expand ./src","test-cov":"c8 --reporter=lcovonly --reporter=text-summary npm test","preeslint":"npm run clean && npm run build","prepublish ":"npm install && npm run clean && npm run build"},"_npmUser":{"name":"yoshinorin","email":"yoshinorin.net@outlook.com"},"repository":{"url":"git+https://github.com/hexojs/warehouse.git","type":"git"},"_npmVersion":"8.4.0","description":"Simple JSON-based database","directories":{"lib":"./dist"},"_nodeVersion":"16.16.0","dependencies":{"cuid":"^2.1.8","rfdc":"^1.3.0","bluebird":"^3.7.2","hexo-log":"^4.0.1","through2":"^4.0.2","jsonparse":"^1.3.1","graceful-fs":"^4.2.10","is-plain-object":"^5.0.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.12.0","chai":"^4.3.6","mocha":"^10.1.0","sinon":"^14.0.1","eslint":"^8.26.0","lodash":"^4.17.21","ts-node":"^10.9.1","typedoc":"^0.23.19","typescript":"^4.8.4","@types/chai":"^4.3.3","@types/node":"^18.11.7","@types/mocha":"^10.0.0","@types/sinon":"^10.0.13","@types/bluebird":"^3.5.37","@types/through2":"^2.0.36","chai-as-promised":"^7.1.1","@types/jsonstream":"^0.8.30","@types/graceful-fs":"^4.1.5","eslint-config-hexo":"^5.0.0","@typescript-eslint/parser":"^5.41.0","typedoc-plugin-rename-defaults":"^0.6.4","@typescript-eslint/eslint-plugin":"^5.41.0"},"_npmOperationalInternal":{"tmp":"tmp/warehouse_5.0.0_1667998807960_0.6231794483932831","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":1667998808145,"_cnpm_publish_time":1667998808145,"dist-tags":{"latest":"7.0.0"}}