const filterNumber = (input, isSigned = false, isDecimal = false) => {
    const signed = isSigned ? '(-|+)?' : '';
    const decimal = isDecimal ? '(.[0-9]+)?' : '';
    const regex = new RegExp(`^${signed}([0-9]+${decimal})$`);
    if (regex.test(input))
        return Number(input);
    return NaN;
};
const isNumber = (input) => !isNaN(filterNumber(input));
const isSignedNumber = (input) => !isNaN(filterNumber(input, true));
const isSignedDecimalNumber = (input) => !isNaN(filterNumber(input, true, true));
export { isNumber, isSignedNumber, isSignedDecimalNumber };
