import { createTranslator, generate as generateShort } from 'short-uuid';
import { v4, v5 } from 'uuid';
const translator = createTranslator();
export function buildUUID() {
    return v4();
}
export function buildSUUID() {
    return generateShort();
}
export function uuidToShort(uuid) {
    if (!uuid)
        return uuid;
    return translator.fromUUID(uuid);
}
export function shortToUUID(shortUUID) {
    if (!shortUUID)
        return shortUUID;
    return translator.toUUID(shortUUID);
}
export function isShortUUID(value) {
    if (!value)
        return false;
    return value.length === translator.maxLength;
}
export function buildUUIDv5FromURL(url) {
    return v5(url, v5.URL);
}
//# sourceMappingURL=uuid.js.map