.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / is-word-character / index.js
1 'use strict'
2
3 module.exports = wordCharacter
4
5 var fromCode = String.fromCharCode
6 var re = /\w/
7
8 // Check if the given character code, or the character code at the first
9 // character, is a word character.
10 function wordCharacter(character) {
11   return re.test(
12     typeof character === 'number' ? fromCode(character) : character.charAt(0)
13   )
14 }