ram64
Version:
Multi-threaded 64bit memory cache database inspired by redis-like features
19 lines (18 loc) • 459 B
JavaScript
;
exports.fn = void 0;
var _get = require("./get");
var _set = require("./set");
const fn = (opts)=>{
const oldValue = (0, _get).fn(opts);
const oldNum = typeof oldValue === 'number' ? oldValue : opts.args?.defaultValue ?? 0;
const value = (oldNum / opts.args?.value) ?? 0;
(0, _set).fn({
...opts,
args: {
value
}
});
return value;
};
exports.fn = fn;
//# sourceMappingURL=numDiv.js.map