ant-design/components/_util/isNumeric.ts

6 lines
151 B
TypeScript
Raw Normal View History

const isNumeric = <T extends number>(value: any): value is T => {
return !isNaN(parseFloat(value)) && isFinite(value);
};
export default isNumeric;