UNPKG

@alcorexchange/alcor-swap-sdk

Version:

​​ **npm** ``` npm i @alcorexchange/alcor-swap-sdk ``` **yarn** ``` yarn add @alcorexchange/alcor-swap-sdk ``` ## Usage ### Import:

20 lines (19 loc) 426 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isSorted = isSorted; /** * Determines if a tick list is sorted * @param list The tick list * @param comparator The comparator * @returns true if sorted */ function isSorted(list, comparator) { for (let i = 0; i < list.length - 1; i++) { if (comparator(list[i], list[i + 1]) > 0) { return false; } } return true; }