@sanjo-addons/object
v1.1.1
Published
This work is devoted to God.
Downloads
1
Readme
Lua Object
This work is devoted to God.
A library of functions for working with objects. It can be used by other add-ons to save some development work.
An object is regarded to be a Lua table with zero or more key-value pairs.
Functions included:
- Object.copy: a function for copying an object.
- Object.keys: a function for extracting the keys of an object.
- Object.values: a function for extracting the values of an object.
- Object.entries: a function for converting an object to an array.
- Object.equals: a function for checking if two objects are equal.
- Object.assign: a function for assigning the key-value pairs of one or multiple objects to another object.
- Object.count: a function to count the number of key-value pairs on an object.
- Object.every: a function for checking if every key-value pair of an object fulfills certain conditions.
- Object.fromEntries: a function to convert an array of key-value pairs to an object.
- Object.isEmpty: a function for checking if an object has zero key-value pairs.
- Object.remove: a function for removing a key-value pair with a specific key from an object.
- Object.hasKeys / Object.hasEntries: a function to check if an object has any keys.
How to use
Please see "How to use Library" for how to use this library.
Support
You can support me on Patreon.