jerome

0.0.7 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i jerome

Weekly Downloads

4

Version

0.0.7

License

MIT

Unpacked Size

10.9 kB

Total Files

6

Last publish

Collaborators

  • haggen