pub fn instance_of() -> impl Fold + VisitMut
Expand description
@babel/plugin-transform-instanceof
§Example
§Out
function _instanceof(left, right) {
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
return !!right[Symbol.hasInstance](left);
} else {
return left instanceof right;
}
}
_instanceof(foo, Bar);