UNPKG

simplex-lang

Version:

SimplEx - simple expression language

20 lines 565 B
import { unbox } from './index.js'; // eslint-disable-next-line @typescript-eslint/unbound-method var objToStrProto = Object.prototype.toString; export function isObject(val) { return objToStrProto.call(val) === '[object Object]'; } export function isSimpleValue(val) { val = unbox(val); const type = typeof val; if (type === 'string' || type === 'number' || type === 'boolean' || type === 'bigint') { return true; } if (val == null) return true; return false; } //# sourceMappingURL=guards.js.map