Subject: [PATCH 39/44] gnu: Add node-array-buffer-byte-length.

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

* gnu/packages/node-xyz.scm (node-array-buffer-byte-length): New variable.

Change-Id: I8bd8ccf95e90208dbd01e09743114b88bec02a3a
---
 gnu/packages/node-xyz.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/node-xyz.scm b/gnu/packages/node-xyz.scm
index 1d6d7b4f77..56cb4bfc51 100644
--- a/gnu/packages/node-xyz.scm
+++ b/gnu/packages/node-xyz.scm
@@ -193,6 +193,14 @@ (define new-test-script
 ABI-stable across Node.js major versions.")
     (license license:expat)))
 
+(define-public node-array-buffer-byte-length
+  (node-trivial-package
+   "array-buffer-byte-length" 0
+   "(aBfr) => (aBfr instanceof ArrayBuffer ? aBfr.byteLength : NaN)"
+   "This package provides a function which returns the length (in bytes) of an
+ArrayBuffer in Javascript."
+   #:mozilla-doclink "/Global_Objects/ArrayBuffer/byteLength"))
+
 (define-public node-available-typed-arrays
   (package
     (name "node-available-typed-arrays")
-- 
2.41.0