-
The buffer-based encoding utility method for node.js.
Following types of encodings are supported:
Name Description Binary-Safe base64
The standard BASE64 encoding. Yes base64url
The URL-safe BASE64 encoding. Yes base62x
The BASE62x encoding. Yes base32
The standard BASE32 encoding. Yes hex
The hexadecimal encoding. Yes urlencode
The purely URL-safe encoding. Yes strict_uri
The extended URL-safe encoding. No Encoding
urlencode
This is a real urlencode implement, it will escape all bytes as
%xx
format, exceptingA-Z
,a-z
and0-9
. This is a binary-safe encoding.Binary-safe means it could work with binary data perfectly, without gibberish. And it’s all the same below.
Encoding
uri
This is a simple reference of method
encodeURIComponent
, so it works as methodencodeURIComponent
does. And it’s not a binary-safe encoding.Encoding
strict_uri
This is based on
uri
, but all special chars including"-"
,"."
,"_"
,"!"
,"*"
,"("
,")"
,"~"
,"'"
will be escaped. However, it’s still not a binary-safe encoding.NOTE: The data of
strict_uri
encoding, could be simply decoded by functiondecodeURIComponent
.Encoding
base64url
This is based on
base64
, while charactors"="
,"+"
,"/"
will be replaced with URL-safe charactors. This is a binary-safe encoding.Encoding
base62x
This is a variation of
base64
. And it is a binary-safe encoding.Installation
1npm install @litert/encodings@^2.2.0
Read More -
@litert/uuid
is a UUID library developed entirely in TypeScript, providing the following three UUID generation algorithms:-
Snowflake: Twitter’s snowflake algorithm, supports distributed environments.
-
Snowflake-SI (Safe Integer): A safe integer version of the snowflake algorithm for JavaScript.
-
Snowflake-SI-vA: A variant of the Snowflake-SI algorithm.
安装
1npm install @litert/uuid@^1.0.0
Read More -
-
This is a library for verifying the password hash values of WordPress users in Node.js, generally used for integrating WordPress or migrating from WordPress.
Read More