Mercurial > hg > nginx-site
comparison 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 |
comparison
equal
deleted
inserted
replaced
2611:454af1d39021 | 2612:6fdefb00858f |
---|---|
7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> | 7 <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> |
8 | 8 |
9 <article name="Reference" | 9 <article name="Reference" |
10 link="/en/docs/njs/reference.html" | 10 link="/en/docs/njs/reference.html" |
11 lang="en" | 11 lang="en" |
12 rev="55"> | 12 rev="56"> |
13 | 13 |
14 <section id="summary"> | 14 <section id="summary"> |
15 | 15 |
16 <para> | 16 <para> |
17 <link doc="index.xml">njs</link> provides objects, methods and properties | 17 <link doc="index.xml">njs</link> provides objects, methods and properties |
967 Allocates a new Buffer using an array of bytes | 967 Allocates a new Buffer using an array of bytes |
968 in the range <literal>0</literal> – <literal>255</literal>. | 968 in the range <literal>0</literal> – <literal>255</literal>. |
969 Array entries outside that range will be truncated. | 969 Array entries outside that range will be truncated. |
970 </tag-desc> | 970 </tag-desc> |
971 | 971 |
972 <tag-name id="buffer_from_arraybuffer"><literal>Buffer.from(<value>arrayBuffer</value>, | |
973 <value>byteOffset</value>[, | |
974 <value>length</value>]])</literal></tag-name> | |
975 <tag-desc> | |
976 Creates a view of the <value>ArrayBuffer</value> | |
977 without copying the underlying memory. | |
978 The optional <value>byteOffset</value> and <value>length</value> arguments | |
979 specify a memory range within the <value>arrayBuffer</value> | |
980 that will be shared by the Buffer. | |
981 </tag-desc> | |
982 | |
972 <tag-name id="buffer_from_buffer"><literal>Buffer.from(<value>buffer</value>)</literal></tag-name> | 983 <tag-name id="buffer_from_buffer"><literal>Buffer.from(<value>buffer</value>)</literal></tag-name> |
973 <tag-desc> | 984 <tag-desc> |
974 Copies the passed buffer data onto a new Buffer instance. | 985 Copies the passed buffer data onto a new Buffer instance. |
975 </tag-desc> | 986 </tag-desc> |
976 | 987 |