intial
This commit is contained in:
21
node_modules/eslint/lib/rules/utils/string-utils.js
generated
vendored
Normal file
21
node_modules/eslint/lib/rules/utils/string-utils.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* @fileoverview Common utils for strings.
|
||||
*/
|
||||
"use strict";
|
||||
//------------------------------------------------------------------------------
|
||||
// Public Interface
|
||||
//------------------------------------------------------------------------------
|
||||
const LETTER_PATTERN = /\p{L}/u;
|
||||
/**
|
||||
* Checks if the given string contains a letter.
|
||||
* @param {string} string The string to test.
|
||||
* @returns {boolean} `true` if the string contains a letter.
|
||||
*/
|
||||
function containsLetter(string) {
|
||||
return LETTER_PATTERN.test(string);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
LETTER_PATTERN,
|
||||
containsLetter,
|
||||
};
|
||||
Reference in New Issue
Block a user