From 208305fd8fd57a220bc2250fd83673f37876c110 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Sun, 22 Aug 2021 08:01:41 +0200 Subject: [PATCH] doc: move util.toUSVString() outside of deprecated group MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/nodejs/node/pull/39814/files#r693445849 PR-URL: https://github.com/nodejs/node/pull/39840 Reviewed-By: Michaƫl Zasso Reviewed-By: Yongsheng Zhang Reviewed-By: Darshan Sen --- doc/api/util.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/doc/api/util.md b/doc/api/util.md index 8bcc9ebda10599..5f0cbfc42e1b4e 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -1304,6 +1304,17 @@ const { read, written } = encoder.encodeInto(src, dest); The encoding supported by the `TextEncoder` instance. Always set to `'utf-8'`. +## `util.toUSVString(string)` + + +* `string` {string} + +Returns the `string` after replacing any surrogate code points +(or equivalently, any unpaired surrogate code units) with the +Unicode "replacement character" U+FFFD. + ## `util.types` - -* `string` {string} - -Returns the `string` after replacing any surrogate code points -(or equivalently, any unpaired surrogate code units) with the -Unicode "replacement character" U+FFFD. - [Common System Errors]: errors.md#errors_common_system_errors [Custom inspection functions on objects]: #util_custom_inspection_functions_on_objects [Custom promisified functions]: #util_custom_promisified_functions