tiny-types
Version:
A tiny library that brings Tiny Types to JavaScript and TypeScript
19 lines • 620 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MatchesObjectsWithCommonPrototype = void 0;
const MatcherRule_1 = require("./MatcherRule");
/**
* @access private
*/
class MatchesObjectsWithCommonPrototype extends MatcherRule_1.MatcherRule {
pattern;
constructor(pattern, transformation) {
super(transformation);
this.pattern = pattern;
}
matches(value) {
return value instanceof this.pattern;
}
}
exports.MatchesObjectsWithCommonPrototype = MatchesObjectsWithCommonPrototype;
//# sourceMappingURL=MatchesObjectsWithCommonPrototype.js.map