3.2.8 β’ Published 9 months ago
@vierofernando/decancer-linux-arm64-musl v3.2.8
decancer

A library that removes common unicode confusables/homoglyphs from strings.
- Its core is written in Rust and utilizes a form of Binary Search to ensure speed!
- By default, it's capable of filtering 221,529 (19.88%) different unicode codepoints like:
- All whitespace characters
- All diacritics, this also eliminates all forms of Zalgo text
- Most leetspeak characters
- Most homoglyphs
- Several emojis
- Unlike other packages, this package is unicode bidi-aware where it also interprets right-to-left characters in the same way as it were to be rendered by an application!
- Its behavior is also highly customizable to your liking!
Installation
In your shell:
npm install decancer
In your code (CommonJS):
const decancer = require('decancer')
In your code (ESM):
import decancer from 'decancer'
Examples
const assert = require('assert')
const cured = decancer('vοΌ₯β‘π π½πΕβο½ Ε£δΉππ£ wWiIiIIttHh l133t5p3/-\\|<')
assert(cured.equals('very funny text with leetspeak'))
// WARNING: it's NOT recommended to coerce this output to a JavaScript string
// and process it manually from there, as decancer has its own
// custom comparison measures, including leetspeak matching!
assert(cured.toString() !== 'very funny text with leetspeak')
console.log(cured.toString())
// => very funny text wwiiiiitthh l133t5p3/-\|<
assert(cured.contains('funny'))
cured.censor('funny', '*')
console.log(cured.toString())
// => very ***** text wwiiiiitthh l133t5p3/-\|<
cured.censorMultiple(['very', 'text'], '-')
console.log(cured.toString())
// => ---- ***** ---- wwiiiiitthh l133t5p3/-\|<
Donations
If you want to support my eyes for manually looking at thousands of unicode characters, consider donating! β€
3.2.8
9 months ago
3.2.6
9 months ago
3.2.5
9 months ago
3.2.4
11 months ago
3.2.2
1 year ago
3.2.1
1 year ago
3.2.3
1 year ago
3.2.0
1 year ago
3.1.2
1 year ago
3.1.1
1 year ago
3.1.0
1 year ago
3.0.2
1 year ago
3.0.1
1 year ago
3.0.0
1 year ago
2.0.2
1 year ago
2.0.1
1 year ago
2.0.0
1 year ago
1.6.4
2 years ago
1.6.3
2 years ago
1.6.5
2 years ago
1.6.2
2 years ago
1.6.1
2 years ago
1.5.5
2 years ago
1.6.0
2 years ago
1.5.4
2 years ago
1.5.3
2 years ago
1.5.2
3 years ago
1.5.1
3 years ago
1.3.3
3 years ago
1.4.1
3 years ago
1.4.0
3 years ago
1.3.2
3 years ago
1.3.1
3 years ago
1.2.3
3 years ago
1.2.2
3 years ago
1.1.9
3 years ago
1.1.8
3 years ago
1.1.7
3 years ago
1.1.6
3 years ago
1.1.5
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.1
3 years ago