From 535f5d981962fae0e20116962ee6e08656d62389 Mon Sep 17 00:00:00 2001 From: null8626 Date: Sat, 30 Mar 2024 14:09:56 +0700 Subject: [PATCH] 3.1.2 --- bindings/java/build.gradle | 8 +-- bindings/native/Cargo.toml | 2 +- bindings/node/Cargo.toml | 2 +- .../node/npm/android-arm-eabi/package.json | 4 +- bindings/node/npm/android-arm64/package.json | 4 +- bindings/node/npm/darwin-arm64/package.json | 4 +- bindings/node/npm/darwin-x64/package.json | 4 +- .../node/npm/linux-arm-gnueabihf/package.json | 4 +- .../node/npm/linux-arm64-gnu/package.json | 4 +- .../node/npm/linux-arm64-musl/package.json | 4 +- bindings/node/npm/linux-x64-gnu/package.json | 4 +- bindings/node/npm/linux-x64-musl/package.json | 4 +- .../node/npm/win32-arm64-msvc/package.json | 4 +- .../node/npm/win32-ia32-msvc/package.json | 4 +- bindings/node/npm/win32-x64-msvc/package.json | 4 +- bindings/node/package.json | 4 +- bindings/wasm/Cargo.toml | 2 +- bindings/wasm/bin/decancer.min.js | 2 +- core/Cargo.toml | 2 +- core/README.md | 66 +++++++++---------- core/src/bidi/paragraph.rs | 4 +- core/src/lib.rs | 1 - index.html | 2 +- 23 files changed, 71 insertions(+), 72 deletions(-) diff --git a/bindings/java/build.gradle b/bindings/java/build.gradle index 557f5525..4fb8674a 100644 --- a/bindings/java/build.gradle +++ b/bindings/java/build.gradle @@ -4,7 +4,7 @@ plugins { } group 'com.github.null8626' -version '3.1.1' +version '3.1.2' description 'A tiny package that removes common unicode confusables/homoglyphs from strings.' repositories { @@ -14,7 +14,7 @@ repositories { jar { archiveBaseName = 'decancer' - archiveVersion = '3.1.1' + archiveVersion = '3.1.2' from('./bin') { include '*.dll' @@ -28,7 +28,7 @@ publishing { mavenJava(MavenPublication) { groupId 'com.github.null8626' artifactId 'decancer' - version '3.1.1' + version '3.1.2' from components.java @@ -39,7 +39,7 @@ publishing { licenses { license { name = 'MIT License' - url = 'https://github.com/null8626/decancer/blob/v3.1.1/LICENSE' + url = 'https://github.com/null8626/decancer/blob/v3.1.2/LICENSE' } } diff --git a/bindings/native/Cargo.toml b/bindings/native/Cargo.toml index 2253daad..c7f0b19e 100644 --- a/bindings/native/Cargo.toml +++ b/bindings/native/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "decancer_native" -version = "3.1.1" +version = "3.1.2" edition = "2021" publish = false diff --git a/bindings/node/Cargo.toml b/bindings/node/Cargo.toml index 28dc930f..14785c3c 100644 --- a/bindings/node/Cargo.toml +++ b/bindings/node/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "decancer_node" -version = "3.1.1" +version = "3.1.2" edition = "2021" publish = false diff --git a/bindings/node/npm/android-arm-eabi/package.json b/bindings/node/npm/android-arm-eabi/package.json index 686e1296..34105a9c 100644 --- a/bindings/node/npm/android-arm-eabi/package.json +++ b/bindings/node/npm/android-arm-eabi/package.json @@ -1,6 +1,6 @@ { "name": "@vierofernando/decancer-android-arm-eabi", - "version": "3.1.1", + "version": "3.1.2", "os": [ "android" ], @@ -30,4 +30,4 @@ "sanitizer", "confusables" ] -} +} \ No newline at end of file diff --git a/bindings/node/npm/android-arm64/package.json b/bindings/node/npm/android-arm64/package.json index 0f2f0cf9..d25d4414 100644 --- a/bindings/node/npm/android-arm64/package.json +++ b/bindings/node/npm/android-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@vierofernando/decancer-android-arm64", - "version": "3.1.1", + "version": "3.1.2", "os": [ "android" ], @@ -30,4 +30,4 @@ "sanitizer", "confusables" ] -} +} \ No newline at end of file diff --git a/bindings/node/npm/darwin-arm64/package.json b/bindings/node/npm/darwin-arm64/package.json index 0610c49b..92171d18 100644 --- a/bindings/node/npm/darwin-arm64/package.json +++ b/bindings/node/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@vierofernando/decancer-darwin-arm64", - "version": "3.1.1", + "version": "3.1.2", "os": [ "darwin" ], @@ -30,4 +30,4 @@ "sanitizer", "confusables" ] -} +} \ No newline at end of file diff --git a/bindings/node/npm/darwin-x64/package.json b/bindings/node/npm/darwin-x64/package.json index 0b434be3..27e9f0fb 100644 --- a/bindings/node/npm/darwin-x64/package.json +++ b/bindings/node/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@vierofernando/decancer-darwin-x64", - "version": "3.1.1", + "version": "3.1.2", "os": [ "darwin" ], @@ -30,4 +30,4 @@ "sanitizer", "confusables" ] -} +} \ No newline at end of file diff --git a/bindings/node/npm/linux-arm-gnueabihf/package.json b/bindings/node/npm/linux-arm-gnueabihf/package.json index f46037d8..2a7cf54f 100644 --- a/bindings/node/npm/linux-arm-gnueabihf/package.json +++ b/bindings/node/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@vierofernando/decancer-linux-arm-gnueabihf", - "version": "3.1.1", + "version": "3.1.2", "os": [ "linux" ], @@ -30,4 +30,4 @@ "sanitizer", "confusables" ] -} +} \ No newline at end of file diff --git a/bindings/node/npm/linux-arm64-gnu/package.json b/bindings/node/npm/linux-arm64-gnu/package.json index 89e95072..02149006 100644 --- a/bindings/node/npm/linux-arm64-gnu/package.json +++ b/bindings/node/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@vierofernando/decancer-linux-arm64-gnu", - "version": "3.1.1", + "version": "3.1.2", "os": [ "linux" ], @@ -33,4 +33,4 @@ "sanitizer", "confusables" ] -} +} \ No newline at end of file diff --git a/bindings/node/npm/linux-arm64-musl/package.json b/bindings/node/npm/linux-arm64-musl/package.json index 32f676d9..805f2e80 100644 --- a/bindings/node/npm/linux-arm64-musl/package.json +++ b/bindings/node/npm/linux-arm64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@vierofernando/decancer-linux-arm64-musl", - "version": "3.1.1", + "version": "3.1.2", "os": [ "linux" ], @@ -33,4 +33,4 @@ "sanitizer", "confusables" ] -} +} \ No newline at end of file diff --git a/bindings/node/npm/linux-x64-gnu/package.json b/bindings/node/npm/linux-x64-gnu/package.json index 13908bcd..488bb4ec 100644 --- a/bindings/node/npm/linux-x64-gnu/package.json +++ b/bindings/node/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@vierofernando/decancer-linux-x64-gnu", - "version": "3.1.1", + "version": "3.1.2", "os": [ "linux" ], @@ -33,4 +33,4 @@ "sanitizer", "confusables" ] -} +} \ No newline at end of file diff --git a/bindings/node/npm/linux-x64-musl/package.json b/bindings/node/npm/linux-x64-musl/package.json index 11f622cd..872af3fd 100644 --- a/bindings/node/npm/linux-x64-musl/package.json +++ b/bindings/node/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@vierofernando/decancer-linux-x64-musl", - "version": "3.1.1", + "version": "3.1.2", "os": [ "linux" ], @@ -33,4 +33,4 @@ "sanitizer", "confusables" ] -} +} \ No newline at end of file diff --git a/bindings/node/npm/win32-arm64-msvc/package.json b/bindings/node/npm/win32-arm64-msvc/package.json index 4bcb27dc..12a2cc00 100644 --- a/bindings/node/npm/win32-arm64-msvc/package.json +++ b/bindings/node/npm/win32-arm64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@vierofernando/decancer-win32-arm64-msvc", - "version": "3.1.1", + "version": "3.1.2", "os": [ "win32" ], @@ -30,4 +30,4 @@ "sanitizer", "confusables" ] -} +} \ No newline at end of file diff --git a/bindings/node/npm/win32-ia32-msvc/package.json b/bindings/node/npm/win32-ia32-msvc/package.json index 7c41c2db..383cb8a6 100644 --- a/bindings/node/npm/win32-ia32-msvc/package.json +++ b/bindings/node/npm/win32-ia32-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@vierofernando/decancer-win32-ia32-msvc", - "version": "3.1.1", + "version": "3.1.2", "os": [ "win32" ], @@ -30,4 +30,4 @@ "sanitizer", "confusables" ] -} +} \ No newline at end of file diff --git a/bindings/node/npm/win32-x64-msvc/package.json b/bindings/node/npm/win32-x64-msvc/package.json index ce2ffd1a..4259ba6f 100644 --- a/bindings/node/npm/win32-x64-msvc/package.json +++ b/bindings/node/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@vierofernando/decancer-win32-x64-msvc", - "version": "3.1.1", + "version": "3.1.2", "os": [ "win32" ], @@ -30,4 +30,4 @@ "sanitizer", "confusables" ] -} +} \ No newline at end of file diff --git a/bindings/node/package.json b/bindings/node/package.json index d0185be6..6ef93055 100644 --- a/bindings/node/package.json +++ b/bindings/node/package.json @@ -1,6 +1,6 @@ { "name": "decancer", - "version": "3.1.1", + "version": "3.1.2", "description": "A tiny package that removes common unicode confusables/homoglyphs from strings.", "author": "null8626", "keywords": [ @@ -54,4 +54,4 @@ ] } } -} +} \ No newline at end of file diff --git a/bindings/wasm/Cargo.toml b/bindings/wasm/Cargo.toml index e40b1d9c..5b2eb4a9 100644 --- a/bindings/wasm/Cargo.toml +++ b/bindings/wasm/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "decancer_wasm" -version = "3.1.1" +version = "3.1.2" edition = "2021" publish = false diff --git a/bindings/wasm/bin/decancer.min.js b/bindings/wasm/bin/decancer.min.js index 8c8e4d64..218793e3 100644 --- a/bindings/wasm/bin/decancer.min.js +++ b/bindings/wasm/bin/decancer.min.js @@ -1 +1 @@ -let wasm,output;const cachedTextDecoder="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&cachedTextDecoder.decode();let cachedUint8Memory0=null;function getUint8Memory0(){return null!==cachedUint8Memory0&&0!==cachedUint8Memory0.byteLength||(cachedUint8Memory0=new Uint8Array(wasm.memory.buffer)),cachedUint8Memory0}function getStringFromWasm0(e,t){return e>>>=0,cachedTextDecoder.decode(getUint8Memory0().subarray(e,e+t))}const heap=new Array(128).fill(void 0);heap.push(void 0,null,!0,!1);let heap_next=heap.length;function addHeapObject(e){heap_next===heap.length&&heap.push(heap.length+1);const t=heap_next;return heap_next=heap[t],heap[t]=e,t}let WASM_VECTOR_LEN=0;const cachedTextEncoder="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},encodeString="function"==typeof cachedTextEncoder.encodeInto?function(e,t){return cachedTextEncoder.encodeInto(e,t)}:function(e,t){const n=cachedTextEncoder.encode(e);return t.set(n),{read:e.length,written:n.length}};function passStringToWasm0(e,t,n){if(void 0===n){const n=cachedTextEncoder.encode(e),r=t(n.length,1)>>>0;return getUint8Memory0().subarray(r,r+n.length).set(n),WASM_VECTOR_LEN=n.length,r}let r=e.length,a=t(r,1)>>>0;const _=getUint8Memory0();let i=0;for(;i127)break;_[a+i]=t}if(i!==r){0!==i&&(e=e.slice(i)),a=n(a,r,r=i+3*e.length,1)>>>0;const t=getUint8Memory0().subarray(a+i,a+r);i+=encodeString(e,t).written}return WASM_VECTOR_LEN=i,a}let cachedInt32Memory0=null;function getInt32Memory0(){return null!==cachedInt32Memory0&&0!==cachedInt32Memory0.byteLength||(cachedInt32Memory0=new Int32Array(wasm.memory.buffer)),cachedInt32Memory0}let cachedUint32Memory0=null;function getUint32Memory0(){return null!==cachedUint32Memory0&&0!==cachedUint32Memory0.byteLength||(cachedUint32Memory0=new Uint32Array(wasm.memory.buffer)),cachedUint32Memory0}function dropObject(e){e<132||(heap[e]=heap_next,heap_next=e)}function takeObject(e){const t=heap[e];return dropObject(e),t}function getArrayJsValueFromWasm0(e,t){e>>>=0;const n=getUint32Memory0().subarray(e/4,e/4+t),r=[];for(let e=0;e>>0,r=getUint32Memory0();for(let t=0;t=1114112||e>=55296&&e<57344))throw new Error(`expected a valid Unicode scalar value, found ${e}`)}const OPTIONS={k:["retainCapitalization","disableBidi","retainDiacritics","retainGreek","retainCyrillic","retainHebrew","retainArabic","retainDevanagari","retainBengali","retainArmenian","retainGujarati","retainTamil","retainThai","retainLao","retainBurmese","retainKhmer","retainMongolian","retainChinese","retainJapanese","retainKorean","retainBraille","retainEmojis"],o:{pureHomoglyph:2097148}};function options(e){e||(e={});let t=0;for(let n=0;n{},unregister:()=>{}}:new FinalizationRegistry((e=>wasm.__wbg_curedstring_free(e>>>0)));export class CuredString{static __wrap(e){e>>>=0;const t=Object.create(CuredString.prototype);return t.__wbg_ptr=e,CuredStringFinalization.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,CuredStringFinalization.unregister(this),e}free(){const e=this.__destroy_into_raw();wasm.__wbg_curedstring_free(e)}find(e){try{const a=wasm.__wbindgen_add_to_stack_pointer(-16),_=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),i=WASM_VECTOR_LEN;wasm.curedstring_find(a,this.__wbg_ptr,_,i);var t=getInt32Memory0()[a/4+0],n=getInt32Memory0()[a/4+1],r=getArrayJsValueFromWasm0(t,n).slice();return wasm.__wbindgen_free(t,4*n,4),r}finally{wasm.__wbindgen_add_to_stack_pointer(16)}}findMultiple(e){try{const a=wasm.__wbindgen_add_to_stack_pointer(-16),_=passArrayJsValueToWasm0(e,wasm.__wbindgen_malloc),i=WASM_VECTOR_LEN;wasm.curedstring_findMultiple(a,this.__wbg_ptr,_,i);var t=getInt32Memory0()[a/4+0],n=getInt32Memory0()[a/4+1],r=getArrayJsValueFromWasm0(t,n).slice();return wasm.__wbindgen_free(t,4*n,4),r}finally{wasm.__wbindgen_add_to_stack_pointer(16)}}censor(e,t){const n=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),r=WASM_VECTOR_LEN,a=t.codePointAt(0);_assertChar(a),wasm.curedstring_censor(this.__wbg_ptr,n,r,a)}censorMultiple(e,t){const n=passArrayJsValueToWasm0(e,wasm.__wbindgen_malloc),r=WASM_VECTOR_LEN,a=t.codePointAt(0);_assertChar(a),wasm.curedstring_censorMultiple(this.__wbg_ptr,n,r,a)}replace(e,t){const n=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),r=WASM_VECTOR_LEN,a=passStringToWasm0(t,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),_=WASM_VECTOR_LEN;wasm.curedstring_replace(this.__wbg_ptr,n,r,a,_)}replaceMultiple(e,t){const n=passArrayJsValueToWasm0(e,wasm.__wbindgen_malloc),r=WASM_VECTOR_LEN,a=passStringToWasm0(t,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),_=WASM_VECTOR_LEN;wasm.curedstring_replaceMultiple(this.__wbg_ptr,n,r,a,_)}startsWith(e){const t=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),n=WASM_VECTOR_LEN;return 0!==wasm.curedstring_startsWith(this.__wbg_ptr,t,n)}endsWith(e){const t=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),n=WASM_VECTOR_LEN;return 0!==wasm.curedstring_endsWith(this.__wbg_ptr,t,n)}contains(e){const t=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),n=WASM_VECTOR_LEN;return 0!==wasm.curedstring_contains(this.__wbg_ptr,t,n)}equals(e){const t=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),n=WASM_VECTOR_LEN;return 0!==wasm.curedstring_equals(this.__wbg_ptr,t,n)}toString(){let e,t;try{const a=wasm.__wbindgen_add_to_stack_pointer(-16);wasm.curedstring_toString(a,this.__wbg_ptr);var n=getInt32Memory0()[a/4+0],r=getInt32Memory0()[a/4+1];return e=n,t=r,getStringFromWasm0(n,r)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_free(e,t,1)}}}const MatchFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>wasm.__wbg_match_free(e>>>0)));export class Match{static __wrap(e){e>>>=0;const t=Object.create(Match.prototype);return t.__wbg_ptr=e,MatchFinalization.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,MatchFinalization.unregister(this),e}free(){const e=this.__destroy_into_raw();wasm.__wbg_match_free(e)}get start(){return wasm.__wbg_get_match_start(this.__wbg_ptr)>>>0}get end(){return wasm.__wbg_get_match_end(this.__wbg_ptr)>>>0}toString(){let e,t;try{const a=wasm.__wbindgen_add_to_stack_pointer(-16);wasm.match_toString(a,this.__wbg_ptr);var n=getInt32Memory0()[a/4+0],r=getInt32Memory0()[a/4+1];return e=n,t=r,getStringFromWasm0(n,r)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_free(e,t,1)}}}async function __wbg_load(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function __wbg_get_imports(){return{wbg:{__wbindgen_error_new:function(e,t){return addHeapObject(new Error(getStringFromWasm0(e,t)))},__wbindgen_throw:function(e,t){throw new Error(getStringFromWasm0(e,t))},__wbg_match_new:function(e){return addHeapObject(Match.__wrap(e))},__wbindgen_string_get:function(e,t){const n=heap[t],r="string"==typeof n?n:void 0;var a=null==r?0:passStringToWasm0(r,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),_=WASM_VECTOR_LEN;getInt32Memory0()[e/4+1]=_,getInt32Memory0()[e/4+0]=a},__wbindgen_object_drop_ref:function(e){takeObject(e)}}}}function __wbg_finalize_init(e,t){return wasm=e.exports,cachedInt32Memory0=null,cachedUint32Memory0=null,cachedUint8Memory0=null,output=Object.assign(cure,{format:format,options:options}),output}export default async function init({local:e}){if(void 0!==wasm)return output;const t=__wbg_get_imports(),n=fetch(e?new URL("decancer.wasm",import.meta.url):"https://cdn.jsdelivr.net/gh/null8626/decancer@v3.1.1/bindings/wasm/bin/decancer.wasm"),{instance:r,module:a}=await __wbg_load(await n,t);return __wbg_finalize_init(r,a)} \ No newline at end of file +let wasm,output;const cachedTextDecoder="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&cachedTextDecoder.decode();let cachedUint8Memory0=null;function getUint8Memory0(){return null!==cachedUint8Memory0&&0!==cachedUint8Memory0.byteLength||(cachedUint8Memory0=new Uint8Array(wasm.memory.buffer)),cachedUint8Memory0}function getStringFromWasm0(e,t){return e>>>=0,cachedTextDecoder.decode(getUint8Memory0().subarray(e,e+t))}const heap=new Array(128).fill(void 0);heap.push(void 0,null,!0,!1);let heap_next=heap.length;function addHeapObject(e){heap_next===heap.length&&heap.push(heap.length+1);const t=heap_next;return heap_next=heap[t],heap[t]=e,t}let WASM_VECTOR_LEN=0;const cachedTextEncoder="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},encodeString="function"==typeof cachedTextEncoder.encodeInto?function(e,t){return cachedTextEncoder.encodeInto(e,t)}:function(e,t){const n=cachedTextEncoder.encode(e);return t.set(n),{read:e.length,written:n.length}};function passStringToWasm0(e,t,n){if(void 0===n){const n=cachedTextEncoder.encode(e),r=t(n.length,1)>>>0;return getUint8Memory0().subarray(r,r+n.length).set(n),WASM_VECTOR_LEN=n.length,r}let r=e.length,a=t(r,1)>>>0;const _=getUint8Memory0();let i=0;for(;i127)break;_[a+i]=t}if(i!==r){0!==i&&(e=e.slice(i)),a=n(a,r,r=i+3*e.length,1)>>>0;const t=getUint8Memory0().subarray(a+i,a+r);i+=encodeString(e,t).written}return WASM_VECTOR_LEN=i,a}let cachedInt32Memory0=null;function getInt32Memory0(){return null!==cachedInt32Memory0&&0!==cachedInt32Memory0.byteLength||(cachedInt32Memory0=new Int32Array(wasm.memory.buffer)),cachedInt32Memory0}let cachedUint32Memory0=null;function getUint32Memory0(){return null!==cachedUint32Memory0&&0!==cachedUint32Memory0.byteLength||(cachedUint32Memory0=new Uint32Array(wasm.memory.buffer)),cachedUint32Memory0}function dropObject(e){e<132||(heap[e]=heap_next,heap_next=e)}function takeObject(e){const t=heap[e];return dropObject(e),t}function getArrayJsValueFromWasm0(e,t){e>>>=0;const n=getUint32Memory0().subarray(e/4,e/4+t),r=[];for(let e=0;e>>0,r=getUint32Memory0();for(let t=0;t=1114112||e>=55296&&e<57344))throw new Error(`expected a valid Unicode scalar value, found ${e}`)}const OPTIONS={k:["retainCapitalization","disableBidi","retainDiacritics","retainGreek","retainCyrillic","retainHebrew","retainArabic","retainDevanagari","retainBengali","retainArmenian","retainGujarati","retainTamil","retainThai","retainLao","retainBurmese","retainKhmer","retainMongolian","retainChinese","retainJapanese","retainKorean","retainBraille","retainEmojis"],o:{pureHomoglyph:2097148}};function options(e){e||(e={});let t=0;for(let n=0;n{},unregister:()=>{}}:new FinalizationRegistry((e=>wasm.__wbg_curedstring_free(e>>>0)));export class CuredString{static __wrap(e){e>>>=0;const t=Object.create(CuredString.prototype);return t.__wbg_ptr=e,CuredStringFinalization.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,CuredStringFinalization.unregister(this),e}free(){const e=this.__destroy_into_raw();wasm.__wbg_curedstring_free(e)}find(e){try{const a=wasm.__wbindgen_add_to_stack_pointer(-16),_=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),i=WASM_VECTOR_LEN;wasm.curedstring_find(a,this.__wbg_ptr,_,i);var t=getInt32Memory0()[a/4+0],n=getInt32Memory0()[a/4+1],r=getArrayJsValueFromWasm0(t,n).slice();return wasm.__wbindgen_free(t,4*n,4),r}finally{wasm.__wbindgen_add_to_stack_pointer(16)}}findMultiple(e){try{const a=wasm.__wbindgen_add_to_stack_pointer(-16),_=passArrayJsValueToWasm0(e,wasm.__wbindgen_malloc),i=WASM_VECTOR_LEN;wasm.curedstring_findMultiple(a,this.__wbg_ptr,_,i);var t=getInt32Memory0()[a/4+0],n=getInt32Memory0()[a/4+1],r=getArrayJsValueFromWasm0(t,n).slice();return wasm.__wbindgen_free(t,4*n,4),r}finally{wasm.__wbindgen_add_to_stack_pointer(16)}}censor(e,t){const n=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),r=WASM_VECTOR_LEN,a=t.codePointAt(0);_assertChar(a),wasm.curedstring_censor(this.__wbg_ptr,n,r,a)}censorMultiple(e,t){const n=passArrayJsValueToWasm0(e,wasm.__wbindgen_malloc),r=WASM_VECTOR_LEN,a=t.codePointAt(0);_assertChar(a),wasm.curedstring_censorMultiple(this.__wbg_ptr,n,r,a)}replace(e,t){const n=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),r=WASM_VECTOR_LEN,a=passStringToWasm0(t,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),_=WASM_VECTOR_LEN;wasm.curedstring_replace(this.__wbg_ptr,n,r,a,_)}replaceMultiple(e,t){const n=passArrayJsValueToWasm0(e,wasm.__wbindgen_malloc),r=WASM_VECTOR_LEN,a=passStringToWasm0(t,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),_=WASM_VECTOR_LEN;wasm.curedstring_replaceMultiple(this.__wbg_ptr,n,r,a,_)}startsWith(e){const t=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),n=WASM_VECTOR_LEN;return 0!==wasm.curedstring_startsWith(this.__wbg_ptr,t,n)}endsWith(e){const t=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),n=WASM_VECTOR_LEN;return 0!==wasm.curedstring_endsWith(this.__wbg_ptr,t,n)}contains(e){const t=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),n=WASM_VECTOR_LEN;return 0!==wasm.curedstring_contains(this.__wbg_ptr,t,n)}equals(e){const t=passStringToWasm0(e,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),n=WASM_VECTOR_LEN;return 0!==wasm.curedstring_equals(this.__wbg_ptr,t,n)}toString(){let e,t;try{const a=wasm.__wbindgen_add_to_stack_pointer(-16);wasm.curedstring_toString(a,this.__wbg_ptr);var n=getInt32Memory0()[a/4+0],r=getInt32Memory0()[a/4+1];return e=n,t=r,getStringFromWasm0(n,r)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_free(e,t,1)}}}const MatchFinalization="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry((e=>wasm.__wbg_match_free(e>>>0)));export class Match{static __wrap(e){e>>>=0;const t=Object.create(Match.prototype);return t.__wbg_ptr=e,MatchFinalization.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,MatchFinalization.unregister(this),e}free(){const e=this.__destroy_into_raw();wasm.__wbg_match_free(e)}get start(){return wasm.__wbg_get_match_start(this.__wbg_ptr)>>>0}get end(){return wasm.__wbg_get_match_end(this.__wbg_ptr)>>>0}toString(){let e,t;try{const a=wasm.__wbindgen_add_to_stack_pointer(-16);wasm.match_toString(a,this.__wbg_ptr);var n=getInt32Memory0()[a/4+0],r=getInt32Memory0()[a/4+1];return e=n,t=r,getStringFromWasm0(n,r)}finally{wasm.__wbindgen_add_to_stack_pointer(16),wasm.__wbindgen_free(e,t,1)}}}async function __wbg_load(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function __wbg_get_imports(){return{wbg:{__wbindgen_error_new:function(e,t){return addHeapObject(new Error(getStringFromWasm0(e,t)))},__wbindgen_throw:function(e,t){throw new Error(getStringFromWasm0(e,t))},__wbg_match_new:function(e){return addHeapObject(Match.__wrap(e))},__wbindgen_string_get:function(e,t){const n=heap[t],r="string"==typeof n?n:void 0;var a=null==r?0:passStringToWasm0(r,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),_=WASM_VECTOR_LEN;getInt32Memory0()[e/4+1]=_,getInt32Memory0()[e/4+0]=a},__wbindgen_object_drop_ref:function(e){takeObject(e)}}}}function __wbg_finalize_init(e,t){return wasm=e.exports,cachedInt32Memory0=null,cachedUint32Memory0=null,cachedUint8Memory0=null,output=Object.assign(cure,{format:format,options:options}),output}export default async function init({local:e}){if(void 0!==wasm)return output;const t=__wbg_get_imports(),n=fetch(e?new URL("decancer.wasm",import.meta.url):"https://cdn.jsdelivr.net/gh/null8626/decancer@v3.1.2/bindings/wasm/bin/decancer.wasm"),{instance:r,module:a}=await __wbg_load(await n,t);return __wbg_finalize_init(r,a)} \ No newline at end of file diff --git a/core/Cargo.toml b/core/Cargo.toml index 2022ba0b..ac9faa8f 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "decancer" -version = "3.1.1" +version = "3.1.2" edition = "2021" authors = ["null (https://github.com/null8626)"] description = "A tiny package that removes common unicode confusables/homoglyphs from strings." diff --git a/core/README.md b/core/README.md index 5cac8cd9..a54d25a7 100644 --- a/core/README.md +++ b/core/README.md @@ -35,7 +35,7 @@ A tiny package that removes common unicode confusables/homoglyphs from strings. In your `Cargo.toml`: ```toml -decancer = "3.1.1" +decancer = "3.1.2" ``` @@ -68,7 +68,7 @@ In your code: ```html @@ -89,7 +89,7 @@ repositories { } dependencies { - implementation 'com.github.null8626:decancer:v3.1.1' + implementation 'com.github.null8626:decancer:v3.1.2' } ``` @@ -111,7 +111,7 @@ In your `pom.xml`: com.github.null8626 decancer - v3.1.1 + v3.1.2 ``` @@ -131,34 +131,34 @@ $ ./gradlew build --warning-mode all ### Download -- [Download for ARM64 macOS (11.0+, Big Sur+)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-aarch64-apple-darwin.zip) -- [Download for ARM64 iOS](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-aarch64-apple-ios.zip) -- [Download for Apple iOS Simulator on ARM6](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-aarch64-apple-ios-sim.zip) -- [Download for ARM64 Android](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-aarch64-linux-android.zip) -- [Download for ARM64 Windows MSVC](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-aarch64-pc-windows-msvc.zip) -- [Download for ARM64 Linux (kernel 4.1, glibc 2.17+)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-aarch64-unknown-linux-gnu.zip) -- [Download for ARM64 Linux with MUSL](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-aarch64-unknown-linux-musl.zip) -- [Download for ARMv6 Linux (kernel 3.2, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-arm-unknown-linux-gnueabi.zip) -- [Download for ARMv5TE Linux (kernel 4.4, glibc 2.23)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-armv5te-unknown-linux-gnueabi.zip) -- [Download for ARMv7-A Android](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-armv7-linux-androideabi.zip) -- [Download for ARMv7-A Linux (kernel 4.15, glibc 2.27)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-armv7-unknown-linux-gnueabi.zip) -- [Download for ARMv7-A Linux, hardfloat (kernel 3.2, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-armv7-unknown-linux-gnueabihf.zip) -- [Download for 32-bit Linux w/o SSE (kernel 3.2, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-i586-unknown-linux-gnu.zip) -- [Download for 32-bit MSVC (Windows 7+)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-i686-pc-windows-msvc.zip) -- [Download for 32-bit FreeBSD](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-i686-unknown-freebsd.zip) -- [Download for 32-bit Linux (kernel 3.2+, glibc 2.17+)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-i686-unknown-linux-gnu.zip) -- [Download for PPC64LE Linux (kernel 3.10, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-powerpc64le-unknown-linux-gnu.zip) -- [Download for RISC-V Linux (kernel 4.20, glibc 2.29)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-riscv64gc-unknown-linux-gnu.zip) -- [Download for S390x Linux (kernel 3.2, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-s390x-unknown-linux-gnu.zip) -- [Download for SPARC Solaris 11, illumos](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-sparcv9-sun-solaris.zip) -- [Download for Thumb2-mode ARMv7-A Linux with NEON (kernel 4.4, glibc 2.23)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-thumbv7neon-unknown-linux-gnueabihf.zip) -- [Download for 64-bit macOS (10.12+, Sierra+)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-x86_64-apple-darwin.zip) -- [Download for 64-bit iOS](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-x86_64-apple-ios.zip) -- [Download for 64-bit MSVC (Windows 7+)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-x86_64-pc-windows-msvc.zip) -- [Download for 64-bit FreeBSD](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-x86_64-unknown-freebsd.zip) -- [Download for 64-bit illumos](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-x86_64-unknown-illumos.zip) -- [Download for 64-bit Linux (kernel 3.2+, glibc 2.17+)](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-x86_64-unknown-linux-gnu.zip) -- [Download for 64-bit Linux with MUSL](https://github.com/null8626/decancer/releases/download/v3.1.1/decancer-x86_64-unknown-linux-musl.zip) +- [Download for ARM64 macOS (11.0+, Big Sur+)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-aarch64-apple-darwin.zip) +- [Download for ARM64 iOS](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-aarch64-apple-ios.zip) +- [Download for Apple iOS Simulator on ARM6](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-aarch64-apple-ios-sim.zip) +- [Download for ARM64 Android](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-aarch64-linux-android.zip) +- [Download for ARM64 Windows MSVC](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-aarch64-pc-windows-msvc.zip) +- [Download for ARM64 Linux (kernel 4.1, glibc 2.17+)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-aarch64-unknown-linux-gnu.zip) +- [Download for ARM64 Linux with MUSL](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-aarch64-unknown-linux-musl.zip) +- [Download for ARMv6 Linux (kernel 3.2, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-arm-unknown-linux-gnueabi.zip) +- [Download for ARMv5TE Linux (kernel 4.4, glibc 2.23)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-armv5te-unknown-linux-gnueabi.zip) +- [Download for ARMv7-A Android](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-armv7-linux-androideabi.zip) +- [Download for ARMv7-A Linux (kernel 4.15, glibc 2.27)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-armv7-unknown-linux-gnueabi.zip) +- [Download for ARMv7-A Linux, hardfloat (kernel 3.2, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-armv7-unknown-linux-gnueabihf.zip) +- [Download for 32-bit Linux w/o SSE (kernel 3.2, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-i586-unknown-linux-gnu.zip) +- [Download for 32-bit MSVC (Windows 7+)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-i686-pc-windows-msvc.zip) +- [Download for 32-bit FreeBSD](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-i686-unknown-freebsd.zip) +- [Download for 32-bit Linux (kernel 3.2+, glibc 2.17+)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-i686-unknown-linux-gnu.zip) +- [Download for PPC64LE Linux (kernel 3.10, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-powerpc64le-unknown-linux-gnu.zip) +- [Download for RISC-V Linux (kernel 4.20, glibc 2.29)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-riscv64gc-unknown-linux-gnu.zip) +- [Download for S390x Linux (kernel 3.2, glibc 2.17)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-s390x-unknown-linux-gnu.zip) +- [Download for SPARC Solaris 11, illumos](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-sparcv9-sun-solaris.zip) +- [Download for Thumb2-mode ARMv7-A Linux with NEON (kernel 4.4, glibc 2.23)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-thumbv7neon-unknown-linux-gnueabihf.zip) +- [Download for 64-bit macOS (10.12+, Sierra+)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-x86_64-apple-darwin.zip) +- [Download for 64-bit iOS](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-x86_64-apple-ios.zip) +- [Download for 64-bit MSVC (Windows 7+)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-x86_64-pc-windows-msvc.zip) +- [Download for 64-bit FreeBSD](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-x86_64-unknown-freebsd.zip) +- [Download for 64-bit illumos](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-x86_64-unknown-illumos.zip) +- [Download for 64-bit Linux (kernel 3.2+, glibc 2.17+)](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-x86_64-unknown-linux-gnu.zip) +- [Download for 64-bit Linux with MUSL](https://github.com/null8626/decancer/releases/download/v3.1.2/decancer-x86_64-unknown-linux-musl.zip) ### Building from source @@ -241,7 +241,7 @@ console.log(cured.toString()) // ---- ***** ----