import type { NormalizedOmdbData } from '../../../types'; import { createTargetHelpers, identity } from '../../../utils/objectHelpers'; import type { RawOmdbData } from './types'; const { createRequiredField, createOptionalField } = createTargetHelpers([null, '', 'N/A']); const stringToArray = (value: string) => value.split(', '); const stringToNumber = (value: string) => parseInt(value, 10); const stringToDuration = (value: string) => { const match = /^(?