Skip to main content

transformUser

The transformUser function converts backend user data into a normalized user object.

Import

Import this function from the core module.

Features

  • Maps backend user data to a strongly typed user object.
  • Converts status strings from the backend to an enumeration for consistency.

Parameters

backendUser
  • The raw user data received from the backend.

Returns

User
  • A structured user object with normalized fields and status.