jerome

A tiny JavaScript/REST kind of ORM.

Usage no npm install needed!

<script type="module">
  import jerome from 'https://cdn.skypack.dev/jerome';
</script>

README

NPM BundlePhobia Travis

Jerome

A tiny JavaScript/REST kind of ORM.

Usage

At a glance:

const api = new Jerome('https://example.org');
const Stuff = api.model('/stuff');

Stuff.list();   //-> GET    https://example.org/stuff
Stuff.get(1);   //-> GET    https://example.org/stuff/1

const thing = new Stuff({ ... });

thing.save();   //-> POST   https://example.org/stuff   { ... }
thing.save();   //-> PUT    https://example.org/stuff/1 { ... }
thing.delete(); //-> DELETE https://example.org/stuff/1

All these methods return promises.

Jerome works in the browser as well as in node, but depends on fetch and URL.

API

Work in progress... 🚧

Legal

The MIT License © 2018 Corenzan