Skip to main content

Built and signed on GitHub Actions

Extends @std/encoding. Functionalities includes hexdump

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
4 months ago (0.0.5)
function dump
dump(bufferView: ArrayBufferView | ArrayBuffer): string

Convert a buffer to a hexdump string.

Examples

Example 1

const buffer = new TextEncoder().encode("The quick brown fox jumps over the lazy dog.");
console.log(dump(buffer));
// 00000000  54 68 65 20 71 75 69 63  6b 20 62 72 6f 77 6e 20  |The quick brown |
// 00000010  66 6f 78 20 6a 75 6d 70  73 20 6f 76 65 72 20 74  |fox jumps over t|
// 00000020  68 65 20 6c 61 7a 79 20  64 6f 67 2e              |he lazy dog.|

Parameters

bufferView: ArrayBufferView | ArrayBuffer

Return Type

Add Package

deno add @stdext/encoding

Import symbol

import { dump } from "@stdext/encoding/hex";

Add Package

npx jsr add @stdext/encoding

Import symbol

import { dump } from "@stdext/encoding/hex";

Add Package

yarn dlx jsr add @stdext/encoding

Import symbol

import { dump } from "@stdext/encoding/hex";

Add Package

pnpm dlx jsr add @stdext/encoding

Import symbol

import { dump } from "@stdext/encoding/hex";

Add Package

bunx jsr add @stdext/encoding

Import symbol

import { dump } from "@stdext/encoding/hex";