import { helper } from '@ember/component/helper';

const NUMBER = 'number';
const BOOLEAN = 'boolean';
const STRING = 'string';
function castTo([that], {
  to = NUMBER
}) {
  let toLower = to?.toLowerCase();
  switch (toLower) {
    case NUMBER:
      return Number(that);
    case STRING:
      return String(that);
    case BOOLEAN:
      return Boolean(that);
    default:
      return Number(that);
  }
}
var castTo$1 = helper(castTo);

export { castTo, castTo$1 as default };
//# sourceMappingURL=cast-to.js.map
