instanceOf

let isProto = function(obj1, obj2){

  let target1 = obj1.__proto__,

       target2 = obj2.prototype;

  while(true){

    if(target1 === target2){

      return true;

    }else if(target1 === null){

      return false;

    }else{

      target1 = target1.__proto__;

    }

  }

}

原文地址:https://www.cnblogs.com/cuishuangshuang/p/13432954.html