UNPKG

ram64

Version:

Multi-threaded 64bit memory cache database inspired by redis-like features

13 lines (12 loc) 409 B
"use strict"; exports.fn = void 0; var _get = require("./get"); var _set = require("./set"); const fn = (opts)=>{ const oldValue = (0, _get).fn(opts); const oldValueClone = oldValue ? JSON.parse(JSON.stringify(oldValue)) : void 0; (0, _set).fn(opts); // set the value return oldValueClone; // return clone of old value to avoid mutations }; exports.fn = fn; //# sourceMappingURL=getSet.js.map