UNPKG

@ng-doc/builder

Version:

<!-- PROJECT LOGO --> <br /> <div align="center"> <a href="https://github.com/ng-doc/ng-doc"> <img src="https://ng-doc.com/assets/images/ng-doc.svg?raw=true" alt="Logo" height="150px"> </a>

27 lines 855 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.onKeywordsTouch = onKeywordsTouch; exports.touchKeywords = touchKeywords; const rxjs_1 = require("rxjs"); const operators_1 = require("rxjs/operators"); const variables_1 = require("../variables"); const KEYWORDS_CHANGE = new rxjs_1.Subject(); /** * * @param {...any} keywords * @param include * @param exclude */ function onKeywordsTouch(include, exclude = () => false) { return KEYWORDS_CHANGE.pipe((0, operators_1.filter)((changedKeywords) => { return !(0, variables_1.isColdStart)() && changedKeywords.some((c) => !exclude(c) && include(c)); }), (0, operators_1.map)(() => void 0)); } /** * * @param {...any} keywords */ function touchKeywords(...keywords) { KEYWORDS_CHANGE.next(keywords); } //# sourceMappingURL=on-keywords-touch.js.map