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