Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(entity: ProEntity): any => {
if (!hasOwnNestedProperty(entity, passwordPropName)) return entity;
const res = update(entity, { $unset: { [passwordPropName]: "" } });
return res;
}
) as GeneralUserEntityResponseData;
export function removePasswordFromResponseEntity(
entity: Entity,
passwordPropName: string
): Entity {
if (!hasOwnNestedProperty(entity, passwordPropName)) return entity;
const res = update(entity, { $unset: { [passwordPropName]: "" } });
return res as Entity;
}