UNPKG

util-ex

Version:

Browser-friendly enhanced util fully compatible with standard node.js

7 lines (6 loc) 246 B
export function isPrimitive(arg) { return arg === null || typeof arg === 'boolean' || typeof arg === 'number' || typeof arg === 'string' || typeof arg === 'symbol' || // ES6 symbol typeof arg === 'undefined'; }; export default isPrimitive;