UNPKG

889 BSource Map (JSON)View Raw
1{"version":3,"sources":["../../src/redux/persist.ts"],"names":["file","process","cwd","readFromCache","v8","deserialize","writeToCache","contents","serialize"],"mappings":";;;;;;;AAAA;;AACA;;AAGA,MAAMA,IAAI,GAAG,MAAe,GAAEC,OAAO,CAACC,GAAR,EAAc,qBAA5C;;AAEO,MAAMC,aAAa,GAAG,MAC3BC,WAAGC,WAAH,CAAe,2BAAaL,IAAI,EAAjB,CAAf,CADK;;;;AAGA,MAAMM,YAAY,GAAIC,QAAD,IAAuC;AACjE,8BAAcP,IAAI,EAAlB,EAAsBI,WAAGI,SAAH,CAAaD,QAAb,CAAtB;AACD,CAFM","sourcesContent":["import v8 from \"v8\"\nimport { readFileSync, writeFileSync } from \"fs-extra\"\nimport { ICachedReduxState } from \"./types\"\n\nconst file = (): string => `${process.cwd()}/.cache/redux.state`\n\nexport const readFromCache = (): ICachedReduxState =>\n v8.deserialize(readFileSync(file()))\n\nexport const writeToCache = (contents: ICachedReduxState): void => {\n writeFileSync(file(), v8.serialize(contents))\n}\n"],"file":"persist.js"}
\No newline at end of file