UNPKG
one
Version:
canary (1.1.520-1755196935791)
latest (1.1.535)
prepub (1.1.350)
6.0.1
6.0.0
5.1.4
5.1.3
5.1.2
5.1.1
5.1.0
5.0.3
5.0.2
5.0.1
5.0.0
4.0.0
3.1.4
3.1.3
3.1.2
3.1.1
3.0.13
3.0.12
3.0.11
3.0.10
3.0.8
3.0.7
3.0.6
3.0.5
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
2.5.2
2.5.0
2.0.11
2.0.10
2.0.8
2.0.7
2.0.6
2.0.5
2.0.4
2.0.1
2.0.0
1.8.2
1.8.1
1.7.12
1.7.11
1.7.10
1.7.9
1.7.8
1.7.7
1.7.6
1.7.5
1.7.3
1.7.2
1.7.1
1.7.0
1.5.1
1.5.0
1.4.4
1.4.3
1.4.1
1.4.0
1.3.5
1.3.4
1.3.3
1.3.2
1.3.1
1.3.0
1.2.0
1.1.535
1.1.534
1.1.533
1.1.532
1.1.531
1.1.530
1.1.529
1.1.528
1.1.527
1.1.526
1.1.525
1.1.524
1.1.523
1.1.522
1.1.521
1.1.520
1.1.520-1755196935791
1.1.519
1.1.518
1.1.517
1.1.516
1.1.515
1.1.514
1.1.513
1.1.512
1.1.511
1.1.510
1.1.509
1.1.508
1.1.507
1.1.506
1.1.505
1.1.504
1.1.502
1.1.501
1.1.501-1751155612296
1.1.500
1.1.499
1.1.498
1.1.497
1.1.496
1.1.495
1.1.494
1.1.493
1.1.492
1.1.491
1.1.490
1.1.489
1.1.488
1.1.487
1.1.486
1.1.485
1.1.484
1.1.483
1.1.482
1.1.481
1.1.480
1.1.479
1.1.478
1.1.477
1.1.476
1.1.475
1.1.474
1.1.473
1.1.472
1.1.471
1.1.470
1.1.469
1.1.468
1.1.467
1.1.466
1.1.465
1.1.464
1.1.463
1.1.462
1.1.461
1.1.460
1.1.459
1.1.458
1.1.457
1.1.456
1.1.455
1.1.454
1.1.453
1.1.452
1.1.451
1.1.450
1.1.449
1.1.448
1.1.447
1.1.446
1.1.445
1.1.444
1.1.443
1.1.442
1.1.441
1.1.440
1.1.439
1.1.438
1.1.437
1.1.436
1.1.435
1.1.434
1.1.434-1738878681339
1.1.434-1738836794800
1.1.433
1.1.432
1.1.431
1.1.430
1.1.429
1.1.428
1.1.427
1.1.426
1.1.425
1.1.424
1.1.423
1.1.422
1.1.421
1.1.421-1738393465855
1.1.420
1.1.419
1.1.418
1.1.417
1.1.416
1.1.415
1.1.414
1.1.413
1.1.412
1.1.411
1.1.410
1.1.409
1.1.408
1.1.407
1.1.406
1.1.405
1.1.404
1.1.403
1.1.402
1.1.401
1.1.400
1.1.399
1.1.398
1.1.397
1.1.396
1.1.395
1.1.394
1.1.393
1.1.392
1.1.391
1.1.390
1.1.389
1.1.388
1.1.387
1.1.386
1.1.385
1.1.384
1.1.383
1.1.382
1.1.381
1.1.380
1.1.379
1.1.378
1.1.377
1.1.376
1.1.375
1.1.374
1.1.373
1.1.372
1.1.371
1.1.370
1.1.369
1.1.368
1.1.367
1.1.366
1.1.365
1.1.364
1.1.363
1.1.362
1.1.361
1.1.360
1.1.359
1.1.358
1.1.357
1.1.356
1.1.355
1.1.354
1.1.353
1.1.350
1.1.349
1.1.348
1.1.347
1.1.346
1.1.345
1.1.345-1734464750388
1.1.344
1.1.343
1.1.342
1.1.341
1.1.340
1.1.339
1.1.338
1.1.337
1.1.336
1.1.335
1.1.334
1.1.333
1.1.332
1.1.331
1.1.330
1.1.329
1.1.328
1.1.327
1.1.326
1.1.325
1.1.324
1.1.323
1.1.322
1.1.321
1.1.320
1.1.319
1.1.318
1.1.317
1.1.316
1.1.315
1.1.314
1.1.313
1.1.312
1.1.311
1.1.310
1.1.309
1.1.308
1.1.307
1.1.306
1.1.305
1.1.304
1.1.303
1.1.302
1.1.301
1.1.300
1.1.299
1.1.298
1.1.297
1.1.296
1.1.295
1.1.294
1.1.293
1.1.292
1.1.291
1.1.290
1.1.289
1.1.288
1.1.287
1.1.286
1.1.285
1.1.284
1.1.283
1.1.282
1.1.281
1.1.280
1.1.279
1.1.278
1.1.277
1.1.276
1.1.275
1.1.274
1.1.273
1.1.272
1.1.271
1.1.270
1.1.269
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.0
0.0.1-security
One is a new React Framework that makes Vite serve both native and web.
one
/
src
/
utils
/
isResponse.ts
8 lines
(7 loc)
•
241 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
// for some reason instanceof isnt working reliably
export
function
isResponse
(
res: any
): res is
Response
{
return
( res
instanceof
Response
|| (
typeof
res.
status
===
'number'
&&
'body'
in
res &&
typeof
res.
ok
===
'boolean'
) ) }