[ ] ๐ Documentation (updates to the documentation, readme, or JSdoc annotations)
[ ] ๐ Bug fix (a non-breaking change that fixes an issue)
[ ] ๐ Enhancement (improving an existing functionality like performance)
[ ] โจ New feature (a non-breaking change that adds functionality)
[ ] ๐งน Chore (updates to the build process or auxiliary tools and libraries)
[ ] โ ๏ธ Breaking change (fix or feature that would cause existing functionality to change)
๐ Description
it is commonly required to identify if something is coming from unenv or not specially for classes and mocked objects.
This PR adds __unenv__ property to class (instances) and functions to identify.
Note: Since we were already using req.__unenv__ for another purpose (https://github.com/unjs/unenv/issues/72), the type for IncommingMessage and Readable classes is unknown/object.
๐ Linked issue
โ Type of change
๐ Description
it is commonly required to identify if something is coming from unenv or not specially for classes and mocked objects.
This PR adds
__unenv__
property to class (instances) and functions to identify.Note: Since we were already using
req.__unenv__
for another purpose (https://github.com/unjs/unenv/issues/72), the type forIncommingMessage
andReadable
classes is unknown/object.๐ Checklist