UNPKG
@typed/http
Version:
alpha (0.0.1-alpha.199)
latest (8.8.0)
8.8.0
8.7.4
8.7.3
8.7.2
8.7.1
8.7.0
8.6.1
8.6.0
8.5.0
8.4.0
8.3.2
8.3.1
8.3.0
8.2.1
8.2.0
8.1.0
8.0.0
7.2.0
7.1.2
7.1.1
7.1.0
7.0.0
6.0.1
6.0.0
5.1.5
5.1.4
5.1.3
5.1.2
5.1.1
5.1.0
5.0.0
4.2.0
4.1.0
4.0.1
4.0.0
3.4.0
3.3.0
3.2.2
3.2.1
3.2.0
3.1.0
3.0.0
2.2.2
2.2.1
2.2.0
2.1.1
2.1.0
2.0.0
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0-alpha.159
0.0.1-alpha.199
0.0.1-alpha.195
0.0.1-alpha.194
0.0.1-alpha.192
0.0.1-alpha.188
0.0.1-alpha.185
0.0.1-alpha.183
0.0.1-alpha.181
0.0.1-alpha.178
0.0.1-alpha.176
0.0.1-alpha.174
0.0.1-alpha.172
0.0.1-alpha.171
HTTP requests for node and browsers
github.com/tylors/typed-prelude
tylors/typed-prelude
@typed/http
/
esm
/
toJson.js
5 lines
•
212 B
JavaScript
View Raw
1
2
3
4
5
import
{ chain, tryCatch }
from
'@typed/either'
;
export
function
toJson
(
response
) {
return
chain
(
(
{ responseText }
) =>
tryCatch
(
() =>
JSON
.
parse
(responseText)), response); }
//# sourceMappingURL=toJson.js.map