UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

11 lines 360 B
/** * @public * Like `Array.push` but checks if the value is unique first. * * @returns true if an element was pushed. * * @remarks * See {@link arrayPushUnique}. */ export declare function arrayPushUnique<TItem>(items: TItem[], itemToPush: TItem, getComparisonValue?: (item: TItem) => unknown): boolean; //# sourceMappingURL=array-push-unique.d.ts.map