psych-ds / psychds-validator

Validator tools for the psych-DS specification
0 stars 1 forks source link

Try to accommodate both browser and CLI versions within one validate function #49

Closed bleonar5 closed 1 month ago

bleonar5 commented 2 months ago

TL;DR

Instead of creating alternate versions of "validate" or simply modifying the browserified version of validate to accommodate the necessary browser changes, try to update the core validate function so that both can work properly from the same code.

For example, it is not possible to use file.text() at arbitrary points in the validation process to get the contents of files during browser validation, so it is necessary to store file contents in working memory (in PsychDSDenoFile) for the browser version. For the sake of simplicity, both versions should operate in this same manner.