mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +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;
|