@minify-html/wasm
Advanced tools
+42
-160
@@ -7,8 +7,20 @@ let wasm; | ||
| const heap = new Array(128).fill(undefined); | ||
| let cachedUint8ArrayMemory0 = null; | ||
| function getUint8ArrayMemory0() { | ||
| if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { | ||
| cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); | ||
| } | ||
| return cachedUint8ArrayMemory0; | ||
| } | ||
| function getArrayU8FromWasm0(ptr, len) { | ||
| ptr = ptr >>> 0; | ||
| return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); | ||
| } | ||
| let heap = new Array(128).fill(undefined); | ||
| heap.push(undefined, null, true, false); | ||
| function getObject(idx) { return heap[idx]; } | ||
| let heap_next = heap.length; | ||
@@ -33,15 +45,22 @@ | ||
| const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; | ||
| function getObject(idx) { return heap[idx]; } | ||
| let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
| function isLikeNone(x) { | ||
| return x === undefined || x === null; | ||
| } | ||
| let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
| cachedTextDecoder.decode(); | ||
| let cachedUint8ArrayMemory0 = null; | ||
| function getUint8ArrayMemory0() { | ||
| if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { | ||
| cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); | ||
| const MAX_SAFARI_DECODE_BYTES = 2146435072; | ||
| let numBytesDecoded = 0; | ||
| function decodeText(ptr, len) { | ||
| numBytesDecoded += len; | ||
| if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) { | ||
| cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); | ||
| cachedTextDecoder.decode(); | ||
| numBytesDecoded = len; | ||
| } | ||
| return cachedUint8ArrayMemory0; | ||
| return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); | ||
| } | ||
@@ -51,3 +70,3 @@ | ||
| ptr = ptr >>> 0; | ||
| return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); | ||
| return decodeText(ptr, len); | ||
| } | ||
@@ -67,6 +86,2 @@ | ||
| function isLikeNone(x) { | ||
| return x === undefined || x === null; | ||
| } | ||
| let WASM_VECTOR_LEN = 0; | ||
@@ -97,7 +112,2 @@ | ||
| } | ||
| function getArrayU8FromWasm0(ptr, len) { | ||
| ptr = ptr >>> 0; | ||
| return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); | ||
| } | ||
| /** | ||
@@ -125,27 +135,7 @@ * @param {Uint8Array} code | ||
| export function __wbg_buffer_609cc3eee51ed158(arg0) { | ||
| const ret = getObject(arg0).buffer; | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbg_call_672a4d21634d4a24() { return handleError(function (arg0, arg1) { | ||
| const ret = getObject(arg0).call(getObject(arg1)); | ||
| return addHeapObject(ret); | ||
| export function __wbg_getRandomValues_1c61fac11405ffdc() { return handleError(function (arg0, arg1) { | ||
| globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1)); | ||
| }, arguments) }; | ||
| export function __wbg_call_7cccdd69e0791ae2() { return handleError(function (arg0, arg1, arg2) { | ||
| const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); | ||
| return addHeapObject(ret); | ||
| }, arguments) }; | ||
| export function __wbg_crypto_ed58b8e10a292839(arg0) { | ||
| const ret = getObject(arg0).crypto; | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbg_getRandomValues_bcb4912f16000dc4() { return handleError(function (arg0, arg1) { | ||
| getObject(arg0).getRandomValues(getObject(arg1)); | ||
| }, arguments) }; | ||
| export function __wbg_get_67b2ba62fc30de12() { return handleError(function (arg0, arg1) { | ||
| export function __wbg_get_458e874b43b18b25() { return handleError(function (arg0, arg1) { | ||
| const ret = Reflect.get(getObject(arg0), getObject(arg1)); | ||
@@ -155,117 +145,18 @@ return addHeapObject(ret); | ||
| export function __wbg_msCrypto_0a36e2ec3a343d26(arg0) { | ||
| const ret = getObject(arg0).msCrypto; | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbg_new_a12002a7f91c75be(arg0) { | ||
| const ret = new Uint8Array(getObject(arg0)); | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbg_newnoargs_105ed471475aaf50(arg0, arg1) { | ||
| const ret = new Function(getStringFromWasm0(arg0, arg1)); | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbg_newwithbyteoffsetandlength_d97e637ebe145a9a(arg0, arg1, arg2) { | ||
| const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0); | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbg_newwithlength_a381634e90c276d4(arg0) { | ||
| const ret = new Uint8Array(arg0 >>> 0); | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbg_node_02999533c4ea02e3(arg0) { | ||
| const ret = getObject(arg0).node; | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbg_process_5c1d670bc53614b8(arg0) { | ||
| const ret = getObject(arg0).process; | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbg_randomFillSync_ab2cfe79ebbf2740() { return handleError(function (arg0, arg1) { | ||
| getObject(arg0).randomFillSync(takeObject(arg1)); | ||
| }, arguments) }; | ||
| export function __wbg_require_79b1e9274cde3c87() { return handleError(function () { | ||
| const ret = module.require; | ||
| return addHeapObject(ret); | ||
| }, arguments) }; | ||
| export function __wbg_set_65595bdd868b3009(arg0, arg1, arg2) { | ||
| getObject(arg0).set(getObject(arg1), arg2 >>> 0); | ||
| }; | ||
| export function __wbg_static_accessor_GLOBAL_88a902d13a557d07() { | ||
| const ret = typeof global === 'undefined' ? null : global; | ||
| return isLikeNone(ret) ? 0 : addHeapObject(ret); | ||
| }; | ||
| export function __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0() { | ||
| const ret = typeof globalThis === 'undefined' ? null : globalThis; | ||
| return isLikeNone(ret) ? 0 : addHeapObject(ret); | ||
| }; | ||
| export function __wbg_static_accessor_SELF_37c5d418e4bf5819() { | ||
| const ret = typeof self === 'undefined' ? null : self; | ||
| return isLikeNone(ret) ? 0 : addHeapObject(ret); | ||
| }; | ||
| export function __wbg_static_accessor_WINDOW_5de37043a91a9c40() { | ||
| const ret = typeof window === 'undefined' ? null : window; | ||
| return isLikeNone(ret) ? 0 : addHeapObject(ret); | ||
| }; | ||
| export function __wbg_subarray_aa9065fa9dc5df96(arg0, arg1, arg2) { | ||
| const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0); | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbg_versions_c71aa1626a93e0a1(arg0) { | ||
| const ret = getObject(arg0).versions; | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbindgen_boolean_get(arg0) { | ||
| export function __wbg_wbindgenbooleanget_3fe6f642c7d97746(arg0) { | ||
| const v = getObject(arg0); | ||
| const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2; | ||
| return ret; | ||
| const ret = typeof(v) === 'boolean' ? v : undefined; | ||
| return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0; | ||
| }; | ||
| export function __wbindgen_is_function(arg0) { | ||
| const ret = typeof(getObject(arg0)) === 'function'; | ||
| return ret; | ||
| export function __wbg_wbindgenthrow_451ec1a8469d7eb6(arg0, arg1) { | ||
| throw new Error(getStringFromWasm0(arg0, arg1)); | ||
| }; | ||
| export function __wbindgen_is_object(arg0) { | ||
| const val = getObject(arg0); | ||
| const ret = typeof(val) === 'object' && val !== null; | ||
| return ret; | ||
| }; | ||
| export function __wbindgen_is_string(arg0) { | ||
| const ret = typeof(getObject(arg0)) === 'string'; | ||
| return ret; | ||
| }; | ||
| export function __wbindgen_is_undefined(arg0) { | ||
| const ret = getObject(arg0) === undefined; | ||
| return ret; | ||
| }; | ||
| export function __wbindgen_memory() { | ||
| const ret = wasm.memory; | ||
| export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) { | ||
| // Cast intrinsic for `Ref(String) -> Externref`. | ||
| const ret = getStringFromWasm0(arg0, arg1); | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbindgen_object_clone_ref(arg0) { | ||
| const ret = getObject(arg0); | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbindgen_object_drop_ref(arg0) { | ||
@@ -275,10 +166,1 @@ takeObject(arg0); | ||
| export function __wbindgen_string_new(arg0, arg1) { | ||
| const ret = getStringFromWasm0(arg0, arg1); | ||
| return addHeapObject(ret); | ||
| }; | ||
| export function __wbindgen_throw(arg0, arg1) { | ||
| throw new Error(getStringFromWasm0(arg0, arg1)); | ||
| }; | ||
+1
-1
@@ -7,3 +7,3 @@ { | ||
| ], | ||
| "version": "0.16.4", | ||
| "version": "0.18.1", | ||
| "files": [ | ||
@@ -10,0 +10,0 @@ "index_bg.wasm", |
+7
-7
@@ -17,3 +17,3 @@ <h1> | ||
| - Handles [invalid HTML](./notes/Parsing.md) and [templating syntax](#templating-syntax). | ||
| - Uses [minify-js](https://github.com/wilsonzlin/minify-js) and [lightningcss](https://github.com/parcel-bundler/lightningcss) for super fast JS and CSS minification. | ||
| - Uses [oxc](https://github.com/oxc-project/oxc) and [lightningcss](https://github.com/parcel-bundler/lightningcss) for super fast JS and CSS minification. | ||
@@ -64,3 +64,3 @@ View the [changelog](./CHANGELOG.md) to see the latest updates. | ||
| [dependencies] | ||
| minify-html = "0.16.4" | ||
| minify-html = "0.18.1" | ||
| ``` | ||
@@ -111,3 +111,3 @@ | ||
| - Binding: [Neon](https://github.com/neon-bindings/neon) | ||
| - Platforms: Linux (ARM64 and x64), macOS (ARM64 and x64), Windows (x64); Node.js 8.6.0 and higher | ||
| - Platforms: Linux (ARM64 and x64), macOS (ARM64 and x64), Windows (x64); Node.js 10.0.0 and higher | ||
@@ -149,3 +149,3 @@ ### Get | ||
| - Binding: [JNI](https://github.com/jni-rs/jni-rs) | ||
| - Platforms: Linux (ARM64 and x64), macOS (ARM64 and x64), Windows (x64); Java 7 and higher | ||
| - Platforms: Linux (ARM64 and x64), macOS (ARM64 and x64), Windows (x64); Java 8 and higher | ||
@@ -160,3 +160,3 @@ ### Get | ||
| <artifactId>minify-html</artifactId> | ||
| <version>0.16.4</version> | ||
| <version>0.18.1</version> | ||
| </dependency> | ||
@@ -188,3 +188,3 @@ ``` | ||
| - Binding: [PyO3](https://github.com/PyO3/pyo3) | ||
| - Platforms: Linux (ARM64 and x64), macOS (ARM64 and x64), Windows (x64); Python 3.8 to 3.13 | ||
| - Platforms: Linux (ARM64 and x64), macOS (ARM64 and x64), Windows (x64); Python 3.8 to 3.14 | ||
@@ -212,3 +212,3 @@ ### Get | ||
| - Binding: [rb-sys](https://github.com/oxidize-rb/rb-sys) and [magnus](https://github.com/matsadler/magnus) | ||
| - Platforms: Linux (ARM64 and x64), macOS (ARM64 and x64), Windows (x64); Ruby 2.7 to 3.4 | ||
| - Platforms: Linux (ARM64 and x64), macOS (ARM64 and x64), Windows (x64); Ruby 3.2 to 3.4 | ||
@@ -215,0 +215,0 @@ ### Get |
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
5520331
6.41%0
-100%133
-40.89%