From c437610d9ca4479f58de1daa4318080bfcbb2e47 Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 10 Apr 2026 19:12:08 +0100 Subject: [PATCH] feat: add `arr-flatten` 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 7efdf48..b090057 100644 --- a/manifests/micro-utilities.json +++ b/manifests/micro-utilities.json @@ -12,6 +12,12 @@ "description": "You can use a combination of `filter` and `includes` to calculate the difference between two arrays.", "example": "const difference = (a, b) => a.filter((item) => !b.includes(item))" }, + "snippet::array-flatten": { + "id": "snippet::array-flatten", + "type": "simple", + "description": "You can use `Array.prototype.flat` with `Infinity` as an argument to fully flatten an array.", + "example": "array.flat(Infinity)" + }, "snippet::array-from-count": { "id": "snippet::array-from-count", "type": "simple", @@ -319,6 +325,11 @@ "moduleName": "arr-diff", "replacements": ["snippet::array-difference"] }, + "arr-flatten": { + "type": "module", + "moduleName": "arr-flatten", + "replacements": ["snippet::array-flatten"] + }, "array-back": { "type": "module", "moduleName": "array-back",