JSON Crud v1.0.0
A simple CRUD JSON database using either a JSON file or a folder of JSON files.
var jsonDB = ;
jsonDB
Generator function for creating a JSON DB. The database is equivalent to a a single table or collection. The generator returns a promise that will resolve to the JSON databaes if everything is ok.
Parameters
file
[String] Path to file/folder to contain the JSON databaseoptions
[Object] Object containing the options for the database.options.path
[String] Path to file/folder to contain JSON database if not given as first argumentoptions.id
[String] Field of data objects to be used as the keyoptions.cacheKeys
[Boolean] Cache the keys of the objects in the databaseoptions.cacheValues
[Boolean] Cache the objects in the database
Returns Promise<JsonDBInstance> A promise that will resolve to a JsonDB instance if everything checks out
Typing
; declare ; declare ;