changeset 2612:6fdefb00858f

Documented Buffer.from(arrayBuffer) method in njs.
author Yaroslav Zhuravlev <yar@nginx.com>
date Tue, 20 Oct 2020 14:36:53 +0100
parents 454af1d39021
children 19adce855a3f
files xml/en/docs/njs/reference.xml
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/njs/reference.xml
+++ b/xml/en/docs/njs/reference.xml
@@ -9,7 +9,7 @@
 <article name="Reference"
         link="/en/docs/njs/reference.html"
         lang="en"
-        rev="55">
+        rev="56">
 
 <section id="summary">
 
@@ -969,6 +969,17 @@ in the range <literal>0</literal> – <literal>255</literal>.
 Array entries outside that range will be truncated.
 </tag-desc>
 
+<tag-name id="buffer_from_arraybuffer"><literal>Buffer.from(<value>arrayBuffer</value>,
+<value>byteOffset</value>[,
+<value>length</value>]])</literal></tag-name>
+<tag-desc>
+Creates a view of the <value>ArrayBuffer</value>
+without copying the underlying memory.
+The optional <value>byteOffset</value> and <value>length</value> arguments
+specify a memory range within the <value>arrayBuffer</value>
+that will be shared by the Buffer.
+</tag-desc>
+
 <tag-name id="buffer_from_buffer"><literal>Buffer.from(<value>buffer</value>)</literal></tag-name>
 <tag-desc>
 Copies the passed buffer data onto a new Buffer instance.