Home

Awesome

datascript-mori

Wrapper for datascript interplay with mori

Why?

Datascript is greatful project - an immutable in-memory database and Datalog query engine in Clojure and ClojureScript. It is very useful for managing very big and complex application state in frontend application.

Datascript is written in ClojureScript. Also Datascript designed for using from ClojureScript, but it has JS dedicated API. However usage Datascript from JS has problems:

Setup

npm install datascript-mori

Usage

import {
    datascript, // This is contain datascript object
    mori,       // This is contain mori object
    helpers     // This is contain helpers for conversions from CLJS
} from 'datascript-mori';

const {
    core, // This is pure DataScript CLJS API without any conversions
    js    // This is DataScript JS API
} = datascript;
var datascript_mori = require('datascript-mori');

var mori = datascript_mori.mori;
var datascript_js = datascript_mori.datascript.js;
var datascript_core = datascript_mori.datascript.core;
var helpers = datascript_mori.helpers;
<script src="datascript-mori.js">
   var mori = datascript_mori.mori;
   var datascript_js = datascript_mori.datascript.js;
   var datascript_core = datascript_mori.datascript.core;
   var helpers = datascript_mori.helpers;
</script>

API Overview

Examples

Roadmap

Related projects