added instanceOf plugin to preset es2015 (#6257)

* added instanceOf plugin to preset es2015

* fixed test cases
This commit is contained in:
Ajay Narain Mathur
2017-09-18 07:33:42 +10:00
committed by Justin Ridgewell
parent f5ad86c5c6
commit 3cdb7d7f0f
18 changed files with 58 additions and 22 deletions

View File

@@ -6,7 +6,9 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return right[Symbol.hasInstance](left); } else { return left instanceof right; } }
function _classCallCheck(instance, Constructor) { if (!_instanceof(instance, Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var B = function B() {
_classCallCheck(this, B);