.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / is-word-character / readme.md
1 # is-word-character
2
3 [![Build][build-badge]][build]
4 [![Coverage][coverage-badge]][coverage]
5 [![Downloads][downloads-badge]][downloads]
6 [![Size][size-badge]][size]
7
8 Check if a character is a word character (`\w`, which equals `[a-zA-Z0-9_]`).
9
10 ## Install
11
12 [npm][]:
13
14 ```sh
15 npm install is-word-character
16 ```
17
18 ## Use
19
20 ```js
21 var wordCharacter = require('is-word-character')
22
23 wordCharacter('a') // => true
24 wordCharacter('Z') // => true
25 wordCharacter('0') // => true
26 wordCharacter('_') // => true
27 wordCharacter(' ') // => false
28 wordCharacter('💩') // => false
29 ```
30
31 ## API
32
33 ### `wordCharacter(character|code)`
34
35 Check whether the given character code (`number`), or the character code at the
36 first position (`string`), is a word character.
37
38 ## Related
39
40 *   [`is-alphabetical`](https://github.com/wooorm/is-alphabetical)
41 *   [`is-alphanumerical`](https://github.com/wooorm/is-alphanumerical)
42 *   [`is-decimal`](https://github.com/wooorm/is-decimal)
43 *   [`is-hexadecimal`](https://github.com/wooorm/is-hexadecimal)
44 *   [`is-whitespace-character`](https://github.com/wooorm/is-whitespace-character)
45
46 ## License
47
48 [MIT][license] Â© [Titus Wormer][author]
49
50 <!-- Definitions -->
51
52 [build-badge]: https://img.shields.io/travis/wooorm/is-word-character.svg
53
54 [build]: https://travis-ci.org/wooorm/is-word-character
55
56 [coverage-badge]: https://img.shields.io/codecov/c/github/wooorm/is-word-character.svg
57
58 [coverage]: https://codecov.io/github/wooorm/is-word-character
59
60 [downloads-badge]: https://img.shields.io/npm/dm/is-word-character.svg
61
62 [downloads]: https://www.npmjs.com/package/is-word-character
63
64 [size-badge]: https://img.shields.io/bundlephobia/minzip/is-word-character.svg
65
66 [size]: https://bundlephobia.com/result?p=is-word-character
67
68 [npm]: https://docs.npmjs.com/cli/install
69
70 [license]: license
71
72 [author]: https://wooorm.com