
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
sanitize-base32
Advanced tools
Base-32 strings only allow capital alphabets (A-Z), integers (2-7) and padding using equals sign (=). This library can be used to sanitize an encoded base32 string to ensure that it can be safely decoded.
Base-32 strings only allow capital alphabets (A-Z), integers (2-7) and padding using equals sign (=). This library can be used to sanitize an encoded base32 string to ensure that it can be safely decoded.
The default implementation strips all unsupported characters (including whitespace) and uses alias toreplace ambigious characters. This behaviour is configurable.
npm i sanitize-base32
import {sanitize} from 'sanitize-base32'
console.log(sanitize('AABA CDEF GGHU QQRL'))
// => AABA CDEF GGHU QQRL
Takes an optional options argument and returns a sanitized base-32 string.
By default, when an invalid character is found, the sanitizer simply ignores it from the result. Setting this to false will raise an error instead.
Specify the aliases to use for ambigous unsupported characters. Alias checks are only performed for unsupported characters. If the character is a valid base-32 character, it is given preference over alias.
To turn of aliases pass null. The aliases object must be a flat object mapping
single character to a single character.
Base-32 strings are padded using = sign to allow assumptions about the size
of the string. But that is not required for all use cases. By default, the
sanitizer removes the padding. Set to false to preserve padding.
MIT © Siddharth Doshi
FAQs
Base-32 strings only allow capital alphabets (A-Z), integers (2-7) and padding using equals sign (=). This library can be used to sanitize an encoded base32 string to ensure that it can be safely decoded.
We found that sanitize-base32 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.