Ticket #11317 (closed enhancement: plugin)
Improvement suggestion for isNumeric() semantics
|Reported by:||sgbeal||Owned by:|
isNumeric() currently (1.7.1) returns true/false, but that doesn't help the user all that much because it doesn't tell him what type of number, i.e. he doesn't necessarily know how to parse it into a number afterwards (as an integer or float, decimal vs hex vs exponential format).
A more useful semantic would be to return literal false for non-numbers and the parsed numeric value for numbers. The down-side is that this would introduce a slight backwards incompatibility for the value 0, since current code tests for truthy/falsy.
- Status changed from new to closed
- Resolution set to plugin