no need an extra layer of abstraction to get an "in memory" database in javascript. no need, babel, webpack, ChatGpt, npm and 10000 libraries for this really.
Let me show (works even on the browser):
const KV = {};
KV["credentials"] = {access_key: "XXXX", secret: "YYYY"};
console.log(KV["credentials"].secret);