Podcast
Stentor API Reference / stentor-media/src / Podcast
Class: Podcast
Defined in: packages/stentor-media/src/Podcast.ts:17
Podcast
Note: Potential refactor - should this extend Playlist?
Implementsβ
Extendsβ
RSSFeed\<PodcastEpisode>
Indexableβ
[n: number]: PodcastEpisode
Constructorsβ
Constructorβ
new Podcast(
podcast):Podcast
Defined in: packages/stentor-media/src/Podcast.ts:20
Parametersβ
podcastβ
PodcastProps | Podcast
Returnsβ
Podcast
Overridesβ
Propertiesβ
name?β
optionalname:string
Defined in: packages/stentor-media/src/Playlist.ts:25
Name of the playlist
Inherited fromβ
typeβ
readonlytype:"Podcast"
Defined in: packages/stentor-media/src/Podcast.ts:18
Overridesβ
urlβ
readonlyurl:string
Defined in: packages/stentor-media/src/RSSFeed.ts:25
Inherited fromβ
title?β
readonlyoptionaltitle:string
Defined in: packages/stentor-media/src/RSSFeed.ts:27
Inherited fromβ
description?β
readonlyoptionaldescription:string
Defined in: packages/stentor-media/src/RSSFeed.ts:29
Inherited fromβ
subtitle?β
readonlyoptionalsubtitle:string
Defined in: packages/stentor-media/src/RSSFeed.ts:31
Inherited fromβ
imageUrl?β
readonlyoptionalimageUrl:string
Defined in: packages/stentor-media/src/RSSFeed.ts:33
Inherited fromβ
explicit?β
readonlyoptionalexplicit:boolean
Defined in: packages/stentor-media/src/RSSFeed.ts:35
Inherited fromβ
fetchTime?β
readonlyoptionalfetchTime:number
Defined in: packages/stentor-media/src/RSSFeed.ts:37
Inherited fromβ
[unscopables]β
readonly[unscopables]:object
Defined in: node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:97
Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.
Index Signatureβ
[key: number]: boolean
find?β
optionalfind:boolean
findIndex?β
optionalfindIndex:boolean
fill?β
optionalfill:boolean
copyWithin?β
optionalcopyWithin:boolean
[iterator]?β
optional[iterator]:boolean
entries?β
optionalentries:boolean
keys?β
optionalkeys:boolean
values?β
optionalvalues:boolean
[unscopables]?β
readonlyoptional[unscopables]:boolean
Is an object whose properties have the value 'true' when they will be absent when used in a 'with' statement.
includes?β
optionalincludes:boolean
flatMap?β
optionalflatMap:boolean
flat?β
optionalflat:boolean
at?β
optionalat:boolean
findLast?β
optionalfindLast:boolean
findLastIndex?β
optionalfindLastIndex:boolean
toReversed?β
optionaltoReversed:boolean
toSorted?β
optionaltoSorted:boolean
toSpliced?β
optionaltoSpliced:boolean
with?β
optionalwith:boolean
length?β
optionallength:boolean
Gets or sets the length of the array. This is a number one higher than the highest index in the array.
toString?β
optionaltoString:boolean
toLocaleString?β
optionaltoLocaleString:boolean
pop?β
optionalpop:boolean
push?β
optionalpush:boolean
concat?β
optionalconcat:boolean
join?β
optionaljoin:boolean
reverse?β
optionalreverse:boolean
shift?β
optionalshift:boolean
slice?β
optionalslice:boolean
sort?β
optionalsort:boolean
splice?β
optionalsplice:boolean
unshift?β
optionalunshift:boolean
indexOf?β
optionalindexOf:boolean
lastIndexOf?β
optionallastIndexOf:boolean
every?β
optionalevery:boolean
some?β
optionalsome:boolean
forEach?β
optionalforEach:boolean
map?β
optionalmap:boolean
filter?β
optionalfilter:boolean
reduce?β
optionalreduce:boolean
reduceRight?β
optionalreduceRight:boolean
Inherited fromβ
[species]β
readonlystatic[species]:ArrayConstructor
Defined in: node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts:316
Inherited fromβ
lengthβ
length:
number
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1329
Gets or sets the length of the array. This is a number one higher than the highest index in the array.
Inherited fromβ
Methodsβ
concat()β
concat(
playlist):Playlist\<PodcastEpisode>
Defined in: packages/stentor-media/src/Playlist.ts:77
Combines two or more arrays. This method returns a new array without modifying any existing arrays.
Parametersβ
playlistβ
Playlist\<PodcastEpisode>
Returnsβ
Playlist\<PodcastEpisode>
Inherited fromβ
get()β
get(
token):PodcastEpisode
Defined in: packages/stentor-media/src/Playlist.ts:89
Get an item from the playlist either by index or string, where string is either the token or ID of the item in the playlist.
Parametersβ
tokenβ
string | number
Returnsβ
PodcastEpisode
Inherited fromβ
indexOf()β
indexOf(
playable):number
Defined in: packages/stentor-media/src/Playlist.ts:117
Returns the index of the provided playable or token, -1 if it doesn't exist in the playlist
Parametersβ
playableβ
string | PodcastEpisode
Returnsβ
number
Inherited fromβ
next()β
next(
current?):PodcastEpisode
Defined in: packages/stentor-media/src/Playlist.ts:145
Get the next track in the playlist
Parametersβ
current?β
string | PodcastEpisode
Returnsβ
PodcastEpisode
Inherited fromβ
previous()β
previous(
current?):PodcastEpisode
Defined in: packages/stentor-media/src/Playlist.ts:206
Get the previous track in the playlist
Parametersβ
current?β
string | PodcastEpisode
Returnsβ
PodcastEpisode
Inherited fromβ
latest()β
latest():
PodcastEpisode
Defined in: packages/stentor-media/src/Playlist.ts:229
Get the latest track in the playlist
Returnsβ
PodcastEpisode
Inherited fromβ
toJSON()β
toJSON():
RSSFeedProps\<PodcastEpisode>
Defined in: packages/stentor-media/src/RSSFeed.ts:76
Returnsβ
RSSFeedProps\<PodcastEpisode>
Inherited fromβ
find()β
Call Signatureβ
find\<
S>(predicate,thisArg?):S
Defined in: node_modules/typescript/lib/lib.es2015.core.d.ts:29
Returns the value of the first element in the array where predicate is true, and undefined otherwise.
Type Parametersβ
Sβ
S extends PodcastEpisode
Parametersβ
predicateβ
(value, index, obj) => value is S
find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, find immediately returns that element value. Otherwise, find returns undefined.
thisArg?β
any
If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.
Returnsβ
S
Inherited fromβ
Call Signatureβ
find(
predicate,thisArg?):PodcastEpisode
Defined in: node_modules/typescript/lib/lib.es2015.core.d.ts:30
Parametersβ
predicateβ
(value, index, obj) => unknown
thisArg?β
any
Returnsβ
PodcastEpisode
Inherited fromβ
findIndex()β
findIndex(
predicate,thisArg?):number
Defined in: node_modules/typescript/lib/lib.es2015.core.d.ts:41
Returns the index of the first element in the array where predicate is true, and -1 otherwise.
Parametersβ
predicateβ
(value, index, obj) => unknown
find calls predicate once for each element of the array, in ascending order, until it finds one where predicate returns true. If such an element is found, findIndex immediately returns that element index. Otherwise, findIndex returns -1.
thisArg?β
any
If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.
Returnsβ
number
Inherited fromβ
fill()β
fill(
value,start?,end?):this
Defined in: node_modules/typescript/lib/lib.es2015.core.d.ts:51
Changes all array elements from start to end index to a static value and returns the modified array
Parametersβ
valueβ
PodcastEpisode
value to fill array section with
start?β
number
index to start filling the array at. If start is negative, it is treated as length+start where length is the length of the array.
end?β
number
index to stop filling the array at. If end is negative, it is treated as length+end.
Returnsβ
this
Inherited fromβ
copyWithin()β
copyWithin(
target,start,end?):this
Defined in: node_modules/typescript/lib/lib.es2015.core.d.ts:62
Returns the this object after copying a section of the array identified by start and end to the same array starting at position target
Parametersβ
targetβ
number
If target is negative, it is treated as length+target where length is the length of the array.
startβ
number
If start is negative, it is treated as length+start. If end is negative, it is treated as length+end.
end?β
number
If not specified, length of the this object is used as its default value.
Returnsβ
this
Inherited fromβ
from()β
Call Signatureβ
staticfrom\<T>(arrayLike):T[]
Defined in: node_modules/typescript/lib/lib.es2015.core.d.ts:72
Creates an array from an array-like object.
Type Parametersβ
Tβ
T
Parametersβ
arrayLikeβ
ArrayLike\<T>
An array-like object to convert to an array.
Returnsβ
T[]
Inherited fromβ
Call Signatureβ
staticfrom\<T,U>(arrayLike,mapfn,thisArg?):U[]
Defined in: node_modules/typescript/lib/lib.es2015.core.d.ts:80
Creates an array from an iterable object.
Type Parametersβ
Tβ
T
Uβ
U
Parametersβ
arrayLikeβ
ArrayLike\<T>
An array-like object to convert to an array.
mapfnβ
(v, k) => U
A mapping function to call on every element of the array.
thisArg?β
any
Value of 'this' used to invoke the mapfn.
Returnsβ
U[]
Inherited fromβ
Call Signatureβ
staticfrom\<T>(iterable):T[]
Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:101
Creates an array from an iterable object.
Type Parametersβ
Tβ
T
Parametersβ
iterableβ
An iterable object to convert to an array.
Iterable\<T, any, any> | ArrayLike\<T>
Returnsβ
T[]
Inherited fromβ
Call Signatureβ
staticfrom\<T,U>(iterable,mapfn,thisArg?):U[]
Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:109
Creates an array from an iterable object.
Type Parametersβ
Tβ
T
Uβ
U
Parametersβ
iterableβ
An iterable object to convert to an array.
Iterable\<T, any, any> | ArrayLike\<T>
mapfnβ
(v, k) => U
A mapping function to call on every element of the array.
thisArg?β
any
Value of 'this' used to invoke the mapfn.
Returnsβ
U[]
Inherited fromβ
of()β
staticof\<T>(...items):T[]
Defined in: node_modules/typescript/lib/lib.es2015.core.d.ts:86
Returns a new array from a set of elements.
Type Parametersβ
Tβ
T
Parametersβ
itemsβ
...T[]
A set of elements to include in the new array object.
Returnsβ
T[]
Inherited fromβ
[iterator]()β
[iterator]():
ArrayIterator\<PodcastEpisode>
Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:78
Iterator
Returnsβ
ArrayIterator\<PodcastEpisode>
Inherited fromβ
entries()β
entries():
ArrayIterator\<[number,PodcastEpisode]>
Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:83
Returns an iterable of key, value pairs for every entry in the array
Returnsβ
ArrayIterator\<[number, PodcastEpisode]>
Inherited fromβ
keys()β
keys():
ArrayIterator\<number>
Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:88
Returns an iterable of keys in the array
Returnsβ
ArrayIterator\<number>
Inherited fromβ
values()β
values():
ArrayIterator\<PodcastEpisode>
Defined in: node_modules/typescript/lib/lib.es2015.iterable.d.ts:93
Returns an iterable of values in the array
Returnsβ
ArrayIterator\<PodcastEpisode>
Inherited fromβ
includes()β
includes(
searchElement,fromIndex?):boolean
Defined in: node_modules/typescript/lib/lib.es2016.array.include.d.ts:25
Determines whether an array includes a certain element, returning true or false as appropriate.
Parametersβ
searchElementβ
PodcastEpisode
The element to search for.
fromIndex?β
number
The position in this array at which to begin searching for searchElement.
Returnsβ
boolean
Inherited fromβ
flatMap()β
flatMap\<
U,This>(callback,thisArg?):U[]
Defined in: node_modules/typescript/lib/lib.es2019.array.d.ts:64
Calls a defined callback function on each element of an array. Then, flattens the result into a new array. This is identical to a map followed by flat with depth 1.
Type Parametersβ
Uβ
U
Thisβ
This = undefined
Parametersβ
callbackβ
(this, value, index, array) => U | readonly U[]
A function that accepts up to three arguments. The flatMap method calls the callback function one time for each element in the array.
thisArg?β
This
An object to which the this keyword can refer in the callback function. If thisArg is omitted, undefined is used as the this value.
Returnsβ
U[]
Inherited fromβ
flat()β
flat\<
A,D>(this,depth?):FlatArray\<A,D>[]
Defined in: node_modules/typescript/lib/lib.es2019.array.d.ts:75
Returns a new array with all sub-array elements concatenated into it recursively up to the specified depth.
Type Parametersβ
Aβ
A
Dβ
D extends number = 1
Parametersβ
thisβ
A
depth?β
D
The maximum recursion depth
Returnsβ
FlatArray\<A, D>[]
Inherited fromβ
at()β
at(
index):PodcastEpisode
Defined in: node_modules/typescript/lib/lib.es2022.array.d.ts:24
Returns the item located at the specified index.
Parametersβ
indexβ
number
The zero-based index of the desired code unit. A negative index will count back from the last item.
Returnsβ
PodcastEpisode
Inherited fromβ
findLast()β
Call Signatureβ
findLast\<
S>(predicate,thisArg?):S
Defined in: node_modules/typescript/lib/lib.es2023.array.d.ts:29
Returns the value of the last element in the array where predicate is true, and undefined otherwise.
Type Parametersβ
Sβ
S extends PodcastEpisode
Parametersβ
predicateβ
(value, index, array) => value is S
findLast calls predicate once for each element of the array, in descending order, until it finds one where predicate returns true. If such an element is found, findLast immediately returns that element value. Otherwise, findLast returns undefined.
thisArg?β
any
If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.
Returnsβ
S
Inherited fromβ
Call Signatureβ
findLast(
predicate,thisArg?):PodcastEpisode
Defined in: node_modules/typescript/lib/lib.es2023.array.d.ts:30
Parametersβ
predicateβ
(value, index, array) => unknown
thisArg?β
any
Returnsβ
PodcastEpisode
Inherited fromβ
findLastIndex()β
findLastIndex(
predicate,thisArg?):number
Defined in: node_modules/typescript/lib/lib.es2023.array.d.ts:41
Returns the index of the last element in the array where predicate is true, and -1 otherwise.
Parametersβ
predicateβ
(value, index, array) => unknown
findLastIndex calls predicate once for each element of the array, in descending order, until it finds one where predicate returns true. If such an element is found, findLastIndex immediately returns that element index. Otherwise, findLastIndex returns -1.
thisArg?β
any
If provided, it will be used as the this value for each invocation of predicate. If it is not provided, undefined is used instead.
Returnsβ
number
Inherited fromβ
toReversed()β
toReversed():
PodcastEpisode[]
Defined in: node_modules/typescript/lib/lib.es2023.array.d.ts:46
Returns a copy of an array with its elements reversed.
Returnsβ
PodcastEpisode[]
Inherited fromβ
toSorted()β
toSorted(
compareFn?):PodcastEpisode[]
Defined in: node_modules/typescript/lib/lib.es2023.array.d.ts:57
Returns a copy of an array with its elements sorted.
Parametersβ
compareFn?β
(a, b) => number
Function used to determine the order of the elements. It is expected to return a negative value if the first argument is less than the second argument, zero if they're equal, and a positive value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order.
[11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22]
Returnsβ
PodcastEpisode[]
Inherited fromβ
toSpliced()β
Call Signatureβ
toSpliced(
start,deleteCount, ...items):PodcastEpisode[]
Defined in: node_modules/typescript/lib/lib.es2023.array.d.ts:66
Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array.
Parametersβ
startβ
number
The zero-based location in the array from which to start removing elements.
deleteCountβ
number
The number of elements to remove.
itemsβ
...PodcastEpisode[]
Elements to insert into the copied array in place of the deleted elements.
Returnsβ
PodcastEpisode[]
The copied array.
Inherited fromβ
Call Signatureβ
toSpliced(
start,deleteCount?):PodcastEpisode[]
Defined in: node_modules/typescript/lib/lib.es2023.array.d.ts:74
Copies an array and removes elements while returning the remaining elements.
Parametersβ
startβ
number
The zero-based location in the array from which to start removing elements.
deleteCount?β
number
The number of elements to remove.
Returnsβ
PodcastEpisode[]
A copy of the original array with the remaining elements.
Inherited fromβ
with()β
with(
index,value):PodcastEpisode[]
Defined in: node_modules/typescript/lib/lib.es2023.array.d.ts:85
Copies an array, then overwrites the value at the provided index with the given value. If the index is negative, then it replaces from the end of the array.
Parametersβ
indexβ
number
The index of the value to overwrite. If the index is negative, then it replaces from the end of the array.
valueβ
PodcastEpisode
The value to write into the copied array.
Returnsβ
PodcastEpisode[]
The copied array with the updated value.
Inherited fromβ
toString()β
toString():
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1333
Returns a string representation of an array.
Returnsβ
string
Inherited fromβ
toLocaleString()β
Call Signatureβ
toLocaleString():
string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1337
Returns a string representation of an array. The elements are converted to string using their toLocaleString methods.
Returnsβ
string
Inherited fromβ
Call Signatureβ
toLocaleString(
locales,options?):string
Defined in: node_modules/typescript/lib/lib.es2015.core.d.ts:64
Parametersβ
localesβ
string | string[]
options?β
NumberFormatOptions & DateTimeFormatOptions
Returnsβ
string
Inherited fromβ
pop()β
pop():
PodcastEpisode
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1342
Removes the last element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.
Returnsβ
PodcastEpisode
Inherited fromβ
push()β
push(...
items):number
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1347
Appends new elements to the end of an array, and returns the new length of the array.
Parametersβ
itemsβ
...PodcastEpisode[]
New elements to add to the array.
Returnsβ
number
Inherited fromβ
join()β
join(
separator?):string
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1364
Adds all the elements of an array into a string, separated by the specified separator string.
Parametersβ
separator?β
string
A string used to separate one element of the array from the next in the resulting string. If omitted, the array elements are separated with a comma.
Returnsβ
string
Inherited fromβ
reverse()β
reverse():
PodcastEpisode[]
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1369
Reverses the elements in an array in place. This method mutates the array and returns a reference to the same array.
Returnsβ
PodcastEpisode[]
Inherited fromβ
shift()β
shift():
PodcastEpisode
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1374
Removes the first element from an array and returns it. If the array is empty, undefined is returned and the array is not modified.
Returnsβ
PodcastEpisode
Inherited fromβ
slice()β
slice(
start?,end?):PodcastEpisode[]
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1384
Returns a copy of a section of an array. For both start and end, a negative index can be used to indicate an offset from the end of the array. For example, -2 refers to the second to last element of the array.
Parametersβ
start?β
number
The beginning index of the specified portion of the array. If start is undefined, then the slice begins at index 0.
end?β
number
The end index of the specified portion of the array. This is exclusive of the element at the index 'end'. If end is undefined, then the slice extends to the end of the array.
Returnsβ
PodcastEpisode[]
Inherited fromβ
sort()β
sort(
compareFn?):this
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1395
Sorts an array in place. This method mutates the array and returns a reference to the same array.
Parametersβ
compareFn?β
(a, b) => number
Function used to determine the order of the elements. It is expected to return a negative value if the first argument is less than the second argument, zero if they're equal, and a positive value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order.
[11,2,22,1].sort((a, b) => a - b)
Returnsβ
this
Inherited fromβ
splice()β
Call Signatureβ
splice(
start,deleteCount?):PodcastEpisode[]
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1404
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
Parametersβ
startβ
number
The zero-based location in the array from which to start removing elements.
deleteCount?β
number
The number of elements to remove. Omitting this argument will remove all elements from the start paramater location to end of the array. If value of this argument is either a negative number, zero, undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements.
Returnsβ
PodcastEpisode[]
An array containing the elements that were deleted.
Inherited fromβ
Call Signatureβ
splice(
start,deleteCount, ...items):PodcastEpisode[]
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1414
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
Parametersβ
startβ
number
The zero-based location in the array from which to start removing elements.
deleteCountβ
number
The number of elements to remove. If value of this argument is either a negative number, zero, undefined, or a type that cannot be converted to an integer, the function will evaluate the argument as zero and not remove any elements.
itemsβ
...PodcastEpisode[]
Elements to insert into the array in place of the deleted elements.
Returnsβ
PodcastEpisode[]
An array containing the elements that were deleted.
Inherited fromβ
unshift()β
unshift(...
items):number
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1419
Inserts new elements at the start of an array, and returns the new length of the array.
Parametersβ
itemsβ
...PodcastEpisode[]
Elements to insert at the start of the array.
Returnsβ
number
Inherited fromβ
lastIndexOf()β
lastIndexOf(
searchElement,fromIndex?):number
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1431
Returns the index of the last occurrence of a specified value in an array, or -1 if it is not present.
Parametersβ
searchElementβ
PodcastEpisode
The value to locate in the array.
fromIndex?β
number
The array index at which to begin searching backward. If fromIndex is omitted, the search starts at the last index in the array.
Returnsβ
number
Inherited fromβ
every()β
Call Signatureβ
every\<
S>(predicate,thisArg?):this is S[]
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1440
Determines whether all the members of an array satisfy the specified test.
Type Parametersβ
Sβ
S extends PodcastEpisode
Parametersβ
predicateβ
(value, index, array) => value is S
A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
thisArg?β
any
An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
Returnsβ
this is S[]
Inherited fromβ
Call Signatureβ
every(
predicate,thisArg?):boolean
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1449
Determines whether all the members of an array satisfy the specified test.
Parametersβ
predicateβ
(value, index, array) => unknown
A function that accepts up to three arguments. The every method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value false, or until the end of the array.
thisArg?β
any
An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
Returnsβ
boolean
Inherited fromβ
some()β
some(
predicate,thisArg?):boolean
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1458
Determines whether the specified callback function returns true for any element of an array.
Parametersβ
predicateβ
(value, index, array) => unknown
A function that accepts up to three arguments. The some method calls the predicate function for each element in the array until the predicate returns a value which is coercible to the Boolean value true, or until the end of the array.
thisArg?β
any
An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
Returnsβ
boolean
Inherited fromβ
forEach()β
forEach(
callbackfn,thisArg?):void
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1464
Performs the specified action for each element in an array.
Parametersβ
callbackfnβ
(value, index, array) => void
A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
thisArg?β
any
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Returnsβ
void
Inherited fromβ
map()β
map\<
U>(callbackfn,thisArg?):U[]
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1470
Calls a defined callback function on each element of an array, and returns an array that contains the results.
Type Parametersβ
Uβ
U
Parametersβ
callbackfnβ
(value, index, array) => U
A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
thisArg?β
any
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Returnsβ
U[]
Inherited fromβ
filter()β
Call Signatureβ
filter\<
S>(predicate,thisArg?):S[]
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1476
Returns the elements of an array that meet the condition specified in a callback function.
Type Parametersβ
Sβ
S extends PodcastEpisode
Parametersβ
predicateβ
(value, index, array) => value is S
A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
thisArg?β
any
An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
Returnsβ
S[]
Inherited fromβ
Call Signatureβ
filter(
predicate,thisArg?):PodcastEpisode[]
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1482
Returns the elements of an array that meet the condition specified in a callback function.
Parametersβ
predicateβ
(value, index, array) => unknown
A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
thisArg?β
any
An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
Returnsβ
PodcastEpisode[]
Inherited fromβ
reduce()β
Call Signatureβ
reduce(
callbackfn):PodcastEpisode
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1488
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Parametersβ
callbackfnβ
(previousValue, currentValue, currentIndex, array) => PodcastEpisode
A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
Returnsβ
PodcastEpisode
Inherited fromβ
Call Signatureβ
reduce(
callbackfn,initialValue):PodcastEpisode
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1489
Parametersβ
callbackfnβ
(previousValue, currentValue, currentIndex, array) => PodcastEpisode
initialValueβ
PodcastEpisode
Returnsβ
PodcastEpisode
Inherited fromβ
Call Signatureβ
reduce\<
U>(callbackfn,initialValue):U
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1495
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Type Parametersβ
Uβ
U
Parametersβ
callbackfnβ
(previousValue, currentValue, currentIndex, array) => U
A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
initialValueβ
U
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
Returnsβ
U
Inherited fromβ
reduceRight()β
Call Signatureβ
reduceRight(
callbackfn):PodcastEpisode
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1501
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Parametersβ
callbackfnβ
(previousValue, currentValue, currentIndex, array) => PodcastEpisode
A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
Returnsβ
PodcastEpisode
Inherited fromβ
Call Signatureβ
reduceRight(
callbackfn,initialValue):PodcastEpisode
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1502
Parametersβ
callbackfnβ
(previousValue, currentValue, currentIndex, array) => PodcastEpisode
initialValueβ
PodcastEpisode
Returnsβ
PodcastEpisode
Inherited fromβ
Call Signatureβ
reduceRight\<
U>(callbackfn,initialValue):U
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1508
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
Type Parametersβ
Uβ
U
Parametersβ
callbackfnβ
(previousValue, currentValue, currentIndex, array) => U
A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
initialValueβ
U
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
Returnsβ
U
Inherited fromβ
isArray()β
staticisArray(arg):arg is any[]
Defined in: node_modules/typescript/lib/lib.es5.d.ts:1520
Parametersβ
argβ
any
Returnsβ
arg is any[]
Inherited fromβ
fromAsync()β
Call Signatureβ
staticfromAsync\<T>(iterableOrArrayLike):Promise\<T[]>
Defined in: node_modules/typescript/lib/lib.esnext.array.d.ts:24
Creates an array from an async iterator or iterable object.
Type Parametersβ
Tβ
T
Parametersβ
iterableOrArrayLikeβ
An async iterator or array-like object to convert to an array.
AsyncIterable\<T, any, any> | Iterable\<T | PromiseLike\<T>, any, any> | ArrayLike\<T | PromiseLike\<T>>
Returnsβ
Promise\<T[]>
Inherited fromβ
Call Signatureβ
staticfromAsync\<T,U>(iterableOrArrayLike,mapFn,thisArg?):Promise\<Awaited\<U>[]>
Defined in: node_modules/typescript/lib/lib.esnext.array.d.ts:34
Creates an array from an async iterator or iterable object.
Type Parametersβ
Tβ
T
Uβ
U
Parametersβ
iterableOrArrayLikeβ
An async iterator or array-like object to convert to an array.
AsyncIterable\<T, any, any> | Iterable\<T, any, any> | ArrayLike\<T>
mapFnβ
(value, index) => U
thisArg?β
any
Value of 'this' used when executing mapfn.
Returnsβ
Promise\<Awaited\<U>[]>