1.1.2 • Published 2 years ago

natural_util_js v1.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

安装

npm install natural_util_js

listToTree

    // arr 数据源(必传), 
    // iden = 'id'(唯一值), 
    // children = 'children'(子类集合属性), 
    // parentIden = 'parent'(父类标识)
    listToTree(arr)

treeToList

    // tree 数据源(必传),  
    // children = 'children'(子类集合属性), 
    treeToList(tree)

transformDate

    // date 数据源(必传)'2022-9-10' 或者date对象,  
    // format(必传) = YYYY(单位)MM(单位)DD(单位) HH(单位)mm(单位)SS(单位),
    // isFill 默认true 补零 
    transformDate(date, format, isFill)

deepFind

    // source 数据源(必传)array
    // key(必传) 需要找寻的key
    // value 需要找寻的key对应的值
    // children 子类字段
    deepFind(source, key, value, children)
1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago