GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — stream: deprecate asIndexedPairs · nodejs/node@9e2b13d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • doc/api
    • stream.md
  • lib/internal/streams
    • operators.js
  • test/parallel
    • test-stream-iterator-helpers-test262-tests.mjs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/stream.md‎

Copy file name to clipboardExpand all lines: doc/api/stream.md
+5Lines changed: 5 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -2453,6 +2453,11 @@ await Readable.from([1, 2, 3, 4]).take(2).toArray(); // [1, 2]
24532453
added:
24542454
- v17.5.0
24552455
- v16.15.0
2456+
changes:
2457+
- version: REPLACEME
2458+
pr-url: https://github.com/nodejs/node/pull/48102
2459+
description: Using the `asIndexedPairs` method emits a runtime warning that
2460+
it will be removed in a future version.
24562461
-->
24572462

24582463
> Stability: 1 - Experimental
Collapse file

‎lib/internal/streams/operators.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/operators.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const {
2323
addAbortSignalNoValidate,
2424
} = require('internal/streams/add-abort-signal');
2525
const { isWritable, isNodeStream } = require('internal/streams/utils');
26+
const { deprecate } = require('internal/util');
2627

2728
const {
2829
ArrayPrototypePush,
@@ -420,7 +421,7 @@ function take(number, options = undefined) {
420421
}
421422

422423
module.exports.streamReturningOperators = {
423-
asIndexedPairs,
424+
asIndexedPairs: deprecate(asIndexedPairs, 'readable.asIndexedPairs will be removed in a future version.'),
424425
drop,
425426
filter,
426427
flatMap,
Collapse file

‎test/parallel/test-stream-iterator-helpers-test262-tests.mjs‎

Copy file name to clipboardExpand all lines: test/parallel/test-stream-iterator-helpers-test262-tests.mjs
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ import assert from 'assert';
6060
}
6161
// asIndexedPairs/length.js
6262
assert.strictEqual(Readable.prototype.asIndexedPairs.length, 0);
63-
// asIndexedPairs/name.js
64-
assert.strictEqual(Readable.prototype.asIndexedPairs.name, 'asIndexedPairs');
6563
const descriptor = Object.getOwnPropertyDescriptor(
6664
Readable.prototype,
6765
'asIndexedPairs'

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.