UNPKG
@scayle/storefront-core
Version:
latest (8.61.3)
8.61.3
8.61.2
8.61.1
8.61.0
8.60.1
8.60.0
8.59.7
8.59.6
8.59.5
8.59.4
8.59.3
8.59.2
8.59.1
8.59.0
8.58.0
8.57.3
8.57.2
8.57.1
8.57.0
8.56.0
8.55.0
8.54.0
8.53.3
8.53.2
8.53.1
8.53.0
8.52.0
8.51.0
8.50.0
8.49.0
8.48.1
8.48.0
8.47.0
8.46.0
8.45.1
8.45.0
8.44.2
8.44.1
8.44.0
8.43.4
8.43.3
8.43.2
8.43.1
8.43.0
8.42.2
8.42.1
8.42.0
8.41.4
8.41.3
8.41.2
8.41.1
8.41.0
8.40.0
8.39.1
8.39.0
8.38.4
8.38.3
8.38.2
8.38.1
8.38.0
8.37.0
8.36.0
8.35.0
8.34.1
8.34.0
8.33.2
8.33.1
8.33.0
8.32.1
8.32.0
8.31.0
8.30.3
8.30.2
8.30.1
8.30.0
8.29.0
8.28.7
8.28.6
8.28.5
8.28.4
8.28.3
8.28.2
8.28.1
8.28.0
8.27.0
8.26.2
8.26.1
8.26.0
8.25.6
8.25.5
8.25.4
8.25.3
8.25.2
8.25.1
8.25.0
8.24.2
8.24.1
8.24.0
8.23.0
8.22.0
8.21.0
8.20.1
8.20.0
8.19.1
8.19.0
8.18.0
8.17.1
8.17.0
8.16.0
8.15.1
8.15.0
8.14.4
8.14.3
8.14.2
8.14.1
8.14.0
8.13.0
8.12.3
8.12.2
8.12.1
8.12.0
8.11.3
8.11.2
8.11.1
8.11.0
8.10.0
8.9.0
8.8.0
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.2
8.2.1
8.2.0
8.1.5
8.1.4
8.1.3
8.1.2
8.1.1
8.1.0
8.0.0
7.69.3
7.69.2
7.69.1
7.69.0
7.68.0
7.67.1
7.67.0
7.66.7
7.66.6
7.66.5
7.66.4
7.66.3
7.66.2
7.66.1
7.66.0
7.65.11
7.65.10
7.65.9
7.65.8
7.65.7
7.65.6
7.65.5
7.65.4
7.65.3
7.65.2
7.65.1
7.65.0
7.64.4
7.64.3
7.64.2
7.64.1
7.64.0
7.63.1
7.63.0
7.62.0
7.61.0
7.60.1
7.60.0
7.59.2
7.59.1
7.59.0
7.58.3
7.58.2
7.58.1
7.58.0
7.57.0
7.56.0
7.55.0
7.54.0
7.53.0
7.52.1
7.52.0
7.51.1
7.51.0
7.50.1
7.50.0
7.49.4
7.49.3
7.49.2
7.49.1
7.49.0
7.48.2
7.48.1
7.48.0
7.47.0
7.46.1
7.46.0
7.45.0
7.44.1
7.44.0
7.43.0
7.42.1
7.42.0
7.41.3
7.41.2
7.41.1
7.41.0
7.40.1
7.40.0
7.39.1
7.39.0
7.38.1
7.38.0
7.37.0
7.36.0
7.35.0
7.34.1
7.34.0
7.33.0
7.32.0
7.31.0
7.30.0
7.29.0
7.28.2
7.28.1
7.28.0
7.27.0
7.26.0
7.25.1
7.25.0
7.24.1
7.24.0
7.23.0
7.22.1
Collection of essential utilities to work with the Storefront API
github.com/scayle/storefront-core
@scayle/storefront-core
/
dist
/
utils
/
response.mjs
8 lines
(7 loc)
•
163 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
export
async
function
unwrap
(
res
) {
const
response =
await
res;
if
(response
instanceof
Response
) {
return
await
response.
json
(); }
return
response; }