UNPKG

@senacor/azure-function-middleware

Version:

Middleware for azure functions to handle authentication, authorization, error handling and logging

20 lines (19 loc) 598 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.stringify = stringify; const node_util_1 = require("node:util"); function stringify(...args) { return args.map((e) => stringifyValue(e)).join(' '); } function stringifyValue(value) { if (typeof value === 'string') { return value; } if (isJsonSerializable(value)) { return JSON.stringify(value); } return (0, node_util_1.inspect)(value); } function isJsonSerializable(value) { return typeof (value === null || value === void 0 ? void 0 : value.toJSON) === 'function'; }