Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
9 lines (6 sloc) 247 Bytes
import { map } from './map';
import { flat } from './flat';
type FlatMapCallback<T> = (value: T, index: number, array: T[]) => T[];
export function flatMap<T>(array: T[], callback: FlatMapCallback<T>) {
return flat(map(array, callback), 1);
}
You can’t perform that action at this time.