From 6621cff8503d1e5f3360e2570d7ae49a530929db Mon Sep 17 00:00:00 2001 From: Maksim <11676775+maksimgm@users.noreply.github.com> Date: Wed, 18 Nov 2026 13:51:19 -0800 Subject: [PATCH] feat(micro-utilities): add array-equal to replacements --- manifests/micro-utilities.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/manifests/micro-utilities.json b/manifests/micro-utilities.json index ed6df631..ccbdf733 100644 --- a/manifests/micro-utilities.json +++ b/manifests/micro-utilities.json @@ -42,6 +42,12 @@ "description": "You can use `arr.at(-1)` if supported or `arr[arr.length - 1]` to get the last element of an array.", "example": "const last = (arr) => arr.at(-1);\n// or in older environments\nconst lastLegacy = (arr) => arr[arr.length - 1]" }, + "snippet::array-shallow-equal": { + "id": "snippet::array-shallow-equal", + "type": "simple", + "description": "You can compare the lengths and then use `Array.prototype.every` to check two arrays hold the same items in the same order.", + "example": "const arraysEqual = (a, b) => a === b || (a.length === b.length && a.every((value, i) => value === b[i]))" + }, "snippet::array-slice-exclude-last-n": { "id": "snippet::array-slice-exclude-last-n", "type": "simple", @@ -783,6 +789,11 @@ "moduleName": "array-differ", "replacements": ["snippet::array-difference"] }, + "array-equal": { + "type": "module", + "moduleName": "array-equal", + "replacements": ["snippet::array-shallow-equal"] + }, "array-ify": { "type": "module", "moduleName": "array-ify",