## API Report File for "@jsplumb/util"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

// @public
export function add(p1: PointXY, p2: PointXY): PointXY;

// Warning: (ae-internal-missing-underscore) The name "addToDictionary" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function addToDictionary<T>(map: Record<string, Array<T>>, key: string, value: any, insertAtStart?: boolean): Array<any>;

// Warning: (ae-internal-missing-underscore) The name "addToList" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function addToList<T>(map: Map<string, Array<T>>, key: string, value: any, insertAtStart?: boolean): Array<any>;

// Warning: (ae-internal-missing-underscore) The name "addWithFunction" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function addWithFunction<T>(list: Array<T>, item: T, hashFunction: (_a: T) => boolean): void;

// Warning: (ae-internal-missing-underscore) The name "arraysEqual" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function arraysEqual(a: Array<any>, b: Array<any>): boolean;

// @public
export type BoundingBox = {
    x: number;
    y: number;
    w: number;
    h: number;
    center?: PointXY;
};

// Warning: (ae-internal-missing-underscore) The name "clone" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function clone(a: any): any;

// @public
export type Constructable<T> = {
    new (...args: any[]): T;
};

// Warning: (ae-internal-missing-underscore) The name "each" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function each(obj: any, fn: Function): void;

// @public
export function encloses(r1: RectangleXY, r2: RectangleXY, allowSharedEdges?: boolean): boolean;

// @public
export abstract class EventGenerator {
    constructor();
    bind<T = any>(event: string | Array<String>, listener: (a: T, e?: any) => any, insertAtStart?: boolean): EventGenerator;
    fire<T>(event: string, value?: T, originalEvent?: Event): any;
    getListener(forEvent: string): Array<any>;
    isSuspendEvents(): boolean;
    setSuspendEvents(val: boolean): void;
    // (undocumented)
    protected abstract shouldFireEvent(event: string, value: any, originalEvent?: Event): boolean;
    silently(fn: Function): void;
    unbind(eventOrListener?: string | Function, listener?: Function): EventGenerator;
}

// @public
export function extend<T>(o1: T, o2: T, keys?: string[]): T;

// Warning: (ae-internal-missing-underscore) The name "Extents" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export interface Extents {
    // (undocumented)
    xmax: number;
    // (undocumented)
    xmin: number;
    // (undocumented)
    ymax: number;
    // (undocumented)
    ymin: number;
}

// @public
export function fastTrim(s: string): string;

// Warning: (ae-internal-missing-underscore) The name "filterList" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function filterList(list: Array<any> | string, value: any, missingIsFalse?: boolean): boolean;

// Warning: (ae-internal-missing-underscore) The name "filterNull" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function filterNull(obj: Record<string, any>): Record<string, any>;

// Warning: (ae-internal-missing-underscore) The name "findAllWithFunction" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function findAllWithFunction<T>(a: ArrayLike<T>, predicate: (_a: T) => boolean): Array<number>;

// Warning: (ae-internal-missing-underscore) The name "findWithFunction" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function findWithFunction<T>(a: ArrayLike<T>, f: (_a: T) => boolean): number;

// @public
export function fixPrecision(n: number, digits?: number): number;

// Warning: (ae-internal-missing-underscore) The name "forEach" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function forEach<T>(a: ArrayLike<T>, f: (_a: T) => any): void;

// Warning: (ae-internal-missing-underscore) The name "fromArray" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function fromArray<T>(a: ArrayLike<T>): Array<T>;

// Warning: (ae-internal-missing-underscore) The name "functionChain" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function functionChain(successValue: any, failValue: any, fns: Array<Array<any>>): any;

// Warning: (ae-internal-missing-underscore) The name "getAllWithFunction" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function getAllWithFunction<T>(a: ArrayLike<T>, f: (_a: T) => boolean): Array<T>;

// Warning: (ae-internal-missing-underscore) The name "getFromSetWithFunction" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function getFromSetWithFunction<T>(s: Set<T>, f: (_a: T) => boolean): T;

// @public
export function getsert<K, V>(map: Map<K, V>, key: K, valueGenerator: () => V): V;

// Warning: (ae-internal-missing-underscore) The name "getWithFunction" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function getWithFunction<T>(a: ArrayLike<T>, f: (_a: T) => boolean): T;

// @public
export function gradient(p1: PointXY, p2: PointXY): number;

// @public
export interface Grid extends Size {
    // (undocumented)
    thresholdX?: number;
    // (undocumented)
    thresholdY?: number;
}

// @public
export function insertSorted<T>(value: T, array: Array<T>, comparator: (v1: T, v2: T) => number, sortDescending?: boolean): void;

// @public
export function intersects(r1: RectangleXY, r2: RectangleXY): boolean;

// @public
export function isAssignableFrom(object: any, cls: any): boolean;

// @public
export function isBoolean(s: any): boolean;

// @public
export function isDate(o: any): o is Date;

// @public
export function isEmpty(o: any): boolean;

// @public
export function isFunction(o: any): o is Function;

// @public
export function isNamedFunction(o: any): boolean;

// @public
export function isNumber(n: any): boolean;

// @public
export function isObject(o: any): boolean;

// @public
export function isString(s: any): boolean;

// @public
export function lineIntersection(l1: LineXY, l2: LineXY): PointXY | null;

// @public
export function lineLength(p1: PointXY, p2: PointXY): number;

// @public
export function lineRectangleIntersection(line: LineXY, r: RectangleXY): Array<PointXY>;

// @public
export type LineXY = [PointXY, PointXY];

// Warning: (ae-internal-missing-underscore) The name "log" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function log(...args: string[]): void;

// @public
export const logEnabled: boolean;

// Warning: (ae-internal-missing-underscore) The name "map" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function map(obj: any, fn: Function): any[];

// Warning: (ae-internal-missing-underscore) The name "Merge" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export type Merge<M, N> = Omit_2<M, Extract<keyof M, keyof N>> & N;

// Warning: (ae-internal-missing-underscore) The name "merge" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function merge(a: Record<string, any>, b: Record<string, any>, collations?: Array<string>, overwrites?: Array<string>): any;

// @public
export function normal(p1: PointXY, p2: PointXY): number;

// Warning: (ae-internal-missing-underscore) The name "objectsEqual" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function objectsEqual(a: Record<string, any>, b: Record<string, any>): boolean;

// @internal
type Omit_2<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;

// Warning: (ae-internal-missing-underscore) The name "Omit" should be prefixed with an underscore because the declaration is marked as @internal
export { Omit_2 as Omit }

// @public
export class OptimisticEventGenerator extends EventGenerator {
    // (undocumented)
    shouldFireEvent(event: string, value: any, originalEvent?: Event): boolean;
}

// @public
export function perpendicularLineTo(fromPoint: PointXY, toPoint: PointXY, length: number): LineXY;

// @public
export function pointOnLine(fromPoint: PointXY, toPoint: PointXY, distance: number): PointXY;

// @public
export interface PointXY {
    // (undocumented)
    theta?: number;
    // (undocumented)
    x: number;
    // (undocumented)
    y: number;
}

// Warning: (ae-internal-missing-underscore) The name "populate" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function populate(model: any, values: any, functionPrefix?: string, doNotExpandFunctions?: boolean): any;

// @public (undocumented)
export type Quadrant = 1 | 2 | 3 | 4;

// @public
export function quadrant(p1: PointXY, p2: PointXY): Quadrant;

// @public
export type RectangleXY = BoundingBox;

// Warning: (ae-internal-missing-underscore) The name "remove" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function remove<T>(l: Array<T>, v: T): boolean;

// Warning: (ae-internal-missing-underscore) The name "removeWithFunction" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function removeWithFunction<T>(a: Array<T>, f: (_a: T) => boolean): boolean;

// Warning: (ae-internal-missing-underscore) The name "replace" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function replace(inObj: any, path: string, value: any): any;

// Warning: (ae-internal-missing-underscore) The name "rotateAnchorOrientation" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function rotateAnchorOrientation(orientation: [number, number], rotation: any): [number, number];

// Warning: (ae-internal-missing-underscore) The name "RotatedPointXY" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export interface RotatedPointXY extends PointXY {
    // (undocumented)
    cr: number;
    // (undocumented)
    sr: number;
}

// Warning: (ae-incompatible-release-tags) The symbol "rotatePoint" is marked as @public, but its signature references "RotatedPointXY" which is marked as @internal
//
// @public
export function rotatePoint(point: PointXY, center: PointXY, rotation: number): RotatedPointXY;

// Warning: (ae-internal-missing-underscore) The name "Rotation" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export interface Rotation {
    // (undocumented)
    c: PointXY;
    // (undocumented)
    r: number;
}

// Warning: (ae-internal-missing-underscore) The name "Rotations" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export type Rotations = Array<Rotation>;

// Warning: (ae-internal-missing-underscore) The name "setToArray" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function setToArray<T>(s: Set<T>): Array<T>;

// @public
export function sgn(x: number): -1 | 0 | 1;

// @public
export interface Size {
    // (undocumented)
    h: number;
    // (undocumented)
    w: number;
}

// @public
export function snapToGrid(pos: PointXY, grid: Grid, thresholdX?: number, thresholdY?: number): PointXY;

// Warning: (ae-internal-missing-underscore) The name "SortFunction" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export type SortFunction<T> = (a: T, b: T) => number;

// @public
export function subtract(p1: PointXY, p2: PointXY): PointXY;

// Warning: (ae-internal-missing-underscore) The name "suggest" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function suggest(list: Array<any>, item: any, insertAtHead?: boolean): boolean;

// @public
export function theta(p1: PointXY, p2: PointXY): number;

// @public
export const TWO_PI: number;

// @public
export function uuid(): string;

// Warning: (ae-internal-missing-underscore) The name "wrap" should be prefixed with an underscore because the declaration is marked as @internal
//
// @internal
export function wrap(wrappedFunction: Function, newFunction: Function, returnOnThisValue?: any): () => any;

```
