UNPKG

browser-storage-utilities

Version:

A front-end library that provides utility methods to facilitate CRUD operations to data stored in the browser, and more.

53 lines 1.57 kB
Object.defineProperty(exports, "__esModule", { value: true }); const storage_utilities_1 = require("../storage-utilities"); const storage_return_types_1 = require("../enums/storage-return-types"); // (<any>global).isTesting = true; class ProductStorage extends storage_utilities_1.StorageUtilities { constructor(settings) { super(settings); } getDefaultSettings() { return ProductStorage.defaultSettings; } getCurrentSettings() { return ProductStorage.currentSettings; } setCustomSettings(settings) { ProductStorage.customSettings = settings; } resetSettingsToDefault() { ProductStorage.resetSettings(); } addProduct(key, product, expiry) { this.addItem(key, product, expiry); } getProduct(key) { return this.getItem(key); } getProductPromise(key) { return this.getItem(key, null, storage_return_types_1.StorageReturnTypes.Promise); } getProductObservable(key) { return this.getItem(key, null, storage_return_types_1.StorageReturnTypes.Observable); } removeProduct(key) { this.removeItem(key); } removeProducts(keys) { this.removeItems(keys); } getAllStorageValues() { return this.getStorageValues(); } getAllStorageItems() { return this.getStorageItems(); } getAllStorageKeys() { return this.getStorageKeys(); } clear() { this.clearStorage(); } } exports.ProductStorage = ProductStorage; //# sourceMappingURL=mock-product.js.map