IOTConnect-Web/node_modules/fast-unique-numbers/build/node/factories/cache.js

13 lines
308 B
JavaScript
Raw Normal View History

2024-05-09 01:49:52 +00:00
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.createCache = void 0;
const createCache = lastNumberWeakMap => {
return (collection, nextNumber) => {
lastNumberWeakMap.set(collection, nextNumber);
return nextNumber;
};
};
exports.createCache = createCache;