import { string } from "https://deno.land/x/fun@v.2.0.0-alpha.11/mod.ts";
const { isString } = string;
A instance of Refinement<unknown, string>. Used as a type guard to verify any type is actually a string.
Examples
Example 1
Example 1
import { isString } from "./string.ts";
const notString: unknown = 2;
const string: unknown = "hello";
const result1 = isString(notString); // result1 has type unknown
const result2 = isString(string); // result2 has type string