A JSON data scheme with search, map/reduce, and transactions.
Want to see pretty graphs? Log in now!
npm install splash
|4||downloads in the last month|
|Last Published By|
|Version||0.1.0 last updated 7 months ago|
The goal of splash is to faciliate JSON data storage with a small feature set.
It's currently experimental.
With splash there is a concept of a document type. You can think of it like storing a collection of something. Some examples could be products, articles, users, roles, journal entries, or contacts. Whatever you decide to call your document type splash will create a directory for it so it must be valid input for a directory on your operating system. Every method in the API requires the doc type be passed to it.
dataPath tells the splash instance where to find the data.
Every method takes
doctype as the first argument and
cb, a callback function,
as the last and may have others in between. The callback always returns
Splash.all - Get all documents of a certain doctype Accepts:
Splash.one - Only get one document
- id - The
idis really just it's file name
Splash.save - Save an existing document
Splash.create - Create a new document
- query - A case in-sensitive string
- query - An object to compare with the documents