@stamp/instanceof
Enables obj instanceof MyStamp
in ES6 environments
It uses the well known Symbol hasInstance to test instance.
Example
Create a stamp:
The following doesn't work:
Compose the InstanceOf
to your stamp:
Now it works:
Notes
We do not recommend to use
instanceof
in JavaScript in general.
Last updated