export type List = Array | Set; /** Get the first item in the array */ export declare function first(arr: Array): T; /** Get the last item in the array */ export declare function last(arr: Array): T; /** Check if the list includes the item */ export declare function has(list: List | undefined, item: T): boolean; /** Add the items to the list */ export declare function append(list: List, items: List): List; /** Add the item(s) to the list */ export declare function add(list: List, ...items: Array): List; /** Add or remove the item within the set based on whether a flag is truthy */ export declare function toggle(list: Set, value: T | Array, flag: any): Set; /** Get a new array with only truthy and non-duplicates returned */ export declare function unique(list: Array): T[]; /** * Get the distinct elements from both the lists. * Given two sets A and B, their union is the set consisting of all objects which are elements of A or of B or of both (see axiom of union). It is denoted by A ∪ B. * https://en.wikipedia.org/wiki/Naive_set_theory * @param list The left subset. * @param include The right subset. * @returns the superset/combination of both lists, without redundancy. */ export declare function union(list: Array, include: Array): T[]; /** * Get the elements from the list that only also exist within the other list. * The intersection of A and B is the set of all objects which are both in A and in B. It is denoted by A ∩ B. * https://en.wikipedia.org/wiki/Naive_set_theory * @param list The left set to intersect. * @param allowlist The right set to intersect. * @returns the intersection, the values that are within both sets */ export declare function intersect(list: Array, allowlist: Array): T[]; /** * Get the list without elements from the other list. * Finally, the relative complement of B relative to A, also known as the set theoretic difference of A and B, is the set of all objects that belong to A but not to B. It is written as A \ B or A − B. * https://en.wikipedia.org/wiki/Naive_set_theory * @param list The superset. * @param blacklist The excluded subset. */ export declare function complement(list: Array, blacklist: Array): T[]; /** Flatten the array, merging any nested array no matter the depth, into a single array. */ export declare function flatten(list: Array>): Array; /** Fetch every item in the list, until a particular one. */ export declare function until(list: List, until: T, inclusive?: boolean): Array; //# sourceMappingURL=index.d.ts.map