@neoncitylights/whatwg-infra
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@neoncitylights/whatwg-infra

License: MIT npm (scoped) Codecov GitHub Workflow Status (with event)

A small TypeScript package implementing various Unicode-related algorithms from the WHATWG Infra Standard1. This currently includes:

Install

npm install @neoncitylights/whatwg-infra

Documentation

Auto-generated API documentation is available.

API reference

Code points

  • fn: # codePoints.isCodePointBetween(value, low, max): boolean • source
  • fn: # codePoints.isAsciiByte(value): boolean • source
  • fn: # codePoints.isSurrogate(value): boolean • source
  • fn: # codePoints.isScalarValue(value): boolean • source
  • fn: # codePoints.isNonCharacter(value): boolean • source
  • fn: # codePoints.isAsciiTabOrNewline(value): boolean • source
  • fn: # codePoints.isAsciiWhitespace(value): boolean • source
  • fn: # codePoints.isC0Control(value): boolean • source
  • fn: # codePoints.isC0ControlOrSpace(value): boolean • source
  • fn: # codePoints.isControl(value): boolean • source
  • fn: # codePoints.isAsciiDigit(value): boolean • source
  • fn: # codePoints.isAsciiUpperHexDigit(value): boolean • source
  • fn: # codePoints.isAsciiLowerHexDigit(value): boolean • source
  • fn: # codePoints.isAsciiHexDigit(value): boolean • source
  • fn: # codePoints.isAsciiUpperAlpha(value): boolean • source
  • fn: # codePoints.isAsciiLowerAlpha(value): boolean • source
  • fn: # codePoints.isAsciiAlpha(value): boolean • source
  • fn: # codePoints.isAsciiAlphanumeric(value): boolean • source

Strings

  • fn: # strings.collectCodepoints(value, position, predicate): [string, number] • source
  • fn: # strings.convertStringToScalarValue(value): string • source
  • fn: # strings.stripNewlines(value): string • source
  • fn: # strings.normalizeNewlines(value): string • source
  • fn: # strings.stripTrailingLeadingAsciiWhitespace(value): string • source
  • fn: # strings.stripCollapseAsciiWhitespace(value): string • source

License

This library is licensed under the MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT).

Contribution

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.

  1. WHATWG Working Group. (2022, November 23). Infra Standard. Retrieved November 25, 2022, from https://infra.spec.whatwg.org/

Dependencies (0)

    Dev Dependencies (14)

    Package Sidebar

    Install

    npm i @neoncitylights/whatwg-infra

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    18.3 kB

    Total Files

    7

    Last publish

    Collaborators

    • neoncitylights