@abecodes/hasher64 中文文档教程
hasher64
hasher64 是用于节点的简单 base64 编码器和解码器。 它适用于字符串和文件。 它没有依赖关系,可与节点本机 API 一起使用。
它是根据 UNLICENSE & 发布的。 支持现代环境。
Installation
使用 npm:
$ npm i -g @abecodes/hasher64
$ npm i --save @abecodes/hasher64
在 Node.js 中:
// Load the package.
const hasher = require("@abecodes/hasher64");
API
encode
hasher.encode(value: string) => base64 string
encode 方法将字符串作为参数并将其作为 base64 编码字符串返回。
decode
hasher.decode(base64 string) => string
decode 方法接受一个 base64 编码的字符串并返回它
atob
hasher.atob(data Buffer) => base64 string
的字符串值 atob 方法接受一个 Buffer 并将其作为 base64 编码
btoa
hasher.btoa(base64 string) => Buffer
的字符串返回 btoa 方法接受一个 base64 编码的 Buffer 并返回 Buffer
Greetings
愿你和我一样喜欢使用这个软件喜欢写它。 保持无错误,度过美好的一天 <3
hasher64
hasher64 is a simple base64 encoder and decoder for node. It works with strings as well as with files. It has no dependencies and works with nodes native APIs.
It is released under the UNLICENSE & supports modern environments.
Installation
Using npm:
$ npm i -g @abecodes/hasher64
$ npm i --save @abecodes/hasher64
In Node.js:
// Load the package.
const hasher = require("@abecodes/hasher64");
API
encode
hasher.encode(value: string) => base64 string
The encode method takes a string as paramter and returns it as base64 encoded string.
decode
hasher.decode(base64 string) => string
The decode method takes a base64 encoded string and returns it string value
atob
hasher.atob(data Buffer) => base64 string
The atob method takes a Buffer and returns it as base64 encoded string
btoa
hasher.btoa(base64 string) => Buffer
The btoa method takes a base64 encoded Buffer and returns the Buffer
Greetings
May you enjoy using this piece of software as much as I enjoyed writing it. Stay bug free and have an awesome day <3