diff --git a/helpers/basic.sh b/helpers/basic.sh index d964f4b..4a68ce7 100644 --- a/helpers/basic.sh +++ b/helpers/basic.sh @@ -85,3 +85,11 @@ cdownload() { require curl curl -fsSL "$1" -o "$2" } + +is_int() { + [[ "$1" =~ ^[0-9]+$ ]] +} + +is_number() { + [[ "$1" =~ ^[0-9]+([.,][0-9]+)?$ ]] +}