@toreda/time
Version:
Simple, small footprint library for common time operations and converting between units of time.
22 lines (21 loc) • 433 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.timeCheckType = void 0;
/**
* Check whether provided object is a Time object.
* @param o
* @returns
*
* @category Validators
*/
function timeCheckType(o) {
if (!o) {
return false;
}
const time = o;
if (!time.type) {
return false;
}
return time.type === 'Time';
}
exports.timeCheckType = timeCheckType;