@lou.codes/predicates
Version:
🧐 Predicate util functions
16 lines (15 loc) • 384 B
JavaScript
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");