mirror of
https://github.com/uetchy/namae.git
synced 2025-08-20 18:08:11 +09:00
chore: compose history middleware
This commit is contained in:
@@ -19,3 +19,7 @@ export function fillArray<T>(array: T[], filler: string, maximum: number): T[] {
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
export function compose<T>(arg: T, ...fn: ((arg: T) => T)[]): T {
|
||||
return fn.reduce((arg, f) => f(arg), arg);
|
||||
}
|
||||
|
Reference in New Issue
Block a user