{"version":3,"file":"object.cjs","names":[],"sources":["../../../../src/plugins/persistence/storage/object.ts"],"sourcesContent":["import type { StorageInterface } from '../../../types';\n\nlet objectStorage: Record< string, string > | undefined;\n\nconst storage: StorageInterface & { clear: VoidFunction } = {\n\tgetItem( key: string ): string | null {\n\t\tif ( ! objectStorage || ! objectStorage[ key ] ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn objectStorage[ key ];\n\t},\n\tsetItem( key: string, value: string ) {\n\t\tif ( ! objectStorage ) {\n\t\t\tstorage.clear();\n\t\t}\n\n\t\tobjectStorage![ key ] = String( value );\n\t},\n\tclear() {\n\t\tobjectStorage = Object.create( null );\n\t},\n};\n\nexport default storage;\n"],"mappings":";;;;;;AAEA,IAAI;AAEJ,MAAM,UAAsD;CAC3D,QAAS,KAA6B;EACrC,IAAK,CAAE,iBAAiB,CAAE,cAAe,MACxC,OAAO;EAGR,OAAO,cAAe;CACvB;CACA,QAAS,KAAa,OAAgB;EACrC,IAAK,CAAE,eACN,QAAQ,MAAM;EAGf,cAAgB,OAAQ,OAAQ,KAAM;CACvC;CACA,QAAQ;EACP,gBAAgB,OAAO,OAAQ,IAAK;CACrC;AACD"}