This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/eslint/lib/util/unicode/is-surrogate-pair.js

15 lines
471 B
JavaScript
Raw Normal View History

2019-08-11 18:48:02 +00:00
/**
* @author Toru Nagashima <https://github.com/mysticatea>
*/
"use strict";
/**
* Check whether given two characters are a surrogate pair.
* @param {number} lead The code of the lead character.
* @param {number} tail The code of the tail character.
* @returns {boolean} `true` if the character pair is a surrogate pair.
*/
module.exports = function isSurrogatePair(lead, tail) {
return lead >= 0xD800 && lead < 0xDC00 && tail >= 0xDC00 && tail < 0xE000;
};