Function safeKeyIterator
- safeKeyIterator(
data: object,
options?: { arrayIndex?: boolean; hasOwnOnly?: boolean },
): IterableIterator<readonly PropertyKey[]>Parameters
- data: object
An object to traverse for accessor keys.
Optionaloptions: { arrayIndex?: boolean; hasOwnOnly?: boolean }Options.
OptionalarrayIndex?: booleanSet to
falseto exclude numeric array indexes. Enumerable symbol properties on arrays remain included; default:true.OptionalhasOwnOnly?: booleanSet to
falseto include enumerable prototype properties; default:true.
Returns IterableIterator<readonly PropertyKey[]>
Safe key iterator.
- data: object
Returns an iterator of property-key accessor arrays useful with safeAccess and safeSet by traversing the given object. Enumerable string and symbol keys are included, and array indexes are emitted as numbers.
Note: Keys are only generated for ordinary objects and arrays; Map and Set are not indexed.