import {ElMessage} from "element-plus";

export function stringIsBlank(val) {
    return val === '' || val === null || typeof val === 'undefined'
}

export function stringNotBlank(val) {
    return val !== '' && val !== null && typeof val !== 'undefined'
}

export function listIsBlank(val) {
    if (val instanceof Array) {
        return val.length === 0 || typeof val === 'undefined'
    }
    ElMessage.error("入参不为数组无法判断")
    return false
}

export function listNotBlank(val) {
    if (val instanceof Array) {
        return val.length > 0 && typeof val !== 'undefined'
    }
    ElMessage.error("入参不为数组无法判断")
    return false
}
