office-text-extractor
office-text-extractor copied to clipboard
Allow overriding built-in extractors
Description
It would be a nice feature if we could override the built-in extractors.
This could be achieved as simple as changing
https://github.com/gamemaker1/office-text-extractor/blob/main/source/lib.ts#L59 from
this.methods.find to this.methods.findLast or alternative.
This way the last extractor added by the user will be picked.
Why
If you want to use a different implementation of text extraction (ex: pdf through AI OCR).
Alternatives
Currently you would need to do an IF check on mime type before calling extractText, and then call your own function instead.