/** * 'Destructures' properties from object - returns a new object only containing those properties that were asked for (including if those properties * have values that are falsy: null, undefined, false, ''). * * @param propertiesToKeep - property names to select: can be either 'regular' arguments (comma separated list) or an array * @returns - an object with a function 'from' that accepts a single argument - the object from which to choose properties. * This function returns a new object - a copy of the original but only including the desired properties * * @example const strippedObj = pick('cardType', 'securityCode').from(cardObject); * @example const strippedObj = pick(['cardType', 'securityCode']).from(cardObject); */ export declare const pick: (...propertiesToKeep: (string | number | symbol)[]) => { from: (obj: T) => T; }; /** *'Destructures' properties from object, returning a new object containing all the original objects properties except those that were specifically rejected * * @param propertiesToDrop - property names to reject: can be either 'regular' arguments (comma separated list) or an array * @returns - an object with a function 'from' that accepts a single argument - the object from which to reject properties. * This function returns a new object - a copy of the original but excluding the selected properties * * @example const strippedObj = drop('permittedLengths', 'pattern', 'startingRules').from(cardObject); * @example const strippedObj = drop(['permittedLengths', 'pattern', 'startingRules']).from(cardObject); */ export declare const drop: (...propertiesToDrop: Property[]) => { from: >>(obj: T) => Omit; }; /** * Compares 2 arrays of (primitive) values to see if they are the same * re. https://sebhastian.com/javascript-compare-array/ */ export declare const doArraysMatch: (arr1: T[] | readonly T[], arr2: T[] | readonly T[]) => boolean; /** * Recursively compare 2 objects */ export declare const objectsDeepEqual: (x: unknown, y: unknown) => boolean; export declare function cloneObject(object: T): T; export declare function cloneObject(object: T[]): T[]; type ListifyOptions = { type?: Intl.ListFormatOptions['type']; style?: Intl.ListFormatOptions['style']; stringify?: (item: ItemType) => string; }; export declare function listify(array: ItemType[], { type, style, stringify, }?: ListifyOptions): string; export declare const noop: () => void; export declare const asyncNoop: () => Promise; export {};