feathersjs-ecosystem/feathers-authentication-management

View on GitHub
src/helpers/sanitize-user-for-notifier.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { cloneObject } from './clone-object';
import type { User } from '../types';

export function sanitizeUserForNotifier (_user: User): Record<string, unknown> {
  const user = cloneObject(_user);
  delete user.password;
  return user;
}