1.2.32 • Published 7 years ago
@clarketm/supermap v1.2.32
Map
Map with superpowers! 💪
This data structure inherit all methods and properties from the
Mapbuilt-in.
Individual Module Installation
Yarn
$ yarn add @clarketm/supermapNpm
$ npm install @clarketm/supermap --saveAPI
constructor(iterable: Iterable)
Construct a Map
some(callback: Callback): boolean
Tests whether at least one element in the map passes the test implemented by the provided function
| Name | Type | Attribute | Description |
|---|---|---|---|
| callback | Callback | callback function |
every(callback: Callback): boolean
Test whether all elements in the map pass the test implemented by the provided function
| Name | Type | Attribute | Description |
|---|---|---|---|
| callback | Callback | callback function |
setDefault(key: Item, defaultValue: Item): Item
Similar to get(), but will set key to defaultValue if key is not already in Map.
| Name | Type | Attribute | Description |
|---|---|---|---|
| key | Item | Map key | |
| defaultValue | Item | the default value to set in Map if the key is not defined |
toObject(): object
Convert Map to an Object
1.2.32
7 years ago
1.2.31
7 years ago
1.2.25
7 years ago
1.2.20
7 years ago
1.2.18
7 years ago
1.2.17
7 years ago
1.2.16
7 years ago
1.2.15
7 years ago
1.2.14
7 years ago
1.2.13
7 years ago
1.2.11
7 years ago
1.2.6
7 years ago
1.2.5
7 years ago
1.2.4
7 years ago
1.2.2
7 years ago
1.2.1
7 years ago
0.0.1
7 years ago
1.1.4
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago