instanceof.js 382 B

123456789
  1. import _Symbol from "@babel/runtime-corejs3/core-js/symbol";
  2. import _Symbol$hasInstance from "@babel/runtime-corejs3/core-js/symbol/has-instance";
  3. export default function _instanceof(left, right) {
  4. if (right != null && typeof _Symbol !== "undefined" && right[_Symbol$hasInstance]) {
  5. return !!right[_Symbol$hasInstance](left);
  6. } else {
  7. return left instanceof right;
  8. }
  9. }