Closed vbuch closed 7 months ago
Is it worth making use of util.deprecate()
to properly mark the function as deprecated?
Is it worth making use of
util.deprecate()
to properly mark the function as deprecated?
@dhensby , ✅
I'm going through the upgrade process/refactor of my project that uses pdfsign and I've just noticed that I'm using extractSignature
as a helper in our tests - essentially just to assert that there is indeed a signature in the PDF we've created. This is especially helpful when writing a custom signer and you want to assert that a signature was indeed added.
Is there a better way to do that?
The best I can think of would be to use an external library that deals with signature verification and exports such a utility. This one used to be part of node-signpdf some 5 years ago and is the only one I know. Finding such a library would actualy render our own extractSignature useless.
With the above in mind I'm closing this. I understand that the util may come handy to some. What I will do instead is create an adequate wording around it that clearly states this is not public-ready code.
Copied it in internal-utils to be used in tests. Will remove from
utils
in a next major release (#206)