UNPKG

@mapcss/preset-svg

Version:
22 lines (21 loc) 482 B
import { isObject } from "../isObject/mod.js"; import { isFunction } from "../isFunction/mod.js"; /** * Whatever argument is primitive value or not * * @param val - Input any value * @returns The result of `Primitive` or not * * @example * ```ts * import { isPrimitive } from './mod.ts' * isPrimitive(true) // true * isPrimitive({}) // false * ``` * * @beta */ function isPrimitive(value) { return !isObject(value) && !isFunction(value); } export { isPrimitive };