UNPKG

@monstermann/fn

Version:

A utility library for TypeScript.

26 lines (24 loc) 475 B
import { dfdlT } from "@monstermann/dfdl"; //#region src/string/isString.ts /** * `isString(target)` * * Checks if `target` is a string. * * ```ts * isString("hello"); // true * isString(123); // false * isString(null); // false * ``` * * ```ts * pipe("hello", isString()); // true * pipe(123, isString()); // false * pipe(null, isString()); // false * ``` */ const isString = dfdlT((target) => { return typeof target === "string"; }, 1); //#endregion export { isString };