(opts)
| 58314 | return resolvedLevel; |
| 58315 | } |
| 58316 | function normalizeArguments(opts) { |
| 58317 | const { logLevel , message } = opts; |
| 58318 | opts.logLevel = normalizeLogLevel(logLevel); |
| 58319 | const args = opts.args ? Array.from(opts.args) : []; |
| 58320 | while(args.length && args.shift() !== message); |
| 58321 | switch(typeof logLevel){ |
| 58322 | case "string": |
| 58323 | case "function": |
| 58324 | if (message !== undefined) args.unshift(message); |
| 58325 | opts.message = logLevel; |
| 58326 | break; |
| 58327 | case "object": |
| 58328 | Object.assign(opts, logLevel); |
| 58329 | break; |
| 58330 | default: |
| 58331 | } |
| 58332 | if (typeof opts.message === "function") opts.message = opts.message(); |
| 58333 | const messageType = typeof opts.message; |
| 58334 | (0, _assertDefault.default)(messageType === "string" || messageType === "object"); |
| 58335 | return Object.assign(opts, { |
| 58336 | args |
| 58337 | }, opts.opts); |
| 58338 | } |
| 58339 | function decorateMessage(id, message, opts) { |
| 58340 | if (typeof message === "string") { |
| 58341 | const time = opts.time ? (0, _formatters.leftPad)((0, _formatters.formatTime)(opts.total)) : ""; |
no test coverage detected