How to use the sp2.hasOwnNestedProperty function in sp2

To help you get started, we’ve selected a few sp2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github phenyl / phenyl / modules / standards / src / remove-password-from-response-data.ts View on Github external
(entity: ProEntity): any => {
      if (!hasOwnNestedProperty(entity, passwordPropName)) return entity;
      const res = update(entity, { $unset: { [passwordPropName]: "" } });
      return res;
    }
  ) as GeneralUserEntityResponseData;
github phenyl / phenyl / modules / standards / src / remove-password-from-response-data.ts View on Github external
export function removePasswordFromResponseEntity(
  entity: Entity,
  passwordPropName: string
): Entity {
  if (!hasOwnNestedProperty(entity, passwordPropName)) return entity;
  const res = update(entity, { $unset: { [passwordPropName]: "" } });
  return res as Entity;
}