import { isFunction, isArrayCount } from "..";
const isAllTrueField = (source, filterFn) => {
    if (isFunction(filterFn)) {
        if (isArrayCount(source)) {
            for (let i = 0; i < source.length; i++) {
                if (!filterFn(source[i])) {
                    return false;
                }
            }
        }
        else {
            for (const key in source) {
                if (Object.prototype.hasOwnProperty.call(source, key)) {
                    if (!filterFn(source[key])) {
                        return false;
                    }
                }
            }
        }
        return true;
    }
    else {
        console.error('filterFn is not a function');
    }
    return false;
};
export default isAllTrueField;
