iwc

is-word-character

Check if a character is a word character

Showing:

Popularity

Downloads/wk

671K

GitHub Stars

3

Maintenance

Last Commit

1mo ago

Contributors

1

Package

Dependencies

0

License

MIT

Type Definitions

Built-In

Tree-Shakeable

No?

Categories

Readme

is-word-character

Build Coverage Downloads Size

Check if a character is a word character (\w, which equals [a-zA-Z0-9_]).

Install

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

npm:

npm install is-word-character

Use

import {isWordCharacter} from 'is-word-character'

isWordCharacter('a') // => true
isWordCharacter('Z') // => true
isWordCharacter('0') // => true
isWordCharacter('_') // => true
isWordCharacter(' ') // => false
isWordCharacter('💩') // => false

API

This package exports the following identifiers: isWordCharacter. There is no default export.

isWordCharacter(character|code)

Check whether the given character code (number), or the character code at the first position (string), is a word character.

License

MIT © Titus Wormer

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial