This commit is contained in:
14
node_modules/is-word-character/index.js
generated
vendored
Normal file
14
node_modules/is-word-character/index.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = wordCharacter
|
||||
|
||||
var fromCode = String.fromCharCode
|
||||
var re = /\w/
|
||||
|
||||
// Check if the given character code, or the character code at the first
|
||||
// character, is a word character.
|
||||
function wordCharacter(character) {
|
||||
return re.test(
|
||||
typeof character === 'number' ? fromCode(character) : character.charAt(0)
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user