Array.prototype.flat & Array.prototype.flatMap
Less than 1 minute
Array.prototype.flat
& Array.prototype.flatMap
Types
interface Array<T> {
flat(depthArg: number): Array<T>;
flatMap<U>(
mapFn: (value: T, index: number, target: Array<T>) => U | Array<U>,
thisArg: any
): Array<U>;
}
Entry points
core-js/proposals/array-flat-map