3 lines
119 B
JavaScript
3 lines
119 B
JavaScript
const isPrimitive = val => !['object', 'function'].includes(typeof val) || val === null;
|
|
module.exports = isPrimitive;
|