@8ms/helpers 2.3.43 → 2.3.45

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.
@@ -13,7 +13,7 @@ declare const logLevel: {
13
13
  type LogLevel = typeof logLevel[keyof typeof logLevel];
14
14
  type LogEvent = {
15
15
  timestamp: InputDate;
16
- event: string | object;
16
+ data: string | object;
17
17
  };
18
18
  //#endregion
19
19
  //#region src/aws/cloudWatchLog/server/AwsCloudWatchLogNamespace.d.ts
@@ -69,8 +69,8 @@ var AwsCloudWatchLogNamespace = class extends BaseNamespace {
69
69
  logGroupName,
70
70
  logStreamName,
71
71
  logEvents: logEvents.map((event) => ({
72
- timestamp: getLuxonDate(event.timestamp).toUnixInteger(),
73
- message: typeof event === "string" ? event : JSON.stringify(event)
72
+ timestamp: getLuxonDate(event.timestamp).toMillis(),
73
+ message: typeof event.data === "string" ? event.data : JSON.stringify(event.data)
74
74
  }))
75
75
  }));
76
76
  };
@@ -9,8 +9,8 @@ const formatCompact = (input, maxDp, minDp) => {
9
9
  const maximumDp = maxDp ?? 2;
10
10
  const minimumDp = minDp ?? maxDp;
11
11
  return Intl.NumberFormat(void 0, {
12
- minimumFractionDigits: maximumDp,
13
- maximumFractionDigits: minimumDp,
12
+ minimumFractionDigits: minimumDp,
13
+ maximumFractionDigits: maximumDp,
14
14
  notation: "compact"
15
15
  }).format(inputValue);
16
16
  };
@@ -29,8 +29,8 @@ const formatCurrency = (input, currency = "GBP", maxDp, minDp) => {
29
29
  let formatted = new Intl.NumberFormat(void 0, {
30
30
  style: "currency",
31
31
  currency: currencyClean,
32
- minimumFractionDigits: maximumDp,
33
- maximumFractionDigits: minimumDp
32
+ minimumFractionDigits: minimumDp,
33
+ maximumFractionDigits: maximumDp
34
34
  }).format(value);
35
35
  if ("USD" === currencyClean) formatted = formatted.replace("US$", "$");
36
36
  return formatted;
@@ -46,8 +46,8 @@ const formatStandard = (input, maxDp, minDp) => {
46
46
  const maximumDp = maxDp ?? 0;
47
47
  const minimumDp = minDp ?? maxDp;
48
48
  return Intl.NumberFormat(void 0, {
49
- minimumFractionDigits: maximumDp,
50
- maximumFractionDigits: minimumDp,
49
+ minimumFractionDigits: minimumDp,
50
+ maximumFractionDigits: maximumDp,
51
51
  notation: "standard"
52
52
  }).format(inputValue);
53
53
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@8ms/helpers",
3
3
  "license": "UNLICENSED",
4
- "version": "2.3.43",
4
+ "version": "2.3.45",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/8millionstories-organisation/8ms-helpers-ts.git"