@technobuddha/library
Version:
A large library of useful functions
21 lines (20 loc) • 574 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPrimitive = void 0;
/**
* Check to see if an object is a primitive
*
* @param input object to test
* @returns true, if the object is a c
*/
function isPrimitive(input) {
return input === null ||
input === undefined ||
typeof input === 'string' ||
typeof input === 'number' ||
typeof input === 'bigint' ||
typeof input === 'boolean' ||
typeof input === 'symbol';
}
exports.isPrimitive = isPrimitive;
exports.default = isPrimitive;