@rkmodules/rules 0.0.96 → 0.0.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +7 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +7 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/lib/DataTree/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -257,6 +257,9 @@ function broadCast(value) {
|
|
|
257
257
|
function getBranch(tree, path) {
|
|
258
258
|
return tree[path];
|
|
259
259
|
}
|
|
260
|
+
function getBranches(tree) {
|
|
261
|
+
return Object.values(tree);
|
|
262
|
+
}
|
|
260
263
|
function getPaths(tree) {
|
|
261
264
|
return Object.keys(tree);
|
|
262
265
|
}
|
|
@@ -1560,7 +1563,9 @@ var listInput = {
|
|
|
1560
1563
|
tree: mapTreeBranch(inputs.list || {}, function (branch) {
|
|
1561
1564
|
if (!branch || branch.length === 0)
|
|
1562
1565
|
return DISCARD;
|
|
1563
|
-
var allLines = branch.flatMap(function (text) {
|
|
1566
|
+
var allLines = branch.flatMap(function (text) {
|
|
1567
|
+
return text.replace(/(^[\n\r]+)|([\n\r]+$)/, "").split("\n");
|
|
1568
|
+
});
|
|
1564
1569
|
if (allLines.every(function (line) { return isBoolStr(line); })) {
|
|
1565
1570
|
allLines = allLines.map(function (line) { return line.toLowerCase() === "true"; });
|
|
1566
1571
|
}
|
|
@@ -7251,6 +7256,7 @@ exports.binaryOnTreeBranch = binaryOnTreeBranch;
|
|
|
7251
7256
|
exports.broadCast = broadCast;
|
|
7252
7257
|
exports.expandTree = expandTree;
|
|
7253
7258
|
exports.getBranch = getBranch;
|
|
7259
|
+
exports.getBranches = getBranches;
|
|
7254
7260
|
exports.getPaths = getPaths;
|
|
7255
7261
|
exports.getPositions = getPositions;
|
|
7256
7262
|
exports.getReferences = getReferences;
|