UNPKG

framer-motion

Version:

An open source and production-ready motion library for React on the web

5 lines (4 loc) • 179 B
/** * Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1" */ export const isNumericalString = (v: string) => /^\-?\d*\.?\d+$/.test(v)