/** * Common equality test function. It is special in the sense that you can enable plain object properties compare and * that it uses a "equal" function if "a" provides one. * * @param {Any} a value or object to compare with b * @param {Any} b value or object to compare with a * @param {Boolean} [enablePlainObjectCompare] shall objects compared based on their properties. * @param {Boolean} [withFunctions] enables function value compare if enablePlainObjectCompare is true. * @returns {Boolean} true if a equals b. * @example * * if( ct.equals(a,b)){ * // do something if true * } */ declare function equals(a: Any, b: Any, enablePlainObjectCompare?: boolean, withFunctions?: boolean): boolean; declare namespace equals { export { equals }; export { equalsOwnProps }; export { equalsProps }; } /** * Tests if all properties specified by propNames are equal in a and b. * * @param {Object} a object to compare with b * @param {Object} b object to compare with a * @param {String|String[]} propNames names of properties to compare in a and b. * @param {Boolean} enablePlainObjectCompare if true then the value of each own property is compared based on the * values properties (if the value is a object). * @param {Boolean} withFunctions enables function value compare if enablePlainObjectCompare is true. * @returns {Boolean} true if a equals b. * @example * * if( ct.equalsProps(a,b,['_a','_b'])){ * // do something if true * } */ declare function equalsProps(a: Object, b: Object, propNames: string | string[], enablePlainObjectCompare: boolean, withFunctions: boolean): boolean; /** * Tests if all properties in a and b are equal. * * @param {Object} a object to compare with b * @param {Object} b object to compare with a * @param {Boolean} enablePlainObjectCompare if true then the value of each own property is compared based on the values * properties (if the value is a object). * @param {Boolean} withFunctions enables function value compare if enablePlainObjectCompare is true. * @returns {Boolean} true if a equals b. * @example * * if( ct.equalsOwnProps(a,b)){ * // do something if true * } */ declare function equalsOwnProps(a: Object, b: Object, enablePlainObjectCompare: boolean, withFunctions: boolean): boolean; export { equals as default, equals, equalsOwnProps, equalsProps };