MiniMap

The default Store Option for Players and Nodes.

extends Map

Constructor

new MiniMap(data?: [ [key, value], [key, value] ])

Import

index.ts
import { MiniMap } from "lavalink-client";

Overview

Properties
Methods (from Map)
Methods (added)


Properties

.size

Returns the Amount of entries

Type: number

Methods

.get(key:any)

Get a value of a key

Returns: any

.set(key:any, value:any)

Sets a Value into a key, if Key already exists then it gets overridden

Returns: value:any

.has(key:any)

Checks if the key is existing or not

Returns: boolean

.delete(key:any)

Deletes a key, if available, if not available nothing will happen

Returns: any

.clear()

Clears the entire Map

Returns: void

.entries()

Get an iterator of all entries, if you want to put the entries into an array do this:

`[...map.entries()]`

Returns: IterableIterator<[Key,Value]>

.values()

Get an iterator of all values, if you want to put the entries into an array do this:

`[...map.values()]`

Returns: IterableIterator<[Value]>

.keys()

Get an iterator of all keys, if you want to put the entries into an array do this:

`[...map.keys()]`

Returns: IterableIterator<[Key]>

.forEach(fn:(value,key,map)=>void)

Run a function upon every entry.

Returns: void

Extended Methods

.map(fn:(value,key,map)=>any)

Run a function upon every entry.

Returns: void

.filter(fn:(value,key,map)=>boolean)

Identical to Array.filter(), but returns a MiniMap instead of an Array.

Returns: MiniMap<Key, Value>

.toJSON()

Returns the Map to a JSON like value, just executes this.entries and formats is an array instead

Returns: [Key, Value][]

Last updated