Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
A Javascript library that enables you to handle deeply nested objects easily.
Warning: mitsuketa project is no longer maintained in favor of @enio.ai/data-ferret.
Thanks for using this project. If you have concerns or need help with migration, you can leave a comment or question on enio's discussion board.
A Javascript library that enables you to handle deeply nested objects easily.
Using npm:
$ npm i -g npm
$ npm i --save mitsuketa
Mitsuketa makes JavaScript easier by taking the hassle out of working with deeply nested data structures. Allows you to strict compare object, locate deeply nested entities, etc.
Method | Brief Description | Parameters/Input | Output |
---|---|---|---|
getType | Gets typeof identity also makes distinction between object , null , and array | identity | string |
sameType | Compares two identities using getType method | identityA, identityB | identity or false |
sameStructure | Compares two identities using sameType then validates both have the same keys | identityA, identityB | identity or false |
identical | Compares two identities using sameStructure then validates children or nested structures for iterble identities or actual values | identityA, identityB | identity or false |
isIterable | Checks if identity contains one or more keys or properties | identity | boolean |
containsKeys | Checks if identity contains the specified properties | identity, keyList | boolean |
trim | Removes properties from identity and only keeps the specified properties | identity, keyList | identity |
locate | Performs a deep search by iterating through the collection 's entire object tree an returns the path to the first identical match that is found as a string of dot . separated property names | collection, identity | string |
deepGet | Uses locate and returns the indentity 's container if found in collection | collection, identity | identity |
locateAll | Uses locate and returns all the paths to all matches | collection, identity | array of string |
deepFilter | Uses locateAll and returns an array of all an identites matched inside collection | collection, identity | array of identities |
length | Returns the number of keys or properties contained in identity | identity | number |
exists | Performs deep search on collection for an identical match to identity | collection, identity | boolean |
onlyExisting | For each identity in identities , performs a deep search on collection using exists , to shorten the list identities to those that were found | collection, identities | identities |
onlyMissing | For each identity in identities , performs a deep search on collection using exists , to shorten the list identities to those that were not found | collection, identities | identities |
isFalsy | Checks if identity has or false or false-like values. These include: null, undefined, '', false, and 0 | identity | identity or false |
isTruthy | Checks if identity is non-falsy | identity | identity or false |
foundTruthy | Performs deep search on collection , and evaluate if isTruthy on the first identical match to identity | collection, identity | boolean |
foundFalsy | Performs deep search on collection , and evaluate if isFalsy on the first identical match to identity | collection, identity | boolean |
onlyTruthy | For each identity in identities , performs a deep search on collection using exists , and evaluates if isTruthy on the first identical match of property to shorten the list identities to those that were found and also truthy | collection, identities, property | identities |
onlyFalsy | For each identity in identities , performs a deep search on collection using exists , and evaluates if isFalsy on the first identical match of property to shorten the list identities to those that were found and also truthy | collection, identities, property | identities |
countMatches | Performs deep search for identity on collection using locateAll and returns the number of confirmed matches in a given depth | collection, identity, number | number |
maxDepth | Returns the nth value of the deepest layer of the entire object tree | identity | number |
matchDepth | Performs deep search for identity on collection to return the location's depth of the first match. If no match found, returns false. | collection, identity | number |
locate_Key | Performs a deep search by iterating through the collection 's entire object tree an returns the path to the first identical match that is found as a string of dot . separated property names | collection, key | string |
deepGet_Key | Uses locate_Key and returns the indentity 's container if found in collection | collection, key | identity |
locateAll_Key | Uses locate_Key and returns all the paths to all matches | collection, key | array of string |
deepFilter_Key | Uses locateAll and returns an array of all an identites matched inside collection | collection, key | array of identities |
deepClone | Creates a non-reference clone that is an exact copy to the identity provided. Can be used to create shallow clones of specific depths. Can also be used to create branch clones . Read more in documentation | collection, key | any |
renameKey | Performs deep search on the identity 's object tree to rename the first matching key. | identity, key, key | identity |
renameKeys | Performs deep search on the identity 's object tree to rename all matching keys. | identity, key, key | identity |
deepRemove_Key | Performs deep search on the identity 's object tree to remove the first property with matching key. | identity, key | identity |
deepRemoveAll_Key | Performs deep search on the identity 's object tree to remove all properties with matching key. | identity, key | identity |
This project is licensed under the MIT License - see the LICENSE.md file for details.
If you have a minute to spare, can you answer these two questions? https://www.surveymonkey.com/r/XJ37XSP
FAQs
A Javascript library that enables you to handle deeply nested objects easily.
We found that mitsuketa demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.