@colisweb/rescript-toolkit 2.65.0 → 2.65.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colisweb/rescript-toolkit",
3
- "version": "2.65.0",
3
+ "version": "2.65.2",
4
4
  "scripts": {
5
5
  "clean": "rescript clean",
6
6
  "build": "rescript build -with-deps",
@@ -10,3 +10,18 @@ let wait = ms =>
10
10
  })
11
11
  ->Promise.Js.fromBsPromise
12
12
  ->Promise.Js.toResult
13
+
14
+ let durationMinutesToHourMinutesString = (durationMinutes: float) => {
15
+ let hours = (durationMinutes /. 60.)->Js.Math.trunc
16
+ let minutes = (durationMinutes -. hours *. 60.)->Js.Math.round
17
+
18
+ let hours = minutes === 60. ? hours +. 1. : hours
19
+ let minutes = minutes === 60. ? 0. : minutes
20
+
21
+ switch (hours, minutes) {
22
+ | (0., min) => min->Js.Float.toFixed ++ " min"
23
+ | (h, 0.) => h->Js.Float.toFixed ++ " h"
24
+ | (h, min) =>
25
+ `${h < 10. ? "0" : ""}${h->Js.Float.toFixed}:${min < 10. ? "0" : ""}${min->Js.Float.toFixed}`
26
+ }
27
+ }
@@ -6004,3 +6004,8 @@ module GrUserWorker = {
6004
6004
  external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
6005
6005
  "GrUserWorker"
6006
6006
  }
6007
+ module FaMinusCircle = {
6008
+ @module("react-icons/fa") @react.component
6009
+ external make: (~size: int=?, ~color: string=?, ~className: string=?) => React.element =
6010
+ "FaMinusCircle"
6011
+ }