UNPKG
d3-fetch
Version:
latest (3.0.1)
next (2.0.0-rc.1)
3.0.1
3.0.0
2.0.0
2.0.0-rc.1
1.2.0
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
0.1.0
0.0.2
0.0.1
Convenient parsing for Fetch.
d3js.org/d3-fetch/
d3/d3-fetch
d3-fetch
/
src
/
blob.js
9 lines
(7 loc)
•
234 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
function
responseBlob
(
response
) {
if
(!response.
ok
)
throw
new
Error
(response.
status
+
" "
+ response.
statusText
);
return
response.
blob
(); }
export
default
function
(
input, init
) {
return
fetch
(input, init).
then
(responseBlob); }