UNPKG

@hot-updater/plugin-core

Version:

React Native OTA solution for self-hosted

8 lines (7 loc) 400 B
//#region src/contentAddressedAssets.ts const getContentAddressedAssetStoragePath = ({ assetPath, fileHash }) => { const extension = assetPath.endsWith(".br") ? ".br" : assetPath.includes(".") ? `.${assetPath.split(".").pop()}` : ""; return `sha256/${fileHash.slice(0, 2)}/${fileHash}${extension}`; }; //#endregion exports.getContentAddressedAssetStoragePath = getContentAddressedAssetStoragePath;