docs(typedoc): document function examples
This commit is contained in:
@@ -22,8 +22,26 @@
|
||||
*
|
||||
* @remarks uses JSON.stringify()
|
||||
*
|
||||
* @param obj1 - first object to compare with second
|
||||
* @param obj2 - second object to compare with first
|
||||
* @example
|
||||
* ```ts
|
||||
* // prints false
|
||||
* console.log(isDeepWeakEqual({ a: 1 }, ["lorem"]))
|
||||
*
|
||||
* // prints true
|
||||
* console.log(isDeepWeakEqual({ a: 1 }, { a: 1 }))
|
||||
*
|
||||
* // prints true
|
||||
* // snippet displaying the weak equality of this function
|
||||
* console.log(
|
||||
* isDeepWeakEqual(
|
||||
* { date: "2024-03-12T18:19:50.548Z" },
|
||||
* { date: new Date(1710267590548) },
|
||||
* ),
|
||||
* );
|
||||
* ```
|
||||
*
|
||||
* @param obj1 - first object for comparison
|
||||
* @param obj2 - second object for comparison
|
||||
* @returns true if equal
|
||||
*/
|
||||
export const isDeepWeakEqual = (obj1: object, obj2: object) =>
|
||||
|
||||
Reference in New Issue
Block a user