UNPKG
@remix-run/web-fetch
Version:
latest (4.4.2)
pre (4.4.2-pre.0)
4.4.2
4.4.2-pre.0
4.4.1
4.4.0
4.4.0-pre.0
4.3.8
4.3.7
4.3.6
4.3.5
4.3.4
4.3.3
4.3.2
4.3.1
4.3.0
4.2.0
4.1.3
4.1.2
4.1.1
4.1.0
Web API compatible fetch implementation
github.com/remix-run/web-std-io
remix-run/web-std-io
@remix-run/web-fetch
/
src
/
utils
/
is-redirect.js
12 lines
(10 loc)
•
229 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
const
redirectStatus =
new
Set
([
301
,
302
,
303
,
307
,
308
]);
/** * Redirect code matching * *
@param
{
number
}
code
- Status code *
@return
{
boolean
} */
export
const
isRedirect
= code => {
return
redirectStatus.
has
(code); };