diff --git a/lib/unicode.js b/lib/unicode.js index 4963825..3707c01 100644 --- a/lib/unicode.js +++ b/lib/unicode.js @@ -418,6 +418,22 @@ exports.isNonSpacing = function(str, i) { return exports.combining[point] === true; }; +/* +exports.codePointAt = function(str, position) { + position = +position || 0; + var x = str.charCodeAt(position); + var y = str.length > 1 ? str.charCodeAt(position + 1) : 0; + var point = x; + if ((0xD800 <= x && x <= 0xDBFF) && (0xDC00 <= y && y <= 0xDFFF)) { + x &= 0x3FF; + y &= 0x3FF; + point = (x << 10) | y; + point += 0x10000; + } + return point; +}; +*/ + exports.codePointAt = function(str, position) { if (str == null) { throw TypeError();