Skip to content

Commit fdd1c24

Browse files
committed
docs: improve a comment
1 parent cede27a commit fdd1c24

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib/deep_equal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* - Compares by constructor to prevent type confusion (security: `{}` ≠ `[]`, `{}` ≠ `new Map()`, `new ClassA()` ≠ `new ClassB()`)
77
* - Prevents asymmetry bugs: `deep_equal(a, b)` always equals `deep_equal(b, a)`
88
* - Compares only enumerable own properties (ignores prototypes, symbols, non-enumerable)
9-
* - Special handling for: Date (timestamp), Number/Boolean (boxed primitives)
9+
* - Special handling for: Date (timestamp), Number/Boolean (boxed primitives), Error (message/name + enumerable own properties)
1010
* - Promises always return false (cannot be meaningfully compared)
1111
* - Maps/Sets compare by reference for object keys/values
1212
*

src/routes/library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2390,7 +2390,7 @@
23902390
{
23912391
"name": "deep_equal",
23922392
"kind": "function",
2393-
"doc_comment": "Deep equality comparison that checks both structure and type.\n\nKey behaviors:\n\n- Compares by constructor to prevent type confusion (security: `{}` ≠ `[]`, `{}` ≠ `new Map()`, `new ClassA()` ≠ `new ClassB()`)\n- Prevents asymmetry bugs: `deep_equal(a, b)` always equals `deep_equal(b, a)`\n- Compares only enumerable own properties (ignores prototypes, symbols, non-enumerable)\n- Special handling for: Date (timestamp), Number/Boolean (boxed primitives)\n- Promises always return false (cannot be meaningfully compared)\n- Maps/Sets compare by reference for object keys/values",
2393+
"doc_comment": "Deep equality comparison that checks both structure and type.\n\nKey behaviors:\n\n- Compares by constructor to prevent type confusion (security: `{}` ≠ `[]`, `{}` ≠ `new Map()`, `new ClassA()` ≠ `new ClassB()`)\n- Prevents asymmetry bugs: `deep_equal(a, b)` always equals `deep_equal(b, a)`\n- Compares only enumerable own properties (ignores prototypes, symbols, non-enumerable)\n- Special handling for: Date (timestamp), Number/Boolean (boxed primitives), Error (message/name + enumerable own properties)\n- Promises always return false (cannot be meaningfully compared)\n- Maps/Sets compare by reference for object keys/values",
23942394
"source_line": 17,
23952395
"type_signature": "(a: unknown, b: unknown): boolean",
23962396
"return_type": "boolean",

0 commit comments

Comments
 (0)