UNPKG

@thisisagile/easy

Version:

Straightforward library for building domain-driven microservice architectures

11 lines (10 loc) 557 B
export type OneOrMore<T> = T | Array<T>; export type ArrayLike<T> = OneOrMore<T>[]; export declare const toArray: <T>(...items: ArrayLike<T>) => T[]; export declare const toObject: <T>(key: keyof T, ...items: ArrayLike<T>) => Record<string | number | symbol, T>; export declare const array: { merge: (first?: any[], second?: any[], firstKey?: string, secondKey?: string) => any[]; switch: <T>(items: T[] | undefined, item: T) => T[]; splitIn: <T>(items?: T[], length?: number) => T[][]; chunk: <T>(items?: T[], length?: number) => T[][]; };