@mapcss/preset-svg
Version:
SVG as CSS for MapCSS
22 lines (21 loc) • 482 B
JavaScript
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 };