UNPKG

node-noise

Version:
25 lines 584 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.compare = void 0; /** * Can be used with Array.sort to sort and array with Uint8Array entries */ function compare(a, b) { for (var i = 0; i < a.byteLength; i++) { if (a[i] < b[i]) { return -1; } if (a[i] > b[i]) { return 1; } } if (a.byteLength > b.byteLength) { return 1; } if (a.byteLength < b.byteLength) { return -1; } return 0; } exports.compare = compare; //# sourceMappingURL=compare.js.map