aboutsummaryrefslogtreecommitdiff
path: root/lib/parse.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2019-12-28 18:06:51 +0000
committerGitHub <noreply@github.com>2019-12-28 18:06:51 +0000
commit22b47cdd639263313317b77a3166afad767a7ef6 (patch)
tree9229cce61dbab21907e03434b9e799f4994898e7 /lib/parse.js
parent4cf612dc9fb0d96b48e8e156810c00c06a6a2a46 (diff)
downloadtracifyjs-22b47cdd639263313317b77a3166afad767a7ef6.tar.gz
tracifyjs-22b47cdd639263313317b77a3166afad767a7ef6.zip
improve unicode handling (#3648)
Diffstat (limited to 'lib/parse.js')
-rw-r--r--lib/parse.js4
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/parse.js b/lib/parse.js
index 740ef5f2..270af9b4 100644
--- a/lib/parse.js
+++ b/lib/parse.js
@@ -133,14 +133,10 @@ function is_letter(code) {
}
function is_surrogate_pair_head(code) {
- if (typeof code == "string")
- code = code.charCodeAt(0);
return code >= 0xd800 && code <= 0xdbff;
}
function is_surrogate_pair_tail(code) {
- if (typeof code == "string")
- code = code.charCodeAt(0);
return code >= 0xdc00 && code <= 0xdfff;
}