open-index/open-npm huggingface dataset:
npm package: @sanjith_b/vite-app
Description: This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Latest version: 0.0.1

# React + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
npm package: @sanjitha/sharedlib
Description: Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte);
Latest version: 0.0.1

# create-svelte

Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte);

## Creating a project

If you're seeing this, you've probably already done this step. Congrats!

```bash
# create a new project in the current directory
npm init svelte@next

# create a new project in my-app
npm init svelte@next my-app
```

> Note: the `@next` is temporary

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

Before creating a production version of your app, install an [adapter](https://kit.svelte.dev/docs#adapters) for your target environment. Then:

```bash
npm run build
```

> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.
npm package: @sanjo-addons/bags
Description: A library of functions for bags related things that can help other add-on creators to save some work.
Latest version: 2.1.0

# Bags

A library of functions for bags related things that can help other add-on creators to save some work.

**Included functions:**

* **Bags.countItem**: a function which counts the number of items with a specific item ID in the bags.
* **Bags.findItem**: a function which searches for an item or one of multiple items.
* **Bags.hasItem**: a functions which checks if a specific item is in one of the bags.
* **Bags.determineNumberOfFreeSlots**: a function which determines the number of free slots.
* **Bags.areBagsFull**: a function which checks if all bags are full.
* **Bags.hasFreeSpace**: a function which checks if there is any free space.

## How to use

Please see "[How to use Library](https://github.com/SanjoSolutions/LuaLibrary#how-to-use)" for how to use this library.
npm package: @sanjo-addons/boolean
Description: A library of functions for working with booleans that can help other add-on creators to save some work.
Latest version: 2.0.0

# Boolean

A library of functions for working with booleans that can help other add-on creators to save some work.

**Included functions:**

* **Boolean.toBoolean**: converts a value to a boolean.

## 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).
npm package: @sanjo-addons/caching
Description: A library with functionality for creating functions with cached return values. This can help other add-on creators to save some work.
Latest version: 2.0.1

# Caching

A library with functionality for creating functions with cached return values. This can help other add-on creators to save some work.

**Functions included:**

* **Caching.cached**: a function that creates a version of the given function, which caches the return value.

## 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).
npm package: @sanjo-addons/conditionals
Description: A library with functionality for conditionally running code. This can help other add-on creators to save some work.
Latest version: 2.0.0

# Conditionals

A library with functionality for conditionally running code. This can help other add-on creators to save some work.

**Included functions:**

* **Conditionals.doOnceWhen**: a function that runs a function once the given conditions are met.

## 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).
npm package: @sanjo-addons/coroutine
Description: This work is devoted to God.
Latest version: 2.0.1

# Lua Coroutine

This work is devoted to God.

A library for working with coroutines. This can help other add-on creators to save some work.

## Functions included

* **Coroutine.runAsCoroutine** a function that runs the given function as coroutine the next frame.
* **Coroutine.runAsCoroutineImmediately** a function that runs the give function as coroutine this frame.
* **Coroutine.resumeWithShowingError** a function which resumes the coroutine and supports showing the error when the coroutine throws one.

**The following functions can be used inside coroutines:**

* **Coroutine.waitFor** a function that waits until a function (predicate) returns true. An optional timeout is supported.
* **Coroutine.waitUntil** the same function as Coroutine.waitFor with a semantically different name.
* **Coroutine.waitForDuration** a function that waits for a specific duration.
* **Coroutine.yieldAndResume** a function which yields and schedules a resume.

## 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).
npm package: @sanjo-addons/events
Description: This work is devoted to God.
Latest version: 2.2.0

# Lua Events

This work is devoted to God.

A library for working with events. This can help other add-on creators to save some work.

All functions can only be used inside coroutines.
You can check out the [Coroutine](https://www.curseforge.com/wow/addons/coroutine) library for coroutine helpers.

With the provided functions, sequential code can be written for processes which require data that is provided via events.

**Functions included:**

* **Events.waitForOneOfEvents**: a function to wait for one of multiple events, with an optional timeout.
* **Events.waitForEventCondition**: a function to wait for an event of a specific type and a condition met. A timeout can be optionally passed.
* **Events.waitForEvent**: a function to wait for an event. A timeout can be optionally passed.

## 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).
npm package: @sanjo-addons/float
Description: A library for working with floats. This can help other add-on creators to save some work.
Latest version: 2.0.1

# Float

A library for working with floats. This can help other add-on creators to save some work.

**Functions included:**

* **Float.seemsCloseBy**: checks if two floats are close by. This can be used as an alternative for an equality check because it seems that the accuracy of float calculation results can vary.

## 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).
npm package: @sanjo-addons/function
Description: This work is devoted to God.
Latest version: 2.0.1

# Lua Function

This work is devoted to God.

A library for functional programming. This can help other add-on creators to save some work.

**Functions included:**

* **Function.partial**: a function for partial application.
* **Function.curry**: a function for currying a function.
* **Function.noOperation**: a function that "does nothing".
* **Function.identity**: a function which returns the value passed to it.
* **Function.alwaysTrue**: a function which returns true.
* **Function.isTrue**: a function that checks if a value is "truthy".
* **Function.returnValue**: a function that returns a function which returns the given value.
* **Function.once**: a function which creates a new function which runs the given function only on the first call (once).
* **Function.alwaysFalse**: a function which returns false.

## 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).
npm package: @sanjo-addons/hook
Description: A library for providing hooks into functionality. This can help other add-on creators to save some work.
Latest version: 1.1.0

# Hook

A library for providing hooks into functionality. This can help other add-on creators to save some work.

**Things included:**

* **Hook.Hook**: a class for a hook.
  * **Hook.Hook.new**: the constructor for the hook class.
  * **Hook.Hook:registerCallback**: a method for registering a callback.
  * **Hook.Hook:registerCallbackForRunningOnce**: a method for registering a callback that is only run once.
  * **Hook.Hook:runCallbacks**: a method for running all registered callbacks.

You can support me on [Patreon](https://www.patreon.com/addons_by_sanjo).
npm package: @sanjo-addons/hooking
Description: A library for hooking into functions. This can help other add-on creators to save some work.
Latest version: 1.1.0

# Hooking

A library for hooking into functions. This can help other add-on creators to save some work.

You can support me on [Patreon](https://www.patreon.com/addons_by_sanjo).
npm package: @sanjo-addons/library
Description: A library for registering libraries that can be used by add-ons. With this library multiple different versions of a library can be loaded and the same version of a library can be loaded only once and shared across add-ons.
Latest version: 0.5.1

# Library

A library for registering libraries that can be used by add-ons. With this library multiple different versions of a library can be loaded and the same version of a library can be loaded only once and shared across add-ons.

**Functions included:**

* **Library.create**: a function to create a new library.
* **Library.register**: a function to register a library.
* **Library.retrieve**: a function to retrieve a library.
* **Library.isRegistered**: a function for checking if a library is registered.

It is intended to use [semantic versioning](https://semver.org/) for versions and version constraints.

**Supported version constraints:**

* The newest version with a specific major version. E.g. "^2.0.0"
* A specific version. E.g. "1.0.0"

It is recommended to use a version constraint for the newest version with a specific version (i.e. "^2.0.0"),
so that the add-on uses the version of the library that is available with the latest bug fixes.

## How to use

In this section it is explained for how to ship the dependencies via embedding.
With this approach, the library is included as part of the add-on. A benefit to the add-on user is, that only
the add-on appears in the add-on list. So it can be easier to enable or disable an add-on and its library dependencies
compared to an approach where the libraries are included as add-ons (in this case each library shows as an add-on in the add-ons list and the user potentially is required to tick multiple checkboxes to enable or disable an add-on and its library dependencies).
Also with this approach it can be made sure that the exact versions of the libraries are used that has been tested with.

### Providing a library

```lua
--- @class ALibrary
local ALibrary = {}

-- Here you can add things to ALibrary

Library.register('ALibrary', '1.0.0', ALibrary)
```

### Using a library

```lua
local ALibrary = Library.retrieve('ALibrary', '^2.0.0')
```

### Make it easy to embed a library

It is recommended to create an XML file which includes all files of the library.
With this approach, libraries with multiple Lua files can also be included by library users by just referencing one file.
Example:

ALibrary.xml
```xml
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\..\FrameXML\UI.xsd">
  <Include file="ALibrary.lua" />
</Ui>
```

Then the library can be loaded by referencing it in the TOC file of the add-on that uses the library. Example:

```
libs/ALibrary/ALibrary.xml
```

It's recommended to load the library files first, so that the libraries are available in the other Lua files.

If the library itself has dependencies, it is recommended that those dependencies are also loaded by the add-on who uses the library.

## Support

You can support me on [Patreon](https://www.patreon.com/addons_by_sanjo).
npm package: @sanjo-addons/lua
Description: A library for working with the Lua programming language. This library can help other add-on creators to save some work.
Latest version: 1.1.0

# Lua

A library for working with the Lua programming language. This library can help other add-on creators to save some work.

**Functions included:**

* Lua.isValidName: a function which checks if a name is a valid name.
* Lua.isReservedKeyword: a function which checks if a name is a reserved keyword.

You can support me on [Patreon](https://www.patreon.com/addons_by_sanjo).
npm package: @sanjo-addons/mathematics
Description: This work is devoted to God.
Latest version: 2.0.1

# Lua Mathematics

This work is devoted to God.

A library with mathematical functions. This library can help other add-on creators to save some work.

**Functions included:**

* **Mathematics.add**: a function for adding two numbers.
* **Mathematics.sum**: a function for adding a list of numbers.
* **Mathematics.multiply**: a function for multiplying two numbers.
* **Mathematics.product**: a function for multiplying a list of numbers.
* **Mathematics.round**: a function for rounding a number.
* **Mathematics.sign**: a function for determining the sign of a number.
* **Mathematics.euclideanDistance**: a function for calculating the euclidean distance of two positions in the 3-dimensional space.
* **Mathematics.euclideanDistance2D**: a function for calculating the euclidean distance of two positions in the 2-dimensional space.
* **Mathematics.manhattanDistance**: a function for calculating the manhattan distance of two positions in the 3-dimensional space.
* **Mathematics.manhattanDistance2D**: a function for calculating the manhattan distance of two positions in the 2-dimensional space.
* **Mathematics.average**: a function for calculating the average of a list of numbers.

You can support me on [Patreon](https://www.patreon.com/addons_by_sanjo).
npm package: @sanjo-addons/object
Description: This work is devoted to God.
Latest version: 1.1.1

# 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).
npm package: @sanjo-addons/resolvable
Description: A library for working with resolvables. Resolvables are similar to promises or futures. This library can save add-on developers some work.
Latest version: 1.1.0

# Resolvable

A library for working with resolvables. Resolvables are similar to promises or futures.
This library can save add-on developers some work.

## Things included

* **Resolvable.Resolvable**: a class for a resolvable.
  * **Resolvable.Resolvable:new**: a constructor for creating a resolvable.
  * **Resolvable.Resolvable:afterResolve** / **Resolvable.Resolvable.after**: a method for registering a callback which is called after the resolvable is resolved.
  * **await** / **Resolvable.await**: a function for awaiting on a promise. Can only be used in a coroutine.
  * **Resolvable.all**: a function for creating a new resolvable which resolves when all resolvables, that have been passed, have been resolved.

"**Resolvable.Resolvable:new**" returns a second return value, which is a table with internal methods which can be used
by the creator of the resolvable. Those include:

* **resolve**: a method to resolve the resolvable.
npm package: @sanjo-addons/scheduling
Description: A library for scheduling. This library can save add-on developers some work.
Latest version: 1.1.0

# Scheduling

A library for scheduling. This library can save add-on developers some work.

**Functions included:**

* **Scheduling.doEachFrame**: a function for registering a function that is run each frame (via "OnUpdate"). The function also returns a table with the method "Cancel", that can be called to cancel the running of the previously registered function.
npm package: @sanjo-addons/serialization
Description: A library for serialization. This library can save add-on developers some work.
Latest version: 1.1.0

# Serialization

A library for serialization. This library can save add-on developers some work.

## Functions included

**High-level APIs:**

* **Serialization.serialize** / **Serialization.serializeTable**: a function that serializes the given table to a string.
* **Serialization.valueToString**: a function which serializes the given value to a string.

**Lower-level APIs:**

* **Serialization.tableToString**: a function which serializes the given table to a string.
* **Serialization.makeString**: a function which creates a serialized string from given text.
* **Serialization.tableToStringWithIndention**: a function which converts a table to a string.
* **Serialization.arrayToStringWithIndention**: a function which converts an array to a string.
* **Serialization.keyValueTableToStringWithIndention**: a function which converts a key-value table to a string.
* **Serialization.makeMultiLineString**: a function which makes a multi-line string.
* **Serialization.createClosingBracketOfLevel**: a function which creates a closing bracket of given level.
* **Serialization.createOpeningBracketOfLevel**: a function which creates an opening bracket of given level.
* **Serialization.indent**: a function which indents a string.
* **Serialization.indentLine**: a function which indents a line.
npm package: @sanjo-addons/set
Description: This work is devoted to God.
Latest version: 1.1.2

# Lua Set

This work is devoted to God.

A library for working with sets. This library can save add-on developers some work.

## Things included

* Set.new: a constructor for creating a new set.
* Set.create: a function for creating a set. Functionally the same as Set.new.

The following functions / methods can be called in two ways:

* When a set has been created with Set.new or Set.create then "add" for example can be called like this:

```lua
local set = Set.create()
set:add(1)
```

* Or by passing the set as first argument.

```lua
local set = Set.create()
set.add(set, 1)
```

This method also works for tables which fit the structure of set tables (just called set in other places in this documentation).

**Functions / Methods:**

* **add**: adds an element to the set.
* **copy**: copies a set.
* **iterator**: creates an iterator for the set.
* **toList**: creates a list out of the set.
* **size**: returns the number of elements in the set.
* **contains**: checks if the set contains a value.
* **containsWhichFulfillsCondition**: checks if the set contains an element which fulfills specific conditions.
* **remove**: removes an element from the set.
* **intersect**: creates an intersection of multiple sets.
* **equals**: checks if two sets are equal.
* **union**: creates a union of a set.
* **hasElements**: checks if a set has any elements.
* **isEmpty**: checks if a set is empty.

## How to use

Please see "[How to use Library](https://github.com/SanjoSolutions/LuaLibrary#how-to-use)" for how to use this library.
npm package: @sanjo-addons/stoppable
Description: A library for working with stoppables. Stoppables are similar to promises or futures. In addition, they can be stopped. This library can save add-on developers some work.
Latest version: 1.1.0

# Stoppable

A library for working with stoppables. Stoppables are similar to promises or futures. In addition, they can be stopped.
This library can save add-on developers some work.

## Things included

* **Stoppable.Stoppable**: the class for the stoppable construct.
* **Stoppable.Stoppable.new**: the constructor for the Stoppable class.
* **Stoppable.all**: returns a new stoppable that when stopped also stops all given stoppables.

**Methods:**

* **hasBeenRequestedToStop**: returns if the stoppable has been requested to stop.
* **isRunning**: returns if the stoppable is running.
* **hasStopped**: returns if the stoppable has stopped.
* **stop**: requests that the stoppable stops.
* **alsoStop**: registers another stoppable to also stop.
* **onStop**: registers a callback that is run after "stop" has been called.
* **afterStop**: registers a callback that is run after the stoppable has stopped.

**Private methods (are returned as the second return value of the constructor):**

* **resolve**: resolves the stoppable with the given values and marks it as stopped.
npm package: @sanjo-addons/string
Description: This work is devoted to God.
Latest version: 2.0.1

# Lua String

This work is devoted to God.

A library for working with strings. This library can save add-on developers some work.

**Functions included:**

* **String.startsWith**: a function that checks if a string starts with a string.
* **String.join**: a function that joins multiple strings with a delimiter.
* **String.split**: a function that splits a string by a delimiter.

## How to use

Please see "[How to use Library](https://github.com/SanjoSolutions/LuaLibrary#how-to-use)" for how to use this library.
npm package: @sanjo-addons/yielder
Description: A library for helping with yielding in long-running processes. This library can save add-on developers some work.
Latest version: 1.1.0

# Yielder

A library for helping with yielding in long-running processes. This library can save add-on developers some work.

## Things included

* **Yielder.yieldAndResume**: a function for yielding and scheduling a resume. Can only be used in coroutines.
* **Yielder.createYielder**: a function which creates a yielder. The yielder has the methods "yield" and "resume".
* **Yielder.createYielderWithTimeTracking**: a function which creates a yielder with time tracking. In addition to the yielder that is created by "Yielder.createYielder", this yielder has the methods "hasRunOutOfTime" and "yieldAndResumeWhenHasRunOutOfTime".