注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
Streaming fetches are supported in Chrome, Edge, and Safari, and they look a little like this: as... Streaming fetches are supported in Chrome, Edge, and Safari, and they look a little like this: async function getResponseSize(url) { const response = await fetch(url); const reader = response.body.getReader(); let total = 0; while (true) { const { done, value } = await reader.read(); if (done) return total; total += value.length; } } This code is pretty readable thanks to async functions (here's a
2017/04/19 リンク