@wavy/fn 0.0.9 → 0.0.10

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/dist/main.cjs CHANGED
@@ -281,7 +281,7 @@ var TimeManager = class _TimeManager {
281
281
  constructor(locale = "en-jm") {
282
282
  this.locale = locale;
283
283
  }
284
- periods = {
284
+ static periods = {
285
285
  overview: {
286
286
  getPrevious: (period) => {
287
287
  if (period === "Today") return "Yesterday";
@@ -290,7 +290,7 @@ var TimeManager = class _TimeManager {
290
290
  }
291
291
  }
292
292
  };
293
- metrics = {
293
+ static metrics = {
294
294
  second: {
295
295
  pluginVals: [1e3],
296
296
  unit: { fmt: "second", abv: "sec" },
@@ -403,7 +403,7 @@ var TimeManager = class _TimeManager {
403
403
  }
404
404
  getDuration(from, to, options) {
405
405
  const difference = new Date(to).getTime() - new Date(from).getTime();
406
- const metrics = this.metrics;
406
+ const metrics = _TimeManager.metrics;
407
407
  const getFmtDuration = (duration2, unit) => `${duration2} ${options?.abvUnits ? unit.abv : unit.fmt}${duration2 > 1 ? "s" : ""}`;
408
408
  const getDuration = (plugins) => plugins.reduce((prev, curr) => prev / curr);
409
409
  const metric = (timeDifference = difference) => Object.keys(metrics).reduce((prev, curr) => {
package/dist/main.js CHANGED
@@ -184,7 +184,7 @@ var TimeManager = class _TimeManager {
184
184
  constructor(locale = "en-jm") {
185
185
  this.locale = locale;
186
186
  }
187
- periods = {
187
+ static periods = {
188
188
  overview: {
189
189
  getPrevious: (period) => {
190
190
  if (period === "Today") return "Yesterday";
@@ -193,7 +193,7 @@ var TimeManager = class _TimeManager {
193
193
  }
194
194
  }
195
195
  };
196
- metrics = {
196
+ static metrics = {
197
197
  second: {
198
198
  pluginVals: [1e3],
199
199
  unit: { fmt: "second", abv: "sec" },
@@ -306,7 +306,7 @@ var TimeManager = class _TimeManager {
306
306
  }
307
307
  getDuration(from, to, options) {
308
308
  const difference = new Date(to).getTime() - new Date(from).getTime();
309
- const metrics = this.metrics;
309
+ const metrics = _TimeManager.metrics;
310
310
  const getFmtDuration = (duration2, unit) => `${duration2} ${options?.abvUnits ? unit.abv : unit.fmt}${duration2 > 1 ? "s" : ""}`;
311
311
  const getDuration = (plugins) => plugins.reduce((prev, curr) => prev / curr);
312
312
  const metric = (timeDifference = difference) => Object.keys(metrics).reduce((prev, curr) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavy/fn",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "main": "./dist/main.js",
5
5
  "module": "./dist/main.cjs",
6
6
  "types": "./dist/main.d.ts",