Skip to main content
Module

x/bencodex/mod.ts>areValuesEqual

An alternative take on implementing Bencodex in TypeScript/JavaScript
Latest
function areValuesEqual
import { areValuesEqual } from "https://deno.land/x/bencodex@0.2.2/mod.ts";

Checks if the given Bencodex values have the same type and the same contents. In other words, this function checks if the given values are encoded in the same Bencodex data.

Parameters

A Bencodex value to compare.

Another Bencodex value to compare.

Returns

boolean

true iff the given values have the same type and the same contents. It returns false when the given values have invalid types even if they have the same contents, e.g., areValuesEqual(1, 1) returns false (since numbers are not a valid Bencodex type).