"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.toNumber = void 0;

/**
 * Takes any import runs `Number(input)` returns the number or 0 if NaN
 *
 * @param {any} input
 * @returns {number}
 */
const toNumber = input => {
  const num = Number(input);
  return isNaN(num) ? 0 : num;
};

exports.toNumber = toNumber;