functional-abstraction/type

View on GitHub
src/isInstance.js

Summary

Maintainability
A
0 mins
Test Coverage
const isInstance = (type, x) => {
    return (
        x !== null && x !== undefined && x.constructor.prototype === type.prototype
    );
};

export default isInstance;