registration

This commit is contained in:
User
2025-02-02 16:08:03 +03:00
parent 7f6495eb4d
commit 78afbaed71
6334 changed files with 196774 additions and 165754 deletions

View File

@@ -1,6 +1,4 @@
"use strict";
exports.hoursToSeconds = hoursToSeconds;
var _index = require("./constants.js");
import { secondsInHour } from "./constants.js";
/**
* @name hoursToSeconds
@@ -10,8 +8,6 @@ var _index = require("./constants.js");
* @description
* Convert a number of hours to a full number of seconds.
*
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
*
* @param hours - The number of hours to be converted
*
* @returns The number of hours converted in seconds
@@ -21,6 +17,9 @@ var _index = require("./constants.js");
* const result = hoursToSeconds(2)
* //=> 7200
*/
function hoursToSeconds(hours) {
return Math.trunc(hours * _index.secondsInHour);
export function hoursToSeconds(hours) {
return Math.trunc(hours * secondsInHour);
}
// Fallback for modularized imports:
export default hoursToSeconds;