Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ExcelReader] Delegate Schema Validation to consumer ? #16

Open
vikramkamath opened this issue Apr 19, 2021 · 0 comments
Open

[ExcelReader] Delegate Schema Validation to consumer ? #16

vikramkamath opened this issue Apr 19, 2021 · 0 comments

Comments

@vikramkamath
Copy link

Thanks for this tool!
I was wondering if it should be possible to not provide schema upfront at all and let the consumer apply schema validation. Sometimes, you just want to parse any excel uploaded without having to worry upfront about the schema.

For example:

import {schema, schemaValidator} from "user-preferred-schema-validator";

const excelReader = new ExcelReader(readableStream); // <=== no schema passed here

...

await excelReader.eachRow(record => {
    schemaValidator.validate(record, schema); // <=== user does this validation upon every record
})

what do you think ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant