UNPKG

cloud-report

Version:

Collects and analyzes cloud resources

20 lines (19 loc) 513 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class ResourceUtil { static getNameByTags(resource) { if (!resource.Tags) { return "Untagged"; } const nameTags = resource.Tags.filter((tag) => { return tag.Key === "Name"; }); if (nameTags.length) { return nameTags[0].Value; } else { return "Untagged"; } } } exports.ResourceUtil = ResourceUtil;