Function safeKeyIterator
- safeKeyIterator(
data: object,
options?: { arrayIndex?: boolean; hasOwnOnly?: boolean },
): IterableIterator<string> Parameters
- data: object
An object to traverse for accessor keys.
Optional
options: { arrayIndex?: boolean; hasOwnOnly?: boolean }Options.
Optional
arrayIndex?: booleanSet to
false
to exclude safe keys for array indexing; default:true
.Optional
hasOwnOnly?: booleanSet to
false
to include enumerable prototype properties; default:true
.
Returns IterableIterator<string>
Safe key iterator.
- data: object
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.