You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
4 weeks ago | |
---|---|---|
lib | 4 weeks ago | |
src | 4 months ago | |
.gitignore | 5 months ago | |
README.md | 3 months ago | |
mod.js | 3 months ago | |
package.json | 4 months ago | |
yarn.lock | 4 months ago |
README.md
XeDB
Cross-runtime embedded database for JavaScript.
Usage
Storage runtimes
From Deno
import {
createDatastore
} from 'https://git.kaki87.net/KaKi87/xedb/raw/branch/master/mod.js';
import deno from 'https://git.kaki87.net/KaKi87/xedb/raw/branch/master/lib/deno.js';
const datastore = createDatastore({
runtime: deno
});
From Node
import {
createDatastore
} from 'xedb.js';
import node from 'xedb.js/lib/node.js';
const datastore = createDatastore({
runtime: node
});
From browser
<script type="module">
import {
createDatastore
} from 'https://raw.githack.com/KaKi87-2/xedb/master/mod.js';
import browser from 'https://raw.githack.com/KaKi87-2/xedb/master/lib/browser.js';
const datastore = createDatastore({
runtime: browser
});
</script>
In-memory runtimes
Using storage runtimes examples, replace the runtime
import with :
inMemory.deno.js
for Deno ;inMemory.node.js
for Node ;inMemory.browser.js
for browser.
API
Most MongoDB methods as well as query operators (thanks to crcn/sift.js
) and update operators (thanks to seald/nedb/lib/model
) are supported.
Serializers
The createDatastore
method takes a serializer
parameter containing serialize
and deserialize
methods (JSON by default).
DSV support is planned.
Related projects
louischatriot/nedb
seald/nedb
(maintained fork oflouischatriot/nedb
)denyncrawford/dndb
(Deno port oflouischatriot/nedb
)AmateurPotion/dndb
(maintained fork ofdenyncrawford/dndb
)