SADFace will be a better library if, instead of maintaining a single internal SADFace document, every function was pure and operated on the document passed into it.
This should mostly be busy work of the following sort:
- Supply document to function through argument list (first argument?).
- Where possible, manipulate the document as necessary for the purposes of the function in a side-effect free way.
- Return the output. This is generally either (a) the modified document or (b) a subset of the document (perhaps modified), (c) something derived from the document.
- Update unittests (where necessary).
SADFace will be a better library if, instead of maintaining a single internal SADFace document, every function was pure and operated on the document passed into it.
This should mostly be busy work of the following sort: