You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gristlabs_grist-core/app/plugin/gutil.ts

12 lines
316 B

import constant = require('lodash/constant');
import times = require('lodash/times');
/**
* Returns a new array of length count, filled with the given value.
*/
export function arrayRepeat<T>(count: number, value: T): T[] {
return times(count, constant(value));
}
export type MaybePromise<T> = T | Promise<T>;