A small TypeScript package implementing various Unicode-related algorithms from the WHATWG Infra Standard1. This currently includes:
npm install @neoncitylights/whatwg-infra
Auto-generated API documentation is available.
fn
: # codePoints.isCodePointBetween(value, low, max): boolean • sourcefn
: # codePoints.isAsciiByte(value): boolean • sourcefn
: # codePoints.isSurrogate(value): boolean • sourcefn
: # codePoints.isScalarValue(value): boolean • sourcefn
: # codePoints.isNonCharacter(value): boolean • sourcefn
: # codePoints.isAsciiTabOrNewline(value): boolean • sourcefn
: # codePoints.isAsciiWhitespace(value): boolean • sourcefn
: # codePoints.isC0Control(value): boolean • sourcefn
: # codePoints.isC0ControlOrSpace(value): boolean • sourcefn
: # codePoints.isControl(value): boolean • sourcefn
: # codePoints.isAsciiDigit(value): boolean • sourcefn
: # codePoints.isAsciiUpperHexDigit(value): boolean • sourcefn
: # codePoints.isAsciiLowerHexDigit(value): boolean • sourcefn
: # codePoints.isAsciiHexDigit(value): boolean • sourcefn
: # codePoints.isAsciiUpperAlpha(value): boolean • sourcefn
: # codePoints.isAsciiLowerAlpha(value): boolean • sourcefn
: # codePoints.isAsciiAlpha(value): boolean • sourcefn
: # codePoints.isAsciiAlphanumeric(value): boolean • source
fn
: # strings.collectCodepoints(value, position, predicate): [string, number] • sourcefn
: # strings.convertStringToScalarValue(value): string • sourcefn
: # strings.stripNewlines(value): string • sourcefn
: # strings.normalizeNewlines(value): string • sourcefn
: # strings.stripTrailingLeadingAsciiWhitespace(value): string • sourcefn
: # strings.stripCollapseAsciiWhitespace(value): string • source
This library is licensed under the MIT license (LICENSE-MIT
or http://opensource.org/licenses/MIT).
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.
Footnotes
-
WHATWG Working Group. (2022, November 23). Infra Standard. Retrieved November 25, 2022, from https://infra.spec.whatwg.org/ ↩