(input, options)
| 710 | const Share = { |
| 711 | __proto__: null, |
| 712 | from(input, options) { |
| 713 | if (isShareable(input)) { |
| 714 | const result = input[shareProtocol](options); |
| 715 | if (result === null || typeof result !== 'object') { |
| 716 | throw new ERR_INVALID_RETURN_VALUE( |
| 717 | 'an object', '[Symbol.for(\'Stream.shareProtocol\')]', result); |
| 718 | } |
| 719 | return result; |
| 720 | } |
| 721 | if (isAsyncIterable(input) || isSyncIterable(input)) { |
| 722 | return share(input, options); |
| 723 | } |
| 724 | throw new ERR_INVALID_ARG_TYPE( |
| 725 | 'input', ['Shareable', 'AsyncIterable', 'Iterable'], input); |
| 726 | }, |
| 727 | }; |
| 728 | |
| 729 | const SyncShare = { |
no test coverage detected
searching dependent graphs…