string-byte-length
Advanced tools
Comparing version
@@ -23,3 +23,3 @@ | ||
if(codepoint<FIRST_LOW_SURROGATE||codepoint>LAST_LOW_SURROGATE){ | ||
if(codepoint<FIRST_HIGH_SURROGATE||codepoint>LAST_HIGH_SURROGATE){ | ||
continue; | ||
@@ -37,4 +37,4 @@ } | ||
if( | ||
nextCodepoint<FIRST_HIGH_SURROGATE|| | ||
nextCodepoint>LAST_HIGH_SURROGATE) | ||
nextCodepoint<FIRST_LOW_SURROGATE|| | ||
nextCodepoint>LAST_LOW_SURROGATE) | ||
{ | ||
@@ -58,6 +58,6 @@ continue; | ||
const FIRST_LOW_SURROGATE=55296; | ||
const LAST_LOW_SURROGATE=56319; | ||
const FIRST_HIGH_SURROGATE=56320; | ||
const LAST_HIGH_SURROGATE=57343; | ||
const FIRST_HIGH_SURROGATE=55296; | ||
const LAST_HIGH_SURROGATE=56319; | ||
const FIRST_LOW_SURROGATE=56320; | ||
const LAST_LOW_SURROGATE=57343; | ||
//# sourceMappingURL=char_code.js.map |
{ | ||
"name": "string-byte-length", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"type": "module", | ||
@@ -9,3 +9,3 @@ "exports": "./build/src/main.js", | ||
"files": [ | ||
"build/src/**/*.{js,d.ts,map,json,sh,md}" | ||
"build/src/**/*.{js,d.ts,json}" | ||
], | ||
@@ -52,3 +52,3 @@ "scripts": { | ||
"spyd": "^0.5.0", | ||
"test-each": "^5.1.1" | ||
"test-each": "^5.2.0" | ||
}, | ||
@@ -55,0 +55,0 @@ "engines": { |
@@ -149,2 +149,9 @@ [](https://codecov.io/gh/ehmicky/string-byte-length) | ||
# Related projects | ||
- [`string-byte-slice`](https://github.com/ehmicky/string-byte-slice): Like | ||
`string.slice()` but bytewise | ||
- [`truncate-json`](https://github.com/ehmicky/truncate-json): Truncate a JSON | ||
string | ||
# Support | ||
@@ -151,0 +158,0 @@ |
183
3.98%25727
-22.47%8
-33.33%