Well-formed Unicode strings
Modules
es.string.is-well-formed and es.string.to-well-formed.
Built-ins signatures
class String {
isWellFormed(): boolean;
toWellFormed(): string;
}
Entry points
core-js/proposals/well-formed-unicode-strings
core-js(-pure)/es|stable|actual|full/string(/virtual)/is-well-formed
core-js(-pure)/es|stable|actual|full/string(/virtual)/to-well-formed
Examples
'a💩b'.isWellFormed(); // => true
'a\uD83Db'.isWellFormed(); // => false
'a💩b'.toWellFormed(); // => 'a💩b'
'a\uD83Db'.toWellFormed(); // => 'a�b'