@vtex/api
Version:
VTEX I/O API client
14 lines (13 loc) • 351 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.statusLabel = void 0;
const statusLabel = (status) => {
if (status >= 500) {
return 'error';
}
if (status >= 200 && status < 300) {
return 'success';
}
return `${Math.floor(status / 100)}xx`;
};
exports.statusLabel = statusLabel;
;