jerome
v0.0.7
Published
A tiny JavaScript/REST kind of ORM.
Downloads
3
Readme
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