Subject: [PATCH 28/44] gnu: Add node-stop-iteration-iterator.

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

* gnu/packages/node-xyz.scm (node-stop-iteration-iterator): New variable.
---
 gnu/packages/node-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 045ecfe139..c58f10e483 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -2286,6 +2286,43 @@ (define-public node-statsd-parser
 protocol used in @code{node-lynx}.")
     (license license:asl2.0)))
 
+(define-public node-stop-iteration-iterator
+  (package
+    (name "node-stop-iteration-iterator")
+    (version "1.0.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/ljharb/stop-iteration-iterator")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1kxwa74y1qb67r80s2pmys6zv1w44f5b20ys8s9b79nij83r88sl"))))
+    (build-system node-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'patch-dependencies 'delete-dependencies
+           (lambda args
+             (delete-dependencies
+              '("@ljharb/eslint-config"
+                "aud"
+                "auto-changelog"
+                "eslint"
+                "npmignore"
+                "nyc"
+                "safe-publish-latest"
+                "tape")))))
+       #:tests? #f))  ; FIXME tests depend on node-tape.
+    (inputs
+     (list node-internal-slot))
+    (home-page "https://github.com/ljharb/stop-iteration-iterator")
+    (synopsis "Throw @code{StopIteration} when iterator is done in Javascript")
+    (description "This package provides a Javascript function for iterators to
+throw a @code{StopIteration} object to indicate when they are done.")
+    (license license:expat)))
+
 (define-public node-string-decoder
   (package
     (name "node-string-decoder")
-- 
2.41.0