isSafePropertyName | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function isSafePropertyName

    • Check whether a property name is non-empty and not exactly "proto", "constructor", or "prototype". Comparison is case-sensitive. This only checks the name, not any associated value or nested properties.

      Parameters

      • name: string

        Property name to check

      Returns boolean

      Whether the property name passes these checks

      const keys = Object.keys(obj).filter(isSafePropertyName);