truncate
- Handle top-level Error.
truncate
- Added the ability to pass a function for thereplacementAtMaxStringLength
option.- Bumped deps and migrated to Vite.
- Added
unflatten
to complimentflatten
. - Deprecated
walkie
. UsewalkEach
. - Deprecated
walkieAsync
. UsewalkEachAsync
.
- Added handling of top-level scalar values to
size
.
- BREAKING CHANGE: Changed API for
truncate
in order to make it more flexible. - Added
size
for estimating the size in bytes of an object.
- Added
removeFn
tocompact
for arbitrary removal.
- Added
objectsOnly
option toflatten
.
- Added
modifyInPlace
option formap
,walkie
,walkieAsync
,mapLeaves
,compact
, andtruncate
. truncate
supportsError
objects and can truncate strings and arrays based on thestringLength
andarrayLength
options.walker
now supports short-circuiting by returning the exported symbolSHORT_CIRCUIT
.
- Changed
truncate
options frommaxDepth
back todepth
sinceconsole.dir
uses this name. Also, you should probably prefer dtrim.
- Added
walkieAsync
for walking async.
- Changed
truncate
options fromdepth
tomaxDepth
and allowreplaceWith
to be anything.
- Added
truncate
for truncating deep objects.
- Make
options
required forcompact
.
- Added
compact
for cleaning up objects/arrays.
- Apply mapping fn to the root node for preorder and postorder
map
.
- Factor out common code.
- Remove
traverse
option from all mapping fns. findNode
fn.flatten
fn.
- Custom
shouldSkip
fn formap
andmapLeaves
.
- Deep clone object for
map
. AllowpostOrder
option.
map
iterates over output.- Added
walkie
. - Removed
mapKV
.
- Generic
walker
fn.
- Renamed argument.
- Fixed
traverse
type.
- Fixed
traverse
logic.
- Fixed bug regarding first-level leaves for
addRefs
.
- Initial release.