From 6737257d70bbcf0f1b594ee0204d73001b492ef5 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 Refs: https://github.com/nodejs/node/pull/39814/files#r693445849 --- 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 dc47704e0b74f7..e0912093af3640 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -1306,6 +1306,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