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