diff options
author | Robert Nagy <ronagy@icloud.com> | 2021-08-19 22:40:18 +0300 |
---|---|---|
committer | Luigi Pinca <luigipinca@gmail.com> | 2021-08-22 08:08:00 +0300 |
commit | 82ae00cae497cffc5084d11aae8ecdac4843511e (patch) | |
tree | f1831b53995e22df6b6286e87bab70047fd72168 /doc/api | |
parent | 11109470b744559c1a67d324fe52b3864440ccd5 (diff) |
util: expose toUSVString
Expose toUSVString so it can be used by user libraries.
PR-URL: https://github.com/nodejs/node/pull/39814
Refs: https://github.com/nodejs/undici/pull/986
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/util.md | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/api/util.md b/doc/api/util.md index 4cdba522744..dc47704e0b7 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -2492,6 +2492,18 @@ const util = require('util'); util.log('Timestamped message.'); ``` + +### `util.toUSVString(string)` +<!-- YAML +added: REPLACEME +--> + +* `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 |