nodejs.org
nodejs.org copied to clipboard
"Backpressuring in Streams" doc: Update pipeline examples
Description
In the "Backpressuring in Streams" documentation, update the pipeline() examples:
-
Callback examples: Use the correct module (
stream, notstream/promises). -
Promise examples: Use
stream/promisesinstead ofpromisify.
Validation
The updated page, when built locally (npm run dev) is http://localhost:3000/en/learn/modules/backpressuring-in-streams#the-problem-with-data-handling
Updated doc screenshots (click images to see full size):
| Section | CJS example | MJS example |
|---|---|---|
| callback | ||
| promise |
Related Issues
Check List
- [x] I have read the Contributing Guidelines and made commit messages that follow the guideline.
- [x] I have run
npm run formatto ensure the code follows the style guide. - [x] I have run
npm run testto check if all tests are passing. - [x] I have run
npx turbo buildto check if the website builds without errors. - [ ] I've covered new added functionality with unit tests if necessary.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated (UTC) |
|---|---|---|---|
| nodejs-org | ✅ Ready (Inspect) | Visit Preview | Jul 5, 2024 9:41pm |
Lighthouse Results
| URL | Performance | Accessibility | Best Practices | SEO | Report |
|---|---|---|---|---|---|
| /en | 🟢 98 | 🟢 100 | 🟢 100 | 🟢 91 | 🔗 |
| /en/about | 🟢 98 | 🟢 100 | 🟢 100 | 🟢 91 | 🔗 |
| /en/about/previous-releases | 🟢 98 | 🟢 100 | 🟢 100 | 🟢 92 | 🔗 |
| /en/download | 🟢 100 | 🟢 100 | 🟢 100 | 🟢 91 | 🔗 |
| /en/blog | 🟢 100 | 🟢 100 | 🟢 100 | 🟢 92 | 🔗 |
Unit Test Coverage Report
Unit Test Report
| Tests | Skipped | Failures | Errors | Time |
|---|---|---|---|---|
| 131 | 0 :zzz: | 0 :x: | 0 :fire: | 5.344s :stopwatch: |