source: trip-planner-front/node_modules/@angular-devkit/schematics/src/tree/static.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.2 KB
Line 
1"use strict";
2/**
3 * @license
4 * Copyright Google LLC All Rights Reserved.
5 *
6 * Use of this source code is governed by an MIT-style license that can be
7 * found in the LICENSE file at https://angular.io/license
8 */
9Object.defineProperty(exports, "__esModule", { value: true });
10exports.partition = exports.merge = exports.branch = exports.empty = void 0;
11const exception_1 = require("../exception/exception");
12const host_tree_1 = require("./host-tree");
13const interface_1 = require("./interface");
14function empty() {
15 return new host_tree_1.HostTree();
16}
17exports.empty = empty;
18function branch(tree) {
19 return tree.branch();
20}
21exports.branch = branch;
22function merge(tree, other, strategy = interface_1.MergeStrategy.Default) {
23 tree.merge(other, strategy);
24 return tree;
25}
26exports.merge = merge;
27function partition(tree, predicate) {
28 if (tree instanceof host_tree_1.HostTree) {
29 return [
30 new host_tree_1.FilterHostTree(tree, predicate),
31 new host_tree_1.FilterHostTree(tree, (path, entry) => !predicate(path, entry)),
32 ];
33 }
34 else {
35 throw new exception_1.SchematicsException('Tree type is not supported.');
36 }
37}
38exports.partition = partition;
Note: See TracBrowser for help on using the repository browser.