Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/http_utils/response.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/response.ts";

Whether the input is Response or not.

import { isResponse } from "https://deno.land/x/http_utils@$VERSION/response.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

input: unknown