Subject: [PATCH 11/44] gnu: Add node-for-each.

From: Nicolas Graves <[email-masked]>
Date: Tue, 6 Feb 2024 00:18:59 +0100

* gnu/packages/node-xyz.scm (node-for-each): New variable.
---
 gnu/packages/node-xyz.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index facbeb6a75..14657a33b2 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -459,6 +459,39 @@ (define-public node-file-uri-to-path
 suitable for use with the @code{fs} module functions.")
     (license license:expat)))
 
+(define-public node-for-each
+  (package
+    (name "node-for-each")
+    (version "0.3.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/Raynos/for-each")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0c28lq995xr3anf407zizdh8z18pag6ww8fm95yxl8m1sdfljya7"))))
+    (build-system node-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'patch-dependencies 'delete-dependencies
+           (lambda args
+             (delete-dependencies
+              '("@ljharb/eslint-config"
+		"eslint"
+		"nsp"
+                "tape")))))
+       #:tests? #f))  ; FIXME tests depend on node-tape.
+    (inputs (list node-is-callable))
+    (home-page "https://github.com/Raynos/for-each")
+    (synopsis "Alternative implementation of the forEach Javascript function")
+    (description "This package provides an alternative implementation of the
+forEach Javascript function, which works not only on
+@code{Array.prototype.forEach} but also on objects.")
+    (license license:expat)))
+
 (define-public node-function-bind
   (package
     (name "node-function-bind")
-- 
2.41.0