Simple Object Handler
Table of Contents
Intro
1.The idea of Simple Object Handler it came with a necessity of make simple functions in a manner of be easier to read and easily handle objects in a way which hasn't as a native functions in JavaScript. It would be possible with these functions to handle objects such as check is empty or not, a lenght of keys or params, clean/remove all empty params (considering empty string, null or undefined), get an array of all keys or params values and much more.
Why should you use ?
2. 🚀- Create a better readable code;
- Dry your code and avoid reuse many ifs or long Object functions from JavaScript.
- Light library.
- Easy to install.
Installation
3. 📦 npm install simple-object-handler
Usage
4. 📖You can find at simple-object-handler the functions:
- isObjectEmpty
- isObjectNotEmpty
- objectKeys
- objectValues
- countObjectKeys
- countObjectValues
- isObject
- isParamEmpty
- removeEmptyFieldsFromObject
// You can use simply desconstructor way
const {
isObjectEmpty
isObjectNotEmpty
objectKeys
objectValues
countObjectKeys
countObjectValues
isObject
isParamEmpty
removeEmptyFieldsFromObject
} = require('simple-object-handler');
Would you like to know an example in how to use those functions ? Take a look at the wiki, there you can find an example of all that list of functions.
Tests
5. 📄You can find more examples how to use the library in test folder.
You can run the applications tests with
npm test
License
6. 📄Simple Object Handler is MIT licensed.