Open ceigey opened 1 year ago
My intent was to have something similar to "minimongo" to be used in the front-end (with React), I refactored nedb
to use async/await
and even managed to improve the code a little bit, making it work in browsers.
The API is also similar to an older version of mongo not the current one.
I will change the wording used for it.
I did not know about unstorage
that can be a great alternative I think. A really good inspiration for sure.
Hi there,
I noticed the following comment in the docs:
I also noticed
IStorage
just has 3x methods (see bottom),NodeStorage
is writing to files, andPersistance
has methods that don't line up specifically withIStorage
(different names - different intents?) but the collection APIs have a Mongo-style API.The feeling I get is that the storage API is designed to be quite restrictive, but "synchronized with your database" might give developers the impression that the capabilities of the storage API are similar to that of a database driver, like for example Meteor Collections, ORMs, or the database abstractions in libraries like Lucia Auth.
I will also link unstorage here as a comparison point, as I think Helene's data module is doing something similar to this library, maybe there's some ideas that can be shared: https://github.com/unjs/unstorage
https://github.com/leonardoventurini/helene/blob/aebbf3535a05d85727b4365683165fce7818819c/src/data/types.ts#L1-L7