const OTPURI_PATTERN = /^otpauth:\/\/[ht]otp\/[^\s]+$/i ; param str memberof export function isOTPURI ( str ) { return OTPURI_PATTERN . test ( str ) ; } param obj returns memberof export function isVaultFacade ( obj ) { if ( ! obj || typeof obj !== "object" ) { return false ; } return ( obj . type === "vault" && typeof obj . id === "string" && Array . isArray ( obj . entries ) && Array . isArray ( obj . groups ) ) ; }