Files
bun.sh/docs/guides/util
Claude Bot 6a2b35245a docs: document comprehensive set of undocumented Bun APIs
This commit adds extensive documentation for previously undocumented APIs
across multiple categories:

**Utility APIs** (docs/api/utils.md):
- Bun.nanoseconds() - high-precision timing
- Bun.indexOfLine() - line boundary detection
- Bun.shellEscape() - shell injection prevention
- Bun.allocUnsafe() - unsafe memory allocation
- Bun.shrink() - memory optimization
- Bun.mmap() - memory-mapped file access
- Bun.resolve()/resolveSync() - module resolution
- Bun.unsafe namespace - low-level operations
- Bun.CSRF - CSRF token generation/verification
- Enhanced memory management APIs

**Compression APIs** (new docs/guides/util/zstd.md + utils.md):
- Bun.zstdCompress()/zstdCompressSync()
- Bun.zstdDecompress()/zstdDecompressSync()
- Performance comparisons and usage patterns

**Hashing APIs** (docs/api/hashing.md):
- Individual hash classes (MD4, MD5, SHA family)
- Instance methods (.update(), .digest())
- Static methods (.hash(), .byteLength)
- Security considerations for legacy algorithms

**Binary Data APIs** (docs/api/binary-data.md):
- Bun.CryptoHasher - hardware-accelerated hashing
- Streaming and performance optimization examples

**Shell APIs** (docs/runtime/shell.md):
- Bun.createParsedShellScript() - script parsing
- Bun.createShellInterpreter() - interpreter creation

**Macro APIs** (docs/bundler/macros.md):
- Bun.registerMacro() - internal macro registration

**Embedded Files** (docs/bundler/executables.md):
- Enhanced Bun.embeddedFiles documentation
- HTTP serving and access patterns

Total changes: 1,420+ lines of comprehensive documentation added
across 7 files, with practical examples, security considerations,
and performance guidance for all documented APIs.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-28 21:09:43 +00:00
..
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00
2025-08-01 16:09:44 -07:00
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00
2023-07-26 14:59:39 -07:00
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00
2025-07-10 00:10:43 -07:00