import { trim } from 'lodash' import { Formatable } from '../types/formatter.type' import { isBlank } from '../../string/is_blank' export const documentNumberFormatable: Formatable = { unformat: (documentNumber: any) => { if (isBlank(documentNumber)) return null return trim(documentNumber) .replace(/[^a-zA-Z0-9 ]/g, '') .toUpperCase() } }