Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Releases: AndrewRedican/mitsuketa

deepRemove_Key, deepRemoveAll_Key

08 Jan 00:45
Compare
Choose a tag to compare

Delete properties from plain or deeply nested or complex objects.

deepClone & Key Renaming

18 Dec 00:11
eaf7e3e
Compare
Choose a tag to compare

This release features:

  • Clone for exact non-reference copies, shallow clones, and branch clones
  • Rename one or all keys of identity on the fly

Deep Search by Key

17 Dec 08:37
e4ff3bc
Compare
Choose a tag to compare
  1. locate(), deepGet(), locateAll(), deepFilter() functions now have a counterpart each that supports deep search by key or property name. Check them out! locate_Key, deepGet_Key, locateAll_Key, deepFilter_Key.

maxDepth() & matchDepth()

16 Dec 08:05
7b05318
Compare
Choose a tag to compare
  1. New functions maxDepth() & matchDepth.
  2. Full maxDepth Support and Test Coverage.

maxDepth parameter is now supported for v1.1.x Features.

15 Dec 04:26
c3c0ed8
Compare
Choose a tag to compare
  1. Feature v1.1 functions: locate, deepGet, locateAll, and deepFilter now support a maxDepth parameter to limit the deep search to a certain number of depths inside a collection. Choosing to omit this param, will asign it to the default behavoir of evaluating all object depths.

This is especially useful in scenarios where you'd like to locate or get data off of a complex collection that is buried several layers or levels deep, and just so happens there are subcollections within the object tree that have the same property and value that you are not looking for.

For example, your collection might be an array of car objects, and, taking it no-sql approach of storing data to the extreme, it nests information about each component in it, and the components of the main components are also embeded.

Making a case:
You want to get the information about 'Pistion pin boss reinforcement' which is nested along with the other components of a 'piston' object, which in turn is embeded in a 'engine' of 'reciprocating' type. If by any chance you'd place the same property, such as a key id of sorts, and you've used only natural numbers, begining with 1,2,3.. and so on, and it is common for you to use this particular style throughout other components within the same object tree, locate, and deepGet would get you all the matches, even the unnecessary ones.

Now, you can be specific, if you want, about how deep you want to go to extract data from a complex and large object tree.

List filtering based on deepsearch criteria

03 Dec 09:29
88a55b6
Compare
Choose a tag to compare

This release includes the following new features:

exists
onlyExisting
onlyMissing
length
isFalsy
isTruthy
foundTruthy
onlyTruthy
foundFalsy
onlyFalsy

deepFilter() and locateAll()

28 Nov 04:36
98d33af
Compare
Choose a tag to compare

This release contains all the functionality it was originally intended to have.

deepFilter() provides a way all deeply nested identities that match a certain criteria. No more iterating over layers and properties! Get the data on the fly.

locateAll() provides the paths to all deeply nested identities that match a certain criteria. deepFilter() makes use of this function. By itself, its stands as good way to log and review what the identities are matching.