main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
471 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * @author Toru Nagashima <https://github.com/mysticatea>
|
---|
3 | */
|
---|
4 | "use strict";
|
---|
5 |
|
---|
6 | /**
|
---|
7 | * Check whether given two characters are a surrogate pair.
|
---|
8 | * @param {number} lead The code of the lead character.
|
---|
9 | * @param {number} tail The code of the tail character.
|
---|
10 | * @returns {boolean} `true` if the character pair is a surrogate pair.
|
---|
11 | */
|
---|
12 | module.exports = function isSurrogatePair(lead, tail) {
|
---|
13 | return lead >= 0xD800 && lead < 0xDC00 && tail >= 0xDC00 && tail < 0xE000;
|
---|
14 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.