UNPKG

@lou.codes/predicates

Version:
16 lines (15 loc) 384 B
import { isType } from "./isType.js"; /** * `typeof` "symbol" alias. * * @category Primitives * @example * ```typescript * isSymbol(Symbol("Lou")); // true * isSymbol(Symbol.iterator); // true * isSymbol("Lou"); // false * ``` * @param input Value to check. * @returns Returns `true` if value is a `symbol`, `false` otherwise. */ export const isSymbol = isType("symbol");