Function
Static Public Summary | ||
public |
* constant(keys: Iterable, value: any): IterableIterator Creates a mapping from a sequences of keys and a single value. |
|
public |
Instantiate a mapping from a map. |
|
public |
fromObject(object: Object): IterableIterator Instantiate a mapping from an object. |
|
public |
* inverse(mapping: Iterable): IterableIterator Inverse a mapping. |
|
public |
Instantiate a map from a mapping. |
|
public |
Instantiate an object from a mapping. |
Static Public
public * constant(keys: Iterable, value: any): IterableIterator source
import constant from '@iterable-iterator/mapping/src/constant.js'
Creates a mapping from a sequences of keys and a single value. All keys are mapped to that single value.
Params:
Name | Type | Attribute | Description |
keys | Iterable | ||
value | any |
Return:
IterableIterator | The output mapping. |
public fromMap(map: Map): IterableIterator source
import fromMap from '@iterable-iterator/mapping/src/fromMap.js'
Instantiate a mapping from a map.
Params:
Name | Type | Attribute | Description |
map | Map | The input map. |
Return:
IterableIterator | The output mapping. |
public fromObject(object: Object): IterableIterator source
import fromObject from '@iterable-iterator/mapping/src/fromObject.js'
Instantiate a mapping from an object.
Params:
Name | Type | Attribute | Description |
object | Object | The input object. |
Return:
IterableIterator | The output mapping. |
public * inverse(mapping: Iterable): IterableIterator source
import inverse from '@iterable-iterator/mapping/src/inverse.js'
Inverse a mapping.
Params:
Name | Type | Attribute | Description |
mapping | Iterable | The input mapping. |
Return:
IterableIterator | The output mapping. |
public toMap(mapping: Iterable): Map source
import toMap from '@iterable-iterator/mapping/src/toMap.js'
Instantiate a map from a mapping.
Params:
Name | Type | Attribute | Description |
mapping | Iterable | The input mapping. |
public toObject(mapping: Iterable): Object source
import toObject from '@iterable-iterator/mapping/src/toObject.js'
Instantiate an object from a mapping.
Params:
Name | Type | Attribute | Description |
mapping | Iterable | The input mapping. |