From 8b4dad1381041beaaa41d93b415043644c65662e Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Mon, 6 May 2024 17:31:12 +0200 Subject: [PATCH] utils.go: new function isNumOrFract(x); it returns true if x is a float, an integer, ora a fraction --- utils.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils.go b/utils.go index 57719bf..a0f6851 100644 --- a/utils.go +++ b/utils.go @@ -38,6 +38,10 @@ func isNumber(v any) (ok bool) { return isFloat(v) || isInteger(v) } +func isNumOrFract(v any) (ok bool) { + return isFloat(v) || isInteger(v) || isFraction(v) +} + func isNumberString(v any) (ok bool) { return isString(v) || isNumber(v) }