UNPKG

@toreda/time

Version:

Simple, small footprint library for common time operations and converting between units of time.

21 lines (20 loc) 401 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.timeCheckType = timeCheckType; /** * 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'; }