@colisweb/rescript-toolkit 4.24.0 → 4.24.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": "4.24.0",
3
+ "version": "4.24.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "clean": "rescript clean",
@@ -26,7 +26,7 @@ module Browser = {
26
26
  external addAction: (string, 'a) => unit = "addAction"
27
27
 
28
28
  @module("@datadog/browser-rum") @scope("datadogRum")
29
- external addRumGlobalContext: (string, 'a) => unit = "addRumGlobalContext"
29
+ external setUserProperty: (string, 'a) => unit = "setUserProperty"
30
30
 
31
31
  @module("@datadog/browser-rum") @scope("datadogRum")
32
32
  external setUser: 'a => unit = "setUser"
@@ -67,12 +67,12 @@ module Browser = {
67
67
  if options.env !== "local" {
68
68
  setUser(sessionData)
69
69
 
70
- addRumGlobalContext(
70
+ setUserProperty(
71
71
  "screen_resolution",
72
72
  `${Browser.screenWidth->Int.toString}x${Browser.screenHeight->Int.toString}`,
73
73
  )
74
74
 
75
- contextCallback->Option.forEach(fn => fn(addRumGlobalContext))
75
+ contextCallback->Option.forEach(fn => fn(setUserProperty))
76
76
  }
77
77
 
78
78
  None
@@ -139,6 +139,8 @@ external isFirstDayOfMonth: Js.Date.t => bool = "isFirstDayOfMonth"
139
139
  @module("date-fns")
140
140
  external getWeekNumber: (Js.Date.t, startOfWeekOptions) => int = "getWeek"
141
141
 
142
+ @module("date-fns")
143
+ external getTime: Js.Date.t => float = "getTime"
142
144
  @module("date-fns")
143
145
  external getDay: Js.Date.t => int = "getDay"
144
146
  @module("date-fns")