/*!
 * @techmely/utils
 * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com>
 * MIT Licensed
 */


// src/numberBoundaryStatePrecision.ts
var _boundaryCheckingState = true;
function checkBoundaryPrecision(num) {
  if (_boundaryCheckingState) {
    if (num > Number.MAX_SAFE_INTEGER || num < Number.MIN_SAFE_INTEGER) {
      console.warn(
        `${num} is beyond boundary when transfer to integer, the results may not be accurate`
      );
    }
  }
}
function enableBoundaryCheckingPrecision(flag = true) {
  _boundaryCheckingState = flag;
}

export { checkBoundaryPrecision, enableBoundaryCheckingPrecision };
