const mapStatus = createStatusMap({
OPERATING: ['open', 'opened'],
DOWN: ['temp closed', 'temp closed due weather'],
CLOSED: ['closed', 'not scheduled', ''],
REFURBISHMENT: ['maintenance'],
}, { parkName: 'SixFlags' });
mapStatus('open') // → 'OPERATING'
mapStatus('temp closed') // → 'DOWN'
mapStatus('weird_thing') // → 'CLOSED' (logs warning)
Create a status mapping function from a declarative config.