package.build.esm.utils-hoist.severity.js.map Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
Base implementation for all Sentry JavaScript SDKs
{"version":3,"file":"severity.js","sources":["../../../src/utils-hoist/severity.ts"],"sourcesContent":["import type { SeverityLevel } from '../types-hoist';\n\n/**\n * @deprecated This variable has been deprecated and will be removed in the next major version.\n */\nexport const validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug'];\n\n/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nexport function severityLevelFromString(level: SeverityLevel | string): SeverityLevel {\n return (\n level === 'warn' ? 'warning' : ['fatal', 'error', 'warning', 'log', 'info', 'debug'].includes(level) ? level : 'log'\n ) as SeverityLevel;\n}\n"],"names":[],"mappings":"AAEA;AACA;AACA;AACa,MAAA,mBAAA,GAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO;;AAEvF;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,uBAAuB,CAAC,KAAK,EAAyC;AACtF,EAAE;AACF,IAAI,KAAA,KAAU,MAAA,GAAS,SAAA,GAAY,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAA,GAAI,KAAA,GAAQ;AACnH;AACA;;;;"}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy