UNPKG

ram64

Version:

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

15 lines (14 loc) 467 B
"use strict"; exports.fn = void 0; var _getWithOptions = require("./getWithOptions"); const fn = (opts)=>{ const obj = (0, _getWithOptions).fn(opts); if (!obj) return false; if (typeof opts.args !== 'object') throw new Error('Invalid options'); // mutate is the most performant option obj.expAt = opts.args.expAt ?? void 0; obj.staleAt = opts.args.staleAt ?? void 0; return true; }; exports.fn = fn; //# sourceMappingURL=setOptions.js.map