Skip to content
This repository has been archived by the owner on Apr 15, 2021. It is now read-only.

corenzan/jerome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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