is-diacritical-mark

1.0.2 • Public • Published

Checks for diacritical marks

This simple module provides 2 methods to check if a character is a diacritical mark, more specifically, accents.

This is useful for cases where you're firing events on everything a user types but you might want to ignore when he types an accent before the character the accent is applied on.

The following accents are detected:

^
`
~
¨
´

Install

npm install is-diacritical-mark

fromCode(code)

Takes a charCode and returns true if the code for the character matches.

fromChar(char)

Takes a character and returns true if the character matches.

/is-diacritical-mark/

    Package Sidebar

    Install

    npm i is-diacritical-mark

    Weekly Downloads

    4

    Version

    1.0.2

    License

    BSD

    Last publish

    Collaborators

    • trodrigues