UNPKG

datainout

Version:

Import and reports data

26 lines (25 loc) 436 B
// src/helpers/parse-type.ts var TypeParser = class { constructor(opts) { var _a; this.dateFormat = (_a = opts == null ? void 0 : opts.dateFormat) != null ? _a : "DD-MM-YYYY"; } boolean(val) { return val === "true"; } date(val) { return new Date(val); } number(val) { return +val; } object(val) { return JSON.parse(val); } string(val) { return val + ""; } }; export { TypeParser };