UNPKG

armpit

Version:

Another resource manager programming interface toolkit.

20 lines 706 B
import { validate as uuidValidate } from "uuid"; export function isSubscriptionId(value) { return uuidValidate(value); } export function isSubscriptionName(value) { return typeof value === "string" && value.length > 0; } export function isSubscriptionIdOrName(value) { return isSubscriptionName(value); } export function isTenantId(value) { return uuidValidate(value); } export function isResourceId(resourceId) { return resourceId != null && typeof resourceId === "string" && /\/subscriptions\/([^/]+)\//i.test(resourceId); } export function isAccessTokenScope(value) { return typeof value === "string" && /^[0-9a-zA-Z-_.:/]+$/.test(value); } //# sourceMappingURL=azureTypes.js.map