CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-deep-eql

Improved deep equality testing for Node.js and the browser with support for complex types and circular references.

Overall
score

96%

Overview
Eval results
Files

task.mdevals/scenario-6/

Temporal Event Matcher

Build a utility that determines if two temporal values represent the same moment, date, or duration. This is useful for matching calendar events, scheduling systems, and time-based comparisons.

Requirements

The utility should support comparing the following temporal types:

Date Comparisons

  • Compare two PlainDate objects and return true if they represent the same calendar date @test
  • Compare two PlainDateTime objects and return true if they represent the same date and time @test

Instant Comparisons

  • Compare two Instant objects and return true if they represent the same absolute moment in time @test

Duration Comparisons

  • Compare two Duration objects and return true if they represent the same length of time @test
  • Correctly compare durations with different unit representations (e.g., 60 seconds vs 1 minute) @test

Implementation

@generates

API

/**
 * Compares two values for deep equality, including support for Temporal API objects.
 *
 * @param {*} value1 - The first value to compare
 * @param {*} value2 - The second value to compare
 * @returns {boolean} True if the values are deeply equal, false otherwise
 */
function compareValues(value1, value2) {
  // IMPLEMENTATION HERE
}

module.exports = { compareValues };

Dependencies { .dependencies }

deep-eql { .dependency }

Provides deep equality comparison with Temporal API support.

Install with Tessl CLI

npx tessl i tessl/npm-deep-eql

tile.json