UNPKG

@mercury-labs/nest-auth

Version:

Mercury framework auth library. It supports local auth, jwt with both bearer token and cookie, basic auth.

14 lines 519 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.hideRedactedFields = void 0; function hideRedactedFields(redactedFields) { return (user) => { if (!user) { return user; } const omittedFields = redactedFields || ['password']; return Object.fromEntries(Object.entries(user).filter(([key]) => !omittedFields.includes(key))); }; } exports.hideRedactedFields = hideRedactedFields; //# sourceMappingURL=hide-redacted-fields.helper.js.map