@toreda/time
Version:
Simple, small footprint library for common time operations and converting between units of time.
24 lines (23 loc) • 604 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.timeValid = void 0;
const methods_1 = require("./check/methods");
const type_1 = require("./check/type");
/**
* Determine if target object is a valid Time object. Inspects object for
* all required properties and methods to determine validity.
* @param o
* @returns
*
* @category Validators
*/
function timeValid(o) {
if (!(0, type_1.timeCheckType)(o)) {
return false;
}
if (!(0, methods_1.timeCheckMethods)(o)) {
return false;
}
return true;
}
exports.timeValid = timeValid;