mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
ef6b95f0c7
* Start * Update * Format * Revert deno.json change --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
20 lines
518 B
TypeScript
20 lines
518 B
TypeScript
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
|
|
|
|
import type { Tester } from "./_types.ts";
|
|
|
|
const customEqualityTesters: Tester[] = [];
|
|
|
|
export function addCustomEqualityTesters(newTesters: Tester[]) {
|
|
if (!Array.isArray(newTesters)) {
|
|
throw new TypeError(
|
|
`customEqualityTester expects an array of Testers. But got ${typeof newTesters}`,
|
|
);
|
|
}
|
|
|
|
customEqualityTesters.push(...newTesters);
|
|
}
|
|
|
|
export function getCustomEqualityTesters() {
|
|
return customEqualityTesters;
|
|
}
|