pidb
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

pidb

Simple JSON database

API

Description
init(storage: string) Storage path to init the database
collections() List all collections in storage
collection(name) If collection exists documents are read in memory. Otherwise a new empty collection is created
sync() Write data on disk

Collection API

Description
documents() List all documents in collection
find(query) Find documents
findOne(query) Find one document
push(document) Creates a new document in collection
update(id, data) Update document
remove(id) Remove document
drop() Delete the collection

Readme

Keywords

none

Package Sidebar

Install

npm i pidb

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

480 kB

Total Files

22

Last publish

Collaborators

  • mihkelbaranov