How to use the @entando/utils.isInteger function in @entando/utils

To help you get started, we’ve selected a few @entando/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github entando / app-builder / src / state / pagination / reducer.js View on Github external
const isLastPageValid = (lastPage) => {
  if (!isInteger(lastPage)) {
    return false;
  }
  return true;
};
github entando / app-builder / src / state / pagination / reducer.js View on Github external
const isPageSizeValid = (pageSize) => {
  if (!isInteger(pageSize) || pageSize < 0) {
    return false;
  }
  return true;
};
github entando / app-builder / src / state / pagination / reducer.js View on Github external
const isTotalItemsValid = totalItems => isInteger(totalItems) && totalItems > 0;
github entando / app-builder / src / state / pagination / reducer.js View on Github external
const isPageValid = (page, lastPage) => {
  if (!isInteger(page) ||
    page < 1 ||
    page > lastPage
  ) {
    return false;
  }
  return true;
};