Merge pull request #3585 from snakehnb/master

Avoid parsing first and last names in Chinese, Japanese and Korean la…
This commit is contained in:
advplyr 2024-11-06 17:19:58 -06:00 committed by GitHub
commit 0c244cbf95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,6 +52,13 @@ module.exports.parse = (nameString) => {
}
if (splitNames.length) splitNames = splitNames.map((a) => a.trim())
// If names are in ChineseJapanese and Korean languages, return as is.
if (/[\u4e00-\u9fff\u3040-\u30ff\u31f0-\u31ff]/.test(splitNames[0])) {
return {
names: splitNames
}
}
var names = []
// 1 name FIRST LAST