7 lines
196 B
JavaScript
7 lines
196 B
JavaScript
|
/**
|
||
|
* Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1"
|
||
|
*/
|
||
|
const isNumericalString = (v) => /^\-?\d*\.?\d+$/.test(v);
|
||
|
|
||
|
export { isNumericalString };
|