UNPKG

@a11d/equals

Version:

A value equality utility library.

12 lines (11 loc) 330 B
import { equals } from './symbol.js'; // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type Function.prototype[equals] = function (other) { if (this === other) { return true; } if (!(other instanceof Function)) { return false; } return this.toString() === other.toString(); };