import { type InputOtpProps } from './types';

export const getValueArray = (value: string, length: InputOtpProps['length']) =>
  value
    .replace(/[^0-9]/g, '')
    .slice(0, length)
    .split('');
