Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manyuanrong/bytes_formater
Formatting bytes(Uint8Array、Uint16Array、Uint32Array、ArrayBufferView..) output, is very useful when debugging IO functions
https://github.com/manyuanrong/bytes_formater
Last synced: about 2 months ago
JSON representation
Formatting bytes(Uint8Array、Uint16Array、Uint32Array、ArrayBufferView..) output, is very useful when debugging IO functions
- Host: GitHub
- URL: https://github.com/manyuanrong/bytes_formater
- Owner: manyuanrong
- License: mit
- Created: 2019-02-24T06:32:53.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-10T02:13:03.000Z (about 4 years ago)
- Last Synced: 2024-10-04T16:41:28.678Z (2 months ago)
- Language: TypeScript
- Size: 38.1 KB
- Stars: 8
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-deno-cn - @manyuanrong/bytes_formater
- awesome-deno - bytes_formater - Format bytes (Uint8Array, ArrayBufferView, etc) output, useful when debugging IO functions. ![GitHub stars](https://img.shields.io/github/stars/manyuanrong/bytes_formater?style=plastic&logoWidth=1) (Modules / Online Playgrounds)
- awesome-deno - bytes_formater - Format bytes (Uint8Array, ArrayBufferView, etc) output, useful when debugging IO functions. (Modules / Utils)
- awesome-deno - bytes_formater - 格式化字节(Uint8Array,ArrayBufferView ...)输出,在调试IO功能时很有用。 (Uncategorized / Uncategorized)
README
## Deno Bytes Formater
Formatting bytes(Uint8Array、Uint16Array、Uint32Array、ArrayBufferView..) output, is very useful when debugging IO functions
### Example
#### code
```ts
import { format, setColorEnabled } from "https://deno.land/x/[email protected]/mod.ts";const bytes = new Uint8Array([
10, 53, 46, 54, 46, 51, 52, 0, 71, 241, 0, 59, 77, 99, 52, 49, 65, 107,
77, 69, 0, 223, 247, 45, 2, 0, 111, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
54, 55, 82, 85, 121, 100, 65, 41, 47, 99, 80, 41, 0, 109, 121, 115, 113,
108, 95, 110, 97, 116, 105, 118, 101, 95, 112, 97, 115, 115, 119, 111, 114,
100, 0
]);console.log(format(bytes));
// If you don't want to output with color
setColorEnable(false);```
#### output
![output](./output.png)