UNPKG

@vtex/api

Version:
14 lines (13 loc) 351 B
"use strict"; 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;