This library provides functionality for reading and writing Madden NFL draft class files.
- Read draft class as JSON
- Write Madden draft class from JSON
- Madden NFL 25
- Madden NFL 26
- Install the npm package:
npm install madden-draft-class-tools - Run tests:
mocha ./tests/*.spec.js
This function takes in the buffer of a Madden draft class file as fileBuf and returns the draft class as a JSON object, with the following general structure:
{
"header": {
// File header data, you shouldn't need to modify this
},
"prospects": [
{
"firstName": string,
"lastName": string,
"position": number,
...
}
]
}
Note that enum values are represented as numbers in the JSON object. You will have to translate these yourself if you want to display them nicely.
This function writes the draft class JSON object to the Madden draft class file format and returns the file buffer. The draftClass object should have the same structure as the object returned by readDraftClass.
Contributions are welcome! Please open an issue or submit a pull request.
See the LICENSE file for license details.