@planjs/utils
Version:
🔧 Common tools collection
12 lines (10 loc) • 318 B
JavaScript
import _typeof from "@babel/runtime/helpers/esm/typeof";
/**
* 判断是否原始数据类型
* @param value
* @category Is
*/
function isPrimitive(value) {
return typeof value === 'string' || typeof value === 'number' || _typeof(value) === 'symbol' || typeof value === 'boolean';
}
export default isPrimitive;