tify
Version:
A slim and mobile-friendly IIIF document viewer
12 lines (10 loc) • 328 B
JavaScript
export default {
install: (app) => {
// Crypto is only available in newer browsers and with HTTPS
const appId = crypto?.randomUUID
? crypto.randomUUID()
: Math.random().toString().slice(2);
// eslint-disable-next-line no-param-reassign
app.config.globalProperties.$getId = (label) => `${appId}-${label}`;
},
};