object-scan
Advanced tools
Comparing version 16.1.1 to 17.0.0
@@ -197,3 +197,3 @@ "use strict"; | ||
if (!isArray && ctx.compareFn) { | ||
keys.sort(ctx.compareFn); | ||
keys.sort(ctx.compareFn(kwargs)); | ||
} | ||
@@ -200,0 +200,0 @@ |
{ | ||
"name": "object-scan", | ||
"version": "16.1.1", | ||
"version": "17.0.0", | ||
"description": "Traverse object hierarchies using matching and callbacks.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -465,4 +465,6 @@ # Object-Scan | ||
When defined, this function is used as a comparator to determine the traversal order of any `object` keys. | ||
This function has the same signature as the callback functions. When defined it is expected to return a `function` or `undefined`. | ||
The returned value is used as a comparator to determine the traversal order of any `object` keys. | ||
This works together with the `reverse` option. | ||
@@ -478,3 +480,3 @@ | ||
joined: true, | ||
compareFn: (k1, k2) => k1.localeCompare(k2), | ||
compareFn: () => (k1, k2) => k1.localeCompare(k2), | ||
reverse: false | ||
@@ -481,0 +483,0 @@ })(haystack); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63779
1080