if-show.js 424 B

12345678910111213
  1. export function ifShow(show, container, creator, removeChildren, removeHandler) {
  2. if (removeChildren === void 0) { removeChildren = true; }
  3. if (removeHandler === void 0) { removeHandler = function (g) {
  4. g.node().removeChildren();
  5. }; }
  6. if (show) {
  7. return creator(container);
  8. }
  9. if (removeChildren)
  10. removeHandler(container);
  11. return null;
  12. }
  13. //# sourceMappingURL=if-show.js.map