stdlib
stdlib copied to clipboard
[RFC]: add `@stdlib/assert/is-well-formed-string`
Description
This RFC proposes adding support for asserting whether an input value is a well-formed string (i.e. does not contain lone surrogates).
Package: @stdlib/assert/is-well-formed-string
Alias: isWellFormedString
Related Issues
None.
Questions
No.
Other
Resources:
- Lone surrogates: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_code_points_and_grapheme_clusters
- isWellFormed: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/isWellFormed
Prior art in stdlib:
@stdlib/assert/is-string@stdlib/assert/is-empty-string
Checklist
- [X] I have read and understood the Code of Conduct.
- [X] Searched for existing issues and pull requests.
- [X] The issue name begins with
RFC:.