UNPKG

@a11d/equals

Version:

A value equality utility library.

14 lines (13 loc) 306 B
import { equals } from './symbol.js'; Set.prototype[equals] = function (other) { if (this === other) { return true; } if (!(other instanceof Set)) { return false; } if (this.size !== other.size) { return false; } return [...this][equals]([...other]); };