object-tree-flat-exchange
v1.0.0
Published
object-tree to one level object, or rollback, see README and source code for more
Downloads
13
Maintainers
Readme
2 methods sample
fromObjectTree({ aa: { bb: 1 } }) // got { 'aa.bb': 1 }
toObjectTree({ 'halo.cc': 1 }) // got { halo: { cc: 1 } }
can set sep-string
fromObjectTree({ aa: { bb: 1 } }, '__') // got { 'aa__bb': 1 }
toObjectTree({ halo__cc: 1 }, '__') // got { halo: { cc: 1 } }
build
main file is index.js
, out.js
is generated by rollup --format=cjs --file=out.js index.js