Most userland implementations of custom ReadableStream instances do not typically bother with all the ceremony required to correctly implement both default and BYOB read support in a single stream – and for good reason. It's difficult to get right and most of the time consuming code is typically going to fallback on the default read path. The example below shows what a "correct" implementation would need to do. It's big, complex, and error prone, and not a level of complexity that the typical developer really wants to have to deal with:
console.warn('[Hotaudio] Failed to mock toString', e);,详情可参考同城约会
本内容由作者授权发布,观点仅代表作者本人,不代表虎嗅立场。。同城约会对此有专业解读
Small chunks (1KB × 5000)