js-class-is icon indicating copy to clipboard operation
js-class-is copied to clipboard

Enhances a JavaScript class by adding an is<Class> property to compare types between realms.

Results 4 js-class-is issues
Sort by recently updated
recently updated
newest added

As per https://github.com/ipld/js-ipld-dag-pb/pull/184#discussion_r436880297 it appears that chai will deep equality check with duck typed counterpart of the instance because of the `[Symbol.toStringTag]` getter this library adds. I have created pull...

As per @achingbrain https://github.com/ipld/js-ipld-dag-pb/pull/184#discussion_r436880297 chai's `deep.equal` check instance created via `class-is` should match it's duck-typed counterpart. It appears that `[Symbol.toStringTag]` field prevents that from happening. This pull request adds failing...

Add [Symbol.hasInstance](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/hasInstance) functionality so we can use `instanceof` directly to compare class instances.

enhancement