Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
17 lines
628 B
Plaintext
17 lines
628 B
Plaintext
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
|
/**
|
|
* Converts a string-based level into a `SeverityLevel`, normalizing it along the way.
|
|
*
|
|
* @param level String representation of desired `SeverityLevel`.
|
|
* @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.
|
|
*/
|
|
function severityLevelFromString(level) {
|
|
return (
|
|
level === 'warn' ? 'warning' : ['fatal', 'error', 'warning', 'log', 'info', 'debug'].includes(level) ? level : 'log'
|
|
) ;
|
|
}
|
|
|
|
exports.severityLevelFromString = severityLevelFromString;
|
|
//# sourceMappingURL=severity.js.map
|