73abba06cf
* WIP infinite load helper * finished automations pagination * runs pagination working * fn pagination * minor cleanup * subscription cache mutation fixes * filtered cache update fix * minor changes
19 lines
391 B
TypeScript
19 lines
391 B
TypeScript
import { md5 } from '@speckle/shared'
|
|
export { md5 }
|
|
|
|
export const base64Encode = (str: string): string => {
|
|
if (process.server) {
|
|
return Buffer.from(str).toString('base64')
|
|
} else {
|
|
return btoa(str)
|
|
}
|
|
}
|
|
|
|
export const base64Decode = (str: string): string => {
|
|
if (process.server) {
|
|
return Buffer.from(str, 'base64').toString('utf8')
|
|
} else {
|
|
return atob(str)
|
|
}
|
|
}
|