UNPKG

@qntm-code/utils

Version:

A collection of useful utility functions with associated TypeScript types. All functions have been unit tested.

13 lines (12 loc) 439 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.convertTimeUnit = void 0; const index_js_1 = require("./index.js"); /** * Converts a value of a given TimeUnit into another TimeUnit */ function convertTimeUnit(value, sourceUnit, resultUnit) { const ms = (0, index_js_1.unitToMS)(value, sourceUnit); return (0, index_js_1.msToUnit)(ms, resultUnit); } exports.convertTimeUnit = convertTimeUnit;