Mercurial > hg > nginx-site
diff xml/en/docs/njs/reference.xml @ 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 | 99bd2ae8d2be |
children | 0ce45b4edb75 |
line wrap: on
line diff
--- a/xml/en/docs/njs/reference.xml Fri Oct 16 17:55:16 2020 +0100 +++ b/xml/en/docs/njs/reference.xml Tue Oct 20 14:36:53 2020 +0100 @@ -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 @@ 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.