@datasworn/core
Version:
Typings and JSON schema common to Datasworn. This is a pre-release package, provided for developer feedback. It will almost certainly receive breaking changes.
15 lines (14 loc) • 429 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.arrayIs = void 0;
function arrayIs(a, b) {
if (a.length !== b.length)
return false;
return a.every((valueA, i) => {
const valueB = b[i];
if (Array.isArray(valueA) && Array.isArray(valueB))
return arrayIs(valueA, valueB);
return Object.is(valueA, valueB);
});
}
exports.arrayIs = arrayIs;