import { InputProps } from './input.types'

/** Returns length of the initial input's value. */
export function getInitialCount(props: InputProps) {
  const { defaultValue, value } = props

  return defaultValue?.toString().length ?? value?.toString().length ?? 0
}
