map as rest service

by Vladymyr Shevchuk

JavaScript

const map = new Map();

// POST
map.set(0, {id: 0, title: 'first thing', status: 'active'});
// PUT 
map.set(0, {id: 0, title: 'first thing', status: 'another status'});
// GET
console.log(map.get(0));
// DELETE
map.delete(0);
console.log(map);