Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sanjosolutions/luaobject

A library of functions for working with objects.
https://github.com/sanjosolutions/luaobject

wow wow-addon wow-addon-lib

Last synced: 5 days ago
JSON representation

A library of functions for working with objects.

Awesome Lists containing this project

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](https://github.com/SanjoSolutions/LuaLibrary#how-to-use)" for how to use this library.

## Support

You can support me on [Patreon](https://www.patreon.com/addons_by_sanjo).