tap-yaml
Version:
Yaml handling for TAP parsers and generators
21 lines • 525 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.date = void 0;
exports.date = {
tag: '!date',
// use !!timestamp instead, this is for parsing only
/* c8 ignore start */
identify() {
return false;
},
/* c8 ignore stop */
resolve(src) {
const d = new Date(src);
const t = d.getTime();
if (t !== t) {
throw new Error(`Invalid date string: ${src}`);
}
return d;
},
};
//# sourceMappingURL=date.js.map