UNPKG

@nevis-security/nevis-mobile-authentication-sdk-react

Version:

React Native plugin for Nevis Mobile Authentication SDK. Supports only mobile.

29 lines (27 loc) 663 B
"use strict"; /** * Copyright © 2023 Nevis Security AG. All rights reserved. */ export class PlatformOperationCache { cache = new Map(); constructor() {} static getInstance() { if (!PlatformOperationCache.instance) { PlatformOperationCache.instance = new PlatformOperationCache(); } return PlatformOperationCache.instance; } put(operation) { this.cache.set(operation.operationId, operation); } read(key) { return this.cache.get(key); } update(operation) { this.cache.set(operation.operationId, operation); } delete(key) { this.cache.delete(key); } } //# sourceMappingURL=PlatformOperationCache.js.map