Improved deep equality testing for Node.js and the browser with support for complex types and circular references.
Overall
score
96%
{
"context": "This criteria evaluates how effectively the engineer uses the deep-eql package to implement a data structure validator. It focuses on proper import and usage of the deepEqual function, understanding of its capabilities for handling nested structures and edge cases, and ability to leverage the package to solve the problem concisely.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Import deep-eql",
"description": "Correctly imports the deepEqual function from the deep-eql package (e.g., using require('deep-eql') or import deepEqual from 'deep-eql')",
"max_score": 20
},
{
"name": "Use deepEqual function",
"description": "Uses the deepEqual function as the primary mechanism for comparing actual and expected values in the validate function",
"max_score": 30
},
{
"name": "Nested structure handling",
"description": "Relies on deepEqual's recursive comparison to handle nested objects and arrays without implementing custom traversal logic",
"max_score": 15
},
{
"name": "NaN comparison support",
"description": "Leverages deepEqual's built-in NaN handling where NaN equals NaN (rather than implementing custom NaN checks)",
"max_score": 10
},
{
"name": "Signed zero distinction",
"description": "Relies on deepEqual's ability to distinguish between +0 and -0 (rather than implementing custom signed zero logic)",
"max_score": 10
},
{
"name": "Date comparison",
"description": "Uses deepEqual for Date object comparison which compares timestamps via valueOf() (rather than implementing custom Date logic)",
"max_score": 5
},
{
"name": "RegExp comparison",
"description": "Uses deepEqual for RegExp comparison which compares pattern and flags (rather than implementing custom RegExp logic)",
"max_score": 5
},
{
"name": "Circular reference support",
"description": "Relies on deepEqual's built-in circular reference handling without implementing custom circular reference detection or prevention",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-deep-eqldocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10