.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / eslint / lib / rules / utils / unicode / is-surrogate-pair.js
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 };