@aimee-blue/ab-service-kit
Version:
Aimee Blue Service Template
21 lines (17 loc) • 443 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.isOfType = isOfType;
exports.ofType = ofType;
var _operators = require("rxjs/operators");
function isOfType(type, action) {
return action.type === type;
}
function ofType(type) {
const filterFn = isOfType.bind(undefined, type);
return stream => {
return stream.pipe((0, _operators.filter)(filterFn));
};
}
//# sourceMappingURL=ofType.js.map