UNPKG

@scaleway/sdk-client

Version:
17 lines (16 loc) 442 B
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); function toApiLocality(legacy) { if (!legacy) { return { type: "unspecified" }; } const { zones, regions } = legacy; if (zones && zones.length > 0) { return { type: "zone", zones }; } if (regions && regions.length > 0) { return { type: "region", regions }; } return { type: "global" }; } exports.toApiLocality = toApiLocality;