libs/toDeepMap.js
function isValidNode(val) {
  const cost = Number(val);

  if (isNaN(cost) || cost <= 0) {
    return false;
  }

  return true;
}
function isValidNode(val) {
  const cost = Number(val);

  if (isNaN(cost) || cost <= 0) {
    return false;
  }

  return true;
}
function isValidNode ( val ) { const cost = Number ( val ) ; if ( isNaN ( cost ) || cost <= 0 ) { return false ; } return true ; }
Validates a cost for a node

@private
@param {number} val - Cost to validate
@return {bool}
Validates a cost for a node