Function safeKeyIterator

    • Returns an iterator of safe keys useful with safeAccess and safeSet by traversing the given object.

      Note: Keys are only generated for JSON objects; Map and Set are not indexed.

      Parameters

      • data: object

        An object to traverse for accessor keys.

      • Optionaloptions: { arrayIndex?: boolean; hasOwnOnly?: boolean }

        Options.

        • OptionalarrayIndex?: boolean

          Set to false to exclude safe keys for array indexing; default: true.

        • OptionalhasOwnOnly?: boolean

          Set to false to include enumerable prototype properties; default: true.

      Returns IterableIterator<string>

      Safe key iterator.