@onereach/billing-shared 11.27.0 → 11.28.0

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/cjs/index.js CHANGED
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./enums"), exports);
18
18
  __exportStar(require("./constants"), exports);
19
19
  __exportStar(require("./types"), exports);
20
+ __exportStar(require("./utils"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,8CAA4B;AAC5B,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,8CAA4B;AAC5B,0CAAwB;AACxB,0CAAwB"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.roundToTwoDecimals = void 0;
7
+ var roundToTwoDecimals_1 = require("./roundToTwoDecimals");
8
+ Object.defineProperty(exports, "roundToTwoDecimals", { enumerable: true, get: function () { return __importDefault(roundToTwoDecimals_1).default; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;AAAA,2DAAqE;AAA5D,yIAAA,OAAO,OAAsB"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = roundToTwoDecimals;
4
+ function roundToTwoDecimals(value) {
5
+ return Math.round(value * 100) / 100;
6
+ }
7
+ //# sourceMappingURL=roundToTwoDecimals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roundToTwoDecimals.js","sourceRoot":"","sources":["../../../src/utils/roundToTwoDecimals.ts"],"names":[],"mappings":";;AAGA,qCAEC;AAFD,SAAwB,kBAAkB,CAAC,KAAa;IACtD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AACvC,CAAC"}
package/dist/esm/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './enums';
2
2
  export * from './constants';
3
3
  export * from './types';
4
+ export * from './utils';
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as roundToTwoDecimals } from './roundToTwoDecimals';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export default function roundToTwoDecimals(value) {
2
+ return Math.round(value * 100) / 100;
3
+ }
4
+ //# sourceMappingURL=roundToTwoDecimals.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roundToTwoDecimals.js","sourceRoot":"","sources":["../../../src/utils/roundToTwoDecimals.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAa;IACtD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AACvC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './enums';
2
2
  export * from './constants';
3
3
  export * from './types';
4
+ export * from './utils';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as roundToTwoDecimals } from './roundToTwoDecimals';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export default function roundToTwoDecimals(value: number): number;
2
+ //# sourceMappingURL=roundToTwoDecimals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roundToTwoDecimals.d.ts","sourceRoot":"","sources":["../../../src/utils/roundToTwoDecimals.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEhE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onereach/billing-shared",
3
- "version": "11.27.0",
3
+ "version": "11.28.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from './enums';
2
2
  export * from './constants';
3
3
  export * from './types';
4
+ export * from './utils';
@@ -0,0 +1 @@
1
+ export { default as roundToTwoDecimals } from './roundToTwoDecimals';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Rounds a number to 2 decimal places
3
+ */
4
+ export default function roundToTwoDecimals(value: number): number {
5
+ return Math.round(value * 100) / 100;
6
+ }