This project is not endorsed with MPAC.
This project takes an MPAC YETF and parses it into usable objects.
- Fully typed results with TypeScript.
- Returns all of the data as strings, but can optionally parse the data into numbers.
- Optionally defines the codes used. (i.e. Structure Code '760' corresponds to 'Police Station')
- Makes all of the parsers, lookups, and helper functions available for reuse.
npm install @cityssm/mpac-yetf
import { parseYetf } from '@cityssm/mpac-yetf'
await parseYetf('yetf2022.txt', {
addFormattedFields: true,
callbacks: {
all: (record, lineNumber) => {
console.log(record)
},
AA: (record) => {
// Save Property Creation record to database
}
}
})