You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Decide whether to skip sorting of certain keys or branches based on the result returned by ignore function. This only applies when `deep` is set to `true`.
68
+
69
+
###### context
70
+
71
+
Type: `object`
72
+
73
+
_key_
74
+
75
+
Type: `string | number | undefined`
76
+
77
+
Key of the current object or array item. When `undefined`, the callback decides whether to sort the current object’s own keys (object-level decision).
78
+
79
+
Examples:
80
+
```ts
81
+
// Preserve top-level object key order, but still deep-sort children
Current depth in the object or array. For per-key callbacks, `depth === path.length` (after pushing the key/index). For object-level decisions (when `key` is `undefined`), `depth === path.length + 1`.
111
+
112
+
**Note:** If the object-level callback returns `true`, the current object's own key order is preserved, but children are still deep-sorted unless those are also ignored.
0 commit comments