diff --git a/doc/api/buffer.md b/doc/api/buffer.md index f419be1181a61a..0e4fefdf8ed22c 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -459,14 +459,20 @@ multiple worker threads. ### `new buffer.Blob([sources[, options]])` * `sources` {string[]|ArrayBuffer[]|TypedArray[]|DataView[]|Blob[]} An array of string, {ArrayBuffer}, {TypedArray}, {DataView}, or {Blob} objects, or any mix of such objects, that will be stored within the `Blob`. * `options` {Object} - * `encoding` {string} The character encoding to use for string sources. - **Default:** `'utf8'`. + * `endings` {string} One of either `'transparent'` or `'native'`. When set + to `'native'`, line endings in string source parts will be converted to + the platform native line-ending as specified by `require('os').EOL`. * `type` {string} The Blob content-type. The intent is for `type` to convey the MIME media type of the data, however no validation of the type format is performed. @@ -476,7 +482,9 @@ Creates a new `Blob` object containing a concatenation of the given sources. {ArrayBuffer}, {TypedArray}, {DataView}, and {Buffer} sources are copied into the 'Blob' and can therefore be safely modified after the 'Blob' is created. -String sources are also copied into the `Blob`. +String sources are encoded as UTF-8 byte sequences and copied into the Blob. +Unmatched surrogate pairs within each string part will be replaced by Unicode +U+FFFD replacement characters. ### `blob.arrayBuffer()`