crystalline
Version:
A modern utility library with a strong emphasis on readability. Make your code crystal clear.
20 lines (19 loc) • 647 B
TypeScript
declare const alter: <T>(arr: T[]) => {
byApplying: (transformer: (a: T) => any) => {
atIndex: (index: number) => T[];
};
byInsertingBetweenEachItem: (value: any) => any[];
byMovingItemAtIndex: (fromIndex: number) => {
toIndex: (toIndex: number) => T[];
toTheStart: () => T[];
toTheEnd: () => T[];
};
byRemovingItemsBetweenIndex: (fromIndex: number) => {
andIndex: (toIndex: number) => T[];
andTheEnd: () => T[];
};
byRemovingDuplicates: () => T[];
byRemovingItemsEqualTo: (...itemsToRemove: T[]) => T[];
byRemovingFalsyItems: () => T[];
};
export { alter };