@jobber/formatters 0.4.1 → 0.4.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.
@@ -1 +1,2 @@
1
- export {};
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/config.js CHANGED
@@ -1,5 +1,8 @@
1
- import { global } from "./global";
2
- const configOverrides = (global.ATLANTIS_ENV || {}).config || {};
3
- export const config = Object.freeze(Object.assign({ defaultCurrency: "USD", errorNotifier(message, error) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.config = void 0;
4
+ const global_1 = require("./global");
5
+ const configOverrides = (global_1.global.ATLANTIS_ENV || {}).config || {};
6
+ exports.config = Object.freeze(Object.assign({ defaultCurrency: "USD", errorNotifier(message, error) {
4
7
  console.error(message, error);
5
8
  } }, configOverrides));
package/dist/currency.js CHANGED
@@ -1,5 +1,8 @@
1
- import { config } from "./config";
2
- export function formatCurrency(amount, currency = config.defaultCurrency) {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatCurrency = formatCurrency;
4
+ const config_1 = require("./config");
5
+ function formatCurrency(amount, currency = config_1.config.defaultCurrency) {
3
6
  return amount.toLocaleString("en", {
4
7
  style: "currency",
5
8
  currency: currency,
package/dist/global.js CHANGED
@@ -1,3 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.global = void 0;
1
4
  const global = {};
2
5
  function getGlobal() {
3
6
  if (typeof window !== "undefined") {
@@ -6,4 +9,4 @@ function getGlobal() {
6
9
  return global;
7
10
  }
8
11
  const glob = getGlobal();
9
- export { glob as global };
12
+ exports.global = glob;
package/dist/index.js CHANGED
@@ -1,4 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
1
17
  // comments for manual release
2
- export * from "./currency";
3
- export * from "./CurrencyType";
4
- export * from "./config";
18
+ __exportStar(require("./currency"), exports);
19
+ __exportStar(require("./CurrencyType"), exports);
20
+ __exportStar(require("./config"), exports);
package/package.json CHANGED
@@ -1,16 +1,9 @@
1
1
  {
2
2
  "name": "@jobber/formatters",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "license": "MIT",
5
- "type": "module",
5
+ "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.js",
11
- "require": "./dist/index.js"
12
- }
13
- },
14
7
  "scripts": {
15
8
  "build": "tsc --project . --skipLibCheck",
16
9
  "clean": "rm -rf dist/* tsconfig.tsbuildinfo",
@@ -19,5 +12,5 @@
19
12
  "files": [
20
13
  "dist/*"
21
14
  ],
22
- "gitHead": "14679bfc84922e1c758fbd6118ce3fd7b5142315"
15
+ "gitHead": "5bbca8eb6e0837b469d2343f9d0fa98a46f7d689"
23
16
  }