Skip to content

Parses the MPAC Year-End Tax File (YETF) into a usable object.

License

Notifications You must be signed in to change notification settings

cityssm/node-mpac-yetf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MPAC Year-End Tax File (YETF) Parser

npm (scoped) Codacy Badge Maintainability codecov GitHub Workflow Status

This project is not endorsed with MPAC.

This project takes an MPAC YETF and parses it into usable objects.

Features

  • 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.

Installation

npm install @cityssm/mpac-yetf

Usage

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
    }
  }
})