UNPKG

mongo-dot-notation

Version:
17 lines (16 loc) 505 B
export interface Operator { } /** * Checks if a given object is an operator. * @example * ```ts * isOperator($set(1)); // true * isOperator({}); // false * ``` * @param obj the object to check * @returns `true` if the objects is an operator */ export declare const isOperator: <T>(obj: T) => boolean; export declare const getType: (operator: any) => any; export declare const getValue: (operator: any) => any; export declare const create: <T, U = Operator>(type: string, value: T, obj?: U) => U;