hevy-shared 1.0.762 → 1.0.764

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/built/units.d.ts CHANGED
@@ -16,3 +16,8 @@ export declare const roundedCmToFtIn: (cm: number) => {
16
16
  in: number;
17
17
  };
18
18
  export declare const exactFtInToCm: (ftIn: FtIn) => number;
19
+ /**
20
+ * Round kilo- to deci- (e.g. kilograms/kg to decigrams/dg). Used for comparing
21
+ * weight values in kg which may have originated in lbs.
22
+ */
23
+ export declare const roundKtoD: (value: number) => number;
package/built/units.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.exactFtInToCm = exports.roundedCmToFtIn = exports.exactMetersToMiles = exports.exactMilesToMeters = exports.exactCmtoInch = exports.exactInchtoCm = exports.exactKgtoLbs = exports.exactLbsToKg = exports.METERS_IN_MILE = exports.CM_IN_INCH = exports.POUNDS_IN_KG = void 0;
3
+ exports.roundKtoD = exports.exactFtInToCm = exports.roundedCmToFtIn = exports.exactMetersToMiles = exports.exactMilesToMeters = exports.exactCmtoInch = exports.exactInchtoCm = exports.exactKgtoLbs = exports.exactLbsToKg = exports.METERS_IN_MILE = exports.CM_IN_INCH = exports.POUNDS_IN_KG = void 0;
4
4
  exports.POUNDS_IN_KG = 2.20462;
5
5
  exports.CM_IN_INCH = 2.54;
6
6
  exports.METERS_IN_MILE = 1609.34;
@@ -45,3 +45,9 @@ const exactFtInToCm = (ftIn) => {
45
45
  return Math.round((0, exports.exactInchtoCm)(totalInches));
46
46
  };
47
47
  exports.exactFtInToCm = exactFtInToCm;
48
+ /**
49
+ * Round kilo- to deci- (e.g. kilograms/kg to decigrams/dg). Used for comparing
50
+ * weight values in kg which may have originated in lbs.
51
+ */
52
+ const roundKtoD = (value) => Math.round(value / 10000);
53
+ exports.roundKtoD = roundKtoD;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hevy-shared",
3
- "version": "1.0.762",
3
+ "version": "1.0.764",
4
4
  "description": "",
5
5
  "main": "built/index.js",
6
6
  "types": "built/index.d.ts",