Skip to main content
Module

x/http_utils/response.ts>isResponse

HTTP implementation utility collection
Go to Latest
function isResponse
import { isResponse } from "https://deno.land/x/http_utils@1.0.0-beta.12/response.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