+50
-6
@@ -56,4 +56,11 @@ /* | ||
| workerLimit?: number, | ||
| JSONstring?: boolean, | ||
| debug?: boolean | ||
| } | ||
| /** | ||
| * JavaScript String Compressor - decompress options | ||
| * @license MIT | ||
| * @copyright (c) 2025-2026 JustDeveloper <<https://justdeveloper.is-a.dev>> | ||
| * @since 2.1.0 | ||
| */ | ||
| export interface decompressOptions { | ||
@@ -63,2 +70,39 @@ stringify?: boolean, | ||
| } | ||
| /** | ||
| * JavaScript String Compressor - debug output | ||
| * @license MIT | ||
| * @copyright (c) 2025-2026 JustDeveloper <<https://justdeveloper.is-a.dev>> | ||
| * @since 2.1.0 | ||
| */ | ||
| export interface JSSCCompressedDebug { | ||
| string: string, | ||
| header: { | ||
| code: number, | ||
| bin: string, | ||
| blocks: [string, "0"|"1", string, "0"|"1", "0"|"1", "0"|"1", string], | ||
| code1: string, | ||
| code2: string, | ||
| code3: string, | ||
| s: boolean, | ||
| i: boolean, | ||
| o: boolean, | ||
| b: boolean | ||
| }, | ||
| mode: { | ||
| id: number, | ||
| name: string | ||
| } | ||
| } | ||
| /** | ||
| * JavaScript String Compressor - debug output | ||
| * @license MIT | ||
| * @copyright (c) 2025-2026 JustDeveloper <<https://justdeveloper.is-a.dev>> | ||
| * @since 2.1.0 | ||
| */ | ||
| export interface JSSCDebug { | ||
| input: string|object|number|JSSCCompressedDebug, | ||
| output: string|object|number|JSSCCompressedDebug, | ||
| options: compressOptions | decompressOptions, | ||
| workers: boolean | ||
| } | ||
@@ -73,3 +117,3 @@ /** | ||
| */ | ||
| export function compress(str: string, options?: compressOptions): Promise<string>; | ||
| export function compress(str: string, options?: compressOptions): Promise<string|JSSCDebug>; | ||
| /** | ||
@@ -84,3 +128,3 @@ * JavaScript String Compressor - compress function | ||
| */ | ||
| export function compress(obj: object, options?: compressOptions): Promise<string>; | ||
| export function compress(obj: object, options?: compressOptions): Promise<string|JSSCDebug>; | ||
| /** | ||
@@ -94,3 +138,3 @@ * JavaScript String Compressor - compress function | ||
| */ | ||
| export function compress(int: number, options?: compressOptions): Promise<string>; | ||
| export function compress(int: number, options?: compressOptions): Promise<string|JSSCDebug>; | ||
@@ -105,3 +149,3 @@ /** | ||
| */ | ||
| export function decompress(str: string): Promise<object|number|string>; | ||
| export function decompress(str: string): Promise<object|number|string|JSSCDebug>; | ||
| /** | ||
@@ -116,3 +160,3 @@ * JavaScript String Compressor - decompress function | ||
| */ | ||
| export function decompress(str: string, stringify: true): Promise<string>; | ||
| export function decompress(str: string, stringify: true): Promise<string|JSSCDebug>; | ||
| /** | ||
@@ -126,3 +170,3 @@ * JavaScript String Compressor - decompress function | ||
| */ | ||
| export function decompress(str: string, options?: decompressOptions): Promise<object|number|string>; | ||
| export function decompress(str: string, options?: decompressOptions): Promise<object|number|string|JSSCDebug>; | ||
@@ -129,0 +173,0 @@ /** |
+1
-1
| { | ||
| "name": "strc", | ||
| "version": "2.1.0-test.4b", | ||
| "version": "2.1.0", | ||
| "description": "JavaScript String Compressor - lossless string compression algorithm", | ||
@@ -5,0 +5,0 @@ "main": "dist/jssc.cjs", |
+3
-1
@@ -12,3 +12,3 @@  | ||
| ⚠️ **Compatibility Notice:** Compressed strings from v1.x.x are **not compatible** with v2.x.x due to header and encoding changes. JSSC follows Semantic Versioning: successful decompression is guaranteed only if the decompressor version is equal to or newer than the compressor version (within the same major version). | ||
| > ⚠️ **Compatibility Notice:** Compressed strings from v1.x.x are **not compatible** with v2.x.x due to header and encoding changes. JSSC follows Semantic Versioning: successful decompression is guaranteed only if the decompressor version is equal to or newer than the compressor version (within the same major version). | ||
@@ -58,2 +58,3 @@ ## Key Features | ||
| - [utf8.js](https://github.com/mathiasbynens/utf8.js) by [Mathias Bynens](https://mathiasbynens.be/) | ||
| <br> | ||
@@ -64,2 +65,3 @@ JSSC CLI and Format Handling (`.jssc`) depends on: | ||
| - [uint8arrays](https://www.npmjs.com/package/uint8arrays) by [Alex Potsides](https://github.com/achingbrain) | ||
| <br> | ||
@@ -66,0 +68,0 @@ > **Note:** All dependencies (except **JUSTC**) are bundled into the final build. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1152623
0.39%30908
0.32%2
-33.33%69
2.99%