mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-18 11:18:14 +08:00
6 lines
151 B
TypeScript
6 lines
151 B
TypeScript
const isNumeric = <T extends number>(value: any): value is T => {
|
|
return !isNaN(parseFloat(value)) && isFinite(value);
|
|
};
|
|
|
|
export default isNumeric;
|