(input, options)
| 729 | const SyncShare = { |
| 730 | __proto__: null, |
| 731 | fromSync(input, options) { |
| 732 | if (isSyncShareable(input)) { |
| 733 | const result = input[shareSyncProtocol](options); |
| 734 | if (result === null || typeof result !== 'object') { |
| 735 | throw new ERR_INVALID_RETURN_VALUE( |
| 736 | 'an object', '[Symbol.for(\'Stream.shareSyncProtocol\')]', result); |
| 737 | } |
| 738 | return result; |
| 739 | } |
| 740 | if (isSyncIterable(input)) { |
| 741 | return shareSync(input, options); |
| 742 | } |
| 743 | throw new ERR_INVALID_ARG_TYPE( |
| 744 | 'input', ['SyncShareable', 'Iterable'], input); |
| 745 | }, |
| 746 | }; |
| 747 | |
| 748 | module.exports = { |
no test coverage detected