UNPKG

image-in-browser

Version:

Package for encoding / decoding images, transforming images, applying filters, drawing primitives on images on the client side (no need for server Node.js)

13 lines 316 B
export class MapUtils { static putIfAbsent(map, key, ifAbsent) { if (map.has(key)) { return map.get(key); } else { const newValue = ifAbsent(); map.set(key, newValue); return newValue; } } } //# sourceMappingURL=map-utils.js.map