cmpUint8Array3.js 496 B

123456789101112131415161718
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.cmpUint8Array3 = void 0;
  4. const cmpUint8Array3 = (a, b) => {
  5. const len1 = a.length;
  6. const len2 = b.length;
  7. const diff = len1 - len2;
  8. if (diff !== 0)
  9. return diff;
  10. for (let i = 0; i < len1; i++) {
  11. const diff = a[i] - b[i];
  12. if (diff !== 0)
  13. return diff;
  14. }
  15. return 0;
  16. };
  17. exports.cmpUint8Array3 = cmpUint8Array3;
  18. //# sourceMappingURL=cmpUint8Array3.js.map