You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

string-byte-length

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

string-byte-length - npm Package Compare versions

Comparing version

to
1.3.0

14

build/src/char_code.js

@@ -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 @@ [![Codecov](https://img.shields.io/codecov/c/github/ehmicky/string-byte-length.svg?label=tested&logo=codecov)](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 @@