UNPKG

@capgo/capacitor-uploader

Version:
21 lines 700 B
export class PathHelper { // Check if the path follows the idb://[databaseName]/[storeName]/[key] format static isIndexedDBPath(path) { const regex = /^idb:\/\/([^/]+)\/([^/]+)\/(.+)$/; return regex.test(path); } // Parse the path to extract database, storeName, and key static parseIndexedDBPath(path) { const regex = /^idb:\/\/([^/]+)\/([^/]+)\/(.+)$/; const match = path.match(regex); if (!match) { throw new Error('Invalid IndexedDB path format'); } return { database: match[1], storeName: match[2], key: match[3], }; } } //# sourceMappingURL=PathHelper.js.map