"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.parseBooleanAttr = parseBooleanAttr;
exports.parseDateAttr = parseDateAttr;
exports.parseIntegerAttr = parseIntegerAttr;
function parseBooleanAttr(attr) {
  // If it's defined but has no value, we count that as `true`.
  return attr !== undefined && attr !== 'false';
}
function parseDateAttr(attr) {
  return attr ? new Date(attr) : undefined;
}
function parseIntegerAttr(attr) {
  if (attr !== undefined) return parseInt(attr);
}