youtubei.js / Helpers / Memo
Class: Memo
Extends
Map
<string
,YTNode
[]>
Constructors
new Memo()
new Memo(
entries
?):Memo
Parameters
• entries?: null
| readonly readonly [string
, YTNode
[]][]
Returns
Inherited from
Map<string, YTNode[]>.constructor
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.collection.d.ts:50
new Memo()
new Memo(
iterable
?):Memo
Parameters
• iterable?: null
| Iterable
<readonly [string
, YTNode
[]], any
, any
>
Returns
Inherited from
Map<string, YTNode[]>.constructor
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.collection.d.ts:49
Properties
[toStringTag]
readonly
[toStringTag]:string
Inherited from
Map.[toStringTag]
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:137
size
readonly
size:number
Returns
the number of elements in the Map.
Inherited from
Map.size
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.collection.d.ts:45
[species]
readonly
static
[species]:MapConstructor
Inherited from
Map.[species]
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:319
Methods
[iterator]()
[iterator]():
MapIterator
<[string
,YTNode
[]]>
Returns an iterable of entries in the map.
Returns
MapIterator
<[string
, YTNode
[]]>
Inherited from
Map.[iterator]
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.iterable.d.ts:143
clear()
clear():
void
Returns
void
Inherited from
Map.clear
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.collection.d.ts:20
delete()
delete(
key
):boolean
Parameters
• key: string
Returns
boolean
true if an element in the Map existed and has been removed, or false if the element does not exist.
Inherited from
Map.delete
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.collection.d.ts:24
entries()
entries():
MapIterator
<[string
,YTNode
[]]>
Returns an iterable of key, value pairs for every entry in the map.
Returns
MapIterator
<[string
, YTNode
[]]>
Inherited from
Map.entries
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.iterable.d.ts:148
forEach()
forEach(
callbackfn
,thisArg
?):void
Executes a provided function once per each key/value pair in the Map, in insertion order.
Parameters
• callbackfn
• thisArg?: any
Returns
void
Inherited from
Map.forEach
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.collection.d.ts:28
get()
get(
key
):undefined
|YTNode
[]
Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map.
Parameters
• key: string
Returns
undefined
| YTNode
[]
Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned.
Inherited from
Map.get
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.collection.d.ts:33
getType()
getType(types)
getType<
T
,K
>(types
):ObservedArray
<InstanceType
<K
[number
]>>
Type Parameters
• T extends YTNode
• K extends YTNodeConstructor
<T
>[]
Parameters
• types: K
Returns
ObservedArray
<InstanceType
<K
[number
]>>
Defined in
getType(types)
getType<
T
,K
>(...types
):ObservedArray
<InstanceType
<K
[number
]>>
Type Parameters
• T extends YTNode
• K extends YTNodeConstructor
<T
>[]
Parameters
• ...types: K
Returns
ObservedArray
<InstanceType
<K
[number
]>>
Defined in
has()
has(
key
):boolean
Parameters
• key: string
Returns
boolean
boolean indicating whether an element with the specified key exists or not.
Inherited from
Map.has
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.collection.d.ts:37
keys()
keys():
MapIterator
<string
>
Returns an iterable of keys in the map
Returns
MapIterator
<string
>
Inherited from
Map.keys
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.iterable.d.ts:153
set()
set(
key
,value
):this
Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.
Parameters
• key: string
• value: YTNode
[]
Returns
this
Inherited from
Map.set
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.collection.d.ts:41
values()
values():
MapIterator
<YTNode
[]>
Returns an iterable of values in the map
Returns
MapIterator
<YTNode
[]>
Inherited from
Map.values
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.es2015.iterable.d.ts:158
groupBy()
static
groupBy<K
,T
>(items
,keySelector
):Map
<K
,T
[]>
Groups members of an iterable according to the return value of the passed callback.
Type Parameters
• K
• T
Parameters
• items: Iterable
<T
, any
, any
>
An iterable.
• keySelector
A callback which will be invoked for each item in items.
Returns
Map
<K
, T
[]>
Inherited from
Map.groupBy
Defined in
node_modules/.deno/[email protected]/node_modules/typescript/lib/lib.esnext.collection.d.ts:25