'use strict'; // https://mathiasbynens.be/notes/javascript-encoding // https://github.com/bestiejs/punycode.js - punycode.ucs2.decode module.exports = function ucs2length(str) { var length = 0 , len = str.length , pos = 0 , value; while (pos < len) { length++; value = str.charCodeAt(pos++); if (value >= 0xD800 && value <= 0xDBFF && pos < len) { // high surrogate, and there is a next character value = str.charCodeAt(pos); if ((value & 0xFC00) == 0xDC00) pos++; // low surrogate } } return length; };
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
_rules.js | File | 1.19 KB | 0644 |
|
async.js | File | 2.58 KB | 0644 |
|
equal.js | File | 60 B | 0644 |
|
error_classes.js | File | 828 B | 0644 |
|
formats.js | File | 11.46 KB | 0644 |
|
index.js | File | 10.09 KB | 0644 |
|
resolve.js | File | 7.74 KB | 0644 |
|
rules.js | File | 1.74 KB | 0644 |
|
schema_obj.js | File | 133 B | 0644 |
|
ucs2length.js | File | 558 B | 0644 |
|
util.js | File | 7.71 KB | 0644 |
|