|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 2 weeks ago |
|
Fix frontend appearance
|
-
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.