Skip to main content
Module

x/http_utils/mod.ts>isResponse

HTTP utility collection for Fetch API
Go to Latest
function isResponse
import { isResponse } from "https://deno.land/x/http_utils@1.0.0-beta.15/mod.ts";

Whether the value is Response or not.

import { isResponse } from "https://deno.land/x/http_utils@$VERSION/mod.ts";
import { assertEquals } from "https://deno.land/std@$VERSION/testing/asserts.ts";

assertEquals(isResponse(new Response()), true);
assertEquals(isResponse({}), false);
assertEquals(isResponse(null), false);

Parameters

value: unknown