Claude Bot
45c3a0a348
docs: update stream examples to use for await syntax
...
Update stream iteration examples to use the more idiomatic `for await`
syntax since Bun implements ReadableStream.prototype[Symbol.asyncIterator].
Changes:
- binary-data.md: Simplified file hashing example using for await loops
- fetch.md: Updated response body streaming example to use for await
This makes the examples cleaner and follows modern async iteration patterns
supported natively by Bun's ReadableStream implementation.
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com >
2025-08-28 21:19:41 +00:00
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
Jarred Sumner
55a9cccac0
bun.sh -> bun.com ( #20909 )
2025-07-10 00:10:43 -07:00
Jarred Sumner
14b439a115
Fix formatters not running in CI + delete unnecessary files ( #19433 )
2025-05-08 23:22:16 -07:00
Yoones Khoshghadam
19bdd5a56c
Docs: Correctly specify the sign of BigUint64Array ( #16358 )
2025-01-12 20:05:38 -08:00
Kevin Gibbons
260a0d16eb
docs: Add new methods to binary-data.md ( #14044 )
2024-09-19 13:36:08 -07:00
Jarred Sumner
80cb9e77bc
Use absolute links in docs
2024-09-10 15:11:16 -07:00
Jarred Sumner
3a245dd248
upgrade webkit ( #13192 )
...
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
Co-authored-by: Zack Radisic <zack@theradisic.com >
2024-08-12 23:17:17 -07:00
Imgodmaoyouknow
6354e608a7
chore(docs): fix wrongly written at binary-data.md ( #12451 )
2024-07-09 17:39:01 -07:00
Imgodmaoyouknow
21ff566d69
chore(docs): fix wrongly written at binary-data.md ( #12452 )
2024-07-09 01:44:47 -07:00
Meghan Denny
5caca9cd48
add .bytes() method to various readables ( #11104 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: nektro <nektro@users.noreply.github.com >
2024-05-16 19:10:50 -07:00
ふかねこ
625b172a71
docs: Update binary-data.md ( #8635 )
...
Binary notation ("0b") is appropriate instead of hexadecimal notation ("0x").
Sorry for the omission of the correction in this [PR](https://github.com/oven-sh/bun/pull/8619 ).
2024-02-02 00:16:14 -08:00
ふかねこ
c0fe042102
Update binary-data.md ( #8619 )
...
Binary notation ("0b") is appropriate instead of hexadecimal notation ("0x").
2024-02-01 12:38:54 -08:00
Dale Seo
c9e98db258
docs: remove unncessary empty line ( #7581 )
2023-12-11 14:54:18 -08:00
Aaron Dewes
a6a474a83f
Add File to binary data TOC ( #6025 )
2023-10-10 16:47:35 -07:00
Samuel Rigaud
263382103f
docs: fix typos ( #5151 )
2023-09-12 18:50:05 -07:00
Matthew Yu
9d6a8ee79d
Fix punctuation ( #4870 )
2023-09-11 08:50:39 -07:00
Rinku Chaudhari
682406c42c
docs: fix spelling ( #4763 )
2023-09-09 22:40:56 -07:00
Jarred Sumner
aae92c76a6
Fix incorrect function
2023-07-31 01:33:39 -07:00
Colin McDonnell
9b6913e1a6
More/better docs for JSX, utils, binary data, streams, hashing, bun test, Bun.serve ( #3005 )
...
* WIP
* Updates
* Document deepEquals
* WIP
* Update typeS
* Update TLS docs for Bun.serve
* Update types for tls
* Draft binary data page. Add Streams page.
* Update test runner docs
* Add hashing, flesh out utils
* Grammar
* Update types
* Fix
* Add import.meta docs
* Tee
2023-05-29 11:49:51 -07:00