@agions/utils
v1.0.4
Published
常用工具集合
Downloads
16
Readme
🚀 utils工具集合!
1. arrayToSum 数组 字段求和
注意:source 必须是数组对象的结构 如 []
import { arrayToSum } from "@agions/utils";
let sum = sumArrayObjects(source, "number");
2.findNode 节点遍历
注意:source 默认子节点为 children
import { findNode } from "@agions/utils";
let sum = findNode(source, (node) => {}, "children");