AbdulElahGwaith's picture
Upload folder using huggingface_hub
84c1942 verified
Raw
History Blame Contribute Delete
327 Bytes
export const CSB_PKG_PROTOCOL = /https:\/\/pkg(-staging)?\.csb.dev/;
export const formatVersion = (version: string) => {
if (CSB_PKG_PROTOCOL.test(version)) {
const commitSha = version.match(/commit\/([\w\d]*)\//);
if (commitSha && commitSha[1]) {
return `csb:${commitSha[1]}`;
}
}
return version;
};