@ducatjs/money 0.2.0 → 0.2.1

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.
Files changed (61) hide show
  1. package/NOTICE +73 -0
  2. package/dist/plugins/adyen.d.ts +1 -1
  3. package/dist/plugins/adyen.d.ts.map +1 -1
  4. package/dist/plugins/adyen.js.map +1 -1
  5. package/dist/plugins/allocate.d.ts +1 -1
  6. package/dist/plugins/allocate.d.ts.map +1 -1
  7. package/dist/plugins/allocate.js.map +1 -1
  8. package/dist/plugins/braintree.d.ts +1 -1
  9. package/dist/plugins/braintree.d.ts.map +1 -1
  10. package/dist/plugins/braintree.js.map +1 -1
  11. package/dist/plugins/cash.d.ts +1 -1
  12. package/dist/plugins/cash.d.ts.map +1 -1
  13. package/dist/plugins/cash.js.map +1 -1
  14. package/dist/plugins/checkout.d.ts +1 -1
  15. package/dist/plugins/checkout.d.ts.map +1 -1
  16. package/dist/plugins/checkout.js.map +1 -1
  17. package/dist/plugins/convert.d.ts +2 -1
  18. package/dist/plugins/convert.d.ts.map +1 -1
  19. package/dist/plugins/convert.js.map +1 -1
  20. package/dist/plugins/exact.d.ts +1 -1
  21. package/dist/plugins/exact.d.ts.map +1 -1
  22. package/dist/plugins/exact.js.map +1 -1
  23. package/dist/plugins/fixed.d.ts +1 -1
  24. package/dist/plugins/fixed.d.ts.map +1 -1
  25. package/dist/plugins/fixed.js.map +1 -1
  26. package/dist/plugins/format.d.ts +1 -1
  27. package/dist/plugins/format.d.ts.map +1 -1
  28. package/dist/plugins/format.js.map +1 -1
  29. package/dist/plugins/klarna.d.ts +1 -1
  30. package/dist/plugins/klarna.d.ts.map +1 -1
  31. package/dist/plugins/klarna.js.map +1 -1
  32. package/dist/plugins/paypal.d.ts +1 -1
  33. package/dist/plugins/paypal.d.ts.map +1 -1
  34. package/dist/plugins/paypal.js +0 -4
  35. package/dist/plugins/paypal.js.map +1 -1
  36. package/dist/plugins/prisma.d.ts +1 -1
  37. package/dist/plugins/prisma.d.ts.map +1 -1
  38. package/dist/plugins/prisma.js +0 -4
  39. package/dist/plugins/prisma.js.map +1 -1
  40. package/dist/plugins/stripe.d.ts +1 -1
  41. package/dist/plugins/stripe.d.ts.map +1 -1
  42. package/dist/plugins/stripe.js +0 -4
  43. package/dist/plugins/stripe.js.map +1 -1
  44. package/dist/plugins/tax.d.ts +2 -1
  45. package/dist/plugins/tax.d.ts.map +1 -1
  46. package/dist/plugins/tax.js.map +1 -1
  47. package/package.json +1 -1
  48. package/src/plugins/adyen.ts +3 -2
  49. package/src/plugins/allocate.ts +3 -2
  50. package/src/plugins/braintree.ts +3 -2
  51. package/src/plugins/cash.ts +3 -2
  52. package/src/plugins/checkout.ts +3 -2
  53. package/src/plugins/convert.ts +3 -2
  54. package/src/plugins/exact.ts +3 -2
  55. package/src/plugins/fixed.ts +3 -2
  56. package/src/plugins/format.ts +3 -2
  57. package/src/plugins/klarna.ts +3 -2
  58. package/src/plugins/paypal.ts +3 -2
  59. package/src/plugins/prisma.ts +3 -2
  60. package/src/plugins/stripe.ts +3 -2
  61. package/src/plugins/tax.ts +3 -2
package/NOTICE CHANGED
@@ -41,6 +41,79 @@ data/cash-rounding.json
41
41
  government publications, retrieved 2026-11-07. Each entry records
42
42
  its source URL and whether it was verified against a primary source.
43
43
 
44
+ data/historic.json
45
+ Withdrawn codes and names from ISO 4217 List Three, published by SIX
46
+ Financial Information AG (snapshot 2026-01-01). Minor units taken from
47
+ OpenJDK's currency data (CurrencyData.properties, dataVersion 180,
48
+ GPLv2 with the Classpath Exception), as the facts ISO 4217 assigned
49
+ while each code was current. None was verified against an ISO source
50
+ directly, since List Three carries no minor units.
51
+
52
+ data/cldr-cash.json
53
+ Data from the Unicode Common Locale Data Repository (CLDR), release
54
+ 49: cash digits and rounding, from https://github.com/unicode-org/cldr.
55
+ Used under the Unicode License v3:
56
+
57
+ COPYRIGHT AND PERMISSION NOTICE
58
+
59
+ Copyright © 2001–2026 Unicode, Inc.
60
+
61
+ Unicode Technical Standard #35, Unicode Locale Data Markup Language
62
+ (LDML) made available in this repository is protected by copyright, and
63
+ permission must be obtained from Unicode, Inc. prior to any
64
+ reproduction, modification, or other use not permitted by the Unicode
65
+ Terms of Use <https://www.unicode.org/copyright.html>. Specifically, you
66
+ may make copies of this publication and may annotate and translate it
67
+ solely for personal or internal business purposes and not for public
68
+ distribution, provided that any such permitted copies and modifications
69
+ fully reproduce all copyright and other legal notices contained in the
70
+ original. You may not make copies of or modifications to this
71
+ publication for public distribution, or incorporate it in whole or in
72
+ part into any product or publication without the express written
73
+ permission of Unicode. Notwithstanding the foregoing, you may within
74
+ this repository provide comments and propose changes to this standard
75
+ and may make copies/forks solely for such purposes provided that you
76
+ reproduce this copyright notice and these terms of use in any such
77
+ copy/fork.
78
+
79
+ All other content in this repo is released under UNICODE LICENSE V3
80
+
81
+ NOTICE TO USER: Carefully read the following legal agreement. BY
82
+ DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR
83
+ SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE
84
+ TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT
85
+ DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE.
86
+
87
+ Permission is hereby granted, free of charge, to any person obtaining a
88
+ copy of data files and any associated documentation (the "Data Files") or
89
+ software and any associated documentation (the "Software") to deal in the
90
+ Data Files or Software without restriction, including without limitation
91
+ the rights to use, copy, modify, merge, publish, distribute, and/or sell
92
+ copies of the Data Files or Software, and to permit persons to whom the
93
+ Data Files or Software are furnished to do so, provided that either (a)
94
+ this copyright and permission notice appear with all copies of the Data
95
+ Files or Software, or (b) this copyright and permission notice appear in
96
+ associated Documentation.
97
+
98
+ THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
99
+ KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
100
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
101
+ THIRD PARTY RIGHTS.
102
+
103
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
104
+ BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
105
+ OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
106
+ WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
107
+ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA
108
+ FILES OR SOFTWARE.
109
+
110
+ Except as contained in this notice, the name of a copyright holder shall
111
+ not be used in advertising or otherwise to promote the sale, use or other
112
+ dealings in these Data Files or Software without prior written
113
+ authorization of the copyright holder.
114
+
115
+ SPDX-License-Identifier: Unicode-3.0
116
+
44
117
  assets/logo.png
45
118
  Gold ducat of Francesco Foscari, Venice, 1423-1457. Photo by
46
119
  Francesco Bini, CC BY-SA 4.0, via Wikimedia Commons. See
@@ -1,6 +1,6 @@
1
1
  import type { RoundingMode } from '../rounding.js';
2
2
  export * from '../adyen.js';
3
- declare module '../money.js' {
3
+ declare module '../index.js' {
4
4
  interface Money<C extends string> {
5
5
  /**
6
6
  * Adyen `amount` object: `money('15000', 'IDR').toAdyen()` is `{ value: 15000, currency: 'IDR'
@@ -1 +1 @@
1
- {"version":3,"file":"adyen.d.ts","sourceRoot":"","sources":["../../src/plugins/adyen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,cAAc,aAAa,CAAC;AAE5B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B;;;WAGG;QACH,OAAO,CAAC,QAAQ,CAAC,EAAE,YAAY,GAAG;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;KACvE;CACF"}
1
+ {"version":3,"file":"adyen.d.ts","sourceRoot":"","sources":["../../src/plugins/adyen.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,cAAc,aAAa,CAAC;AAE5B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B;;;WAGG;QACH,OAAO,CAAC,QAAQ,CAAC,EAAE,YAAY,GAAG;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;KACvE;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"adyen.js","sourceRoot":"","sources":["../../src/plugins/adyen.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AAGtD,cAAc,aAAa,CAAC;AAY5B,WAAW,CACT;IACE,OAAO,CAAc,QAAuB;QAC1C,OAAO,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACjC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAClC,CAAC"}
1
+ {"version":3,"file":"adyen.js","sourceRoot":"","sources":["../../src/plugins/adyen.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,cAAc,aAAa,CAAC;AAY5B,WAAW,CACT;IACE,OAAO,CAAc,QAAuB;QAC1C,OAAO,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACjC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAClC,CAAC"}
@@ -5,7 +5,7 @@
5
5
  */
6
6
  import { type AllocateOptions, type InstalmentOptions, type Tranche, type Weight } from '../allocate.js';
7
7
  export * from '../allocate.js';
8
- declare module '../money.js' {
8
+ declare module '../index.js' {
9
9
  interface Money<C extends string> {
10
10
  /** Splits by weights; the parts always sum to this. */
11
11
  allocate(weights: readonly Weight[], options?: AllocateOptions): Money<C>[];
@@ -1 +1 @@
1
- {"version":3,"file":"allocate.d.ts","sourceRoot":"","sources":["../../src/plugins/allocate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAML,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,MAAM,EACZ,MAAM,gBAAgB,CAAC;AAGxB,cAAc,gBAAgB,CAAC;AAE/B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,uDAAuD;QACvD,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5E,6DAA6D;QAC7D,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACvE,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACtD,uEAAuE;QACvE,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;KAClC;CACF"}
1
+ {"version":3,"file":"allocate.d.ts","sourceRoot":"","sources":["../../src/plugins/allocate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAML,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,OAAO,EACZ,KAAK,MAAM,EACZ,MAAM,gBAAgB,CAAC;AAIxB,cAAc,gBAAgB,CAAC;AAE/B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,uDAAuD;QACvD,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5E,6DAA6D;QAC7D,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,eAAe,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5D,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACvE,QAAQ,CAAC,QAAQ,EAAE,SAAS,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACtD,uEAAuE;QACvE,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;KAClC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"allocate.js","sourceRoot":"","sources":["../../src/plugins/allocate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,QAAQ,EACR,KAAK,EACL,WAAW,EACX,QAAQ,EACR,KAAK,GAKN,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AAEtD,cAAc,gBAAgB,CAAC;AAe/B,WAAW,CACT;IACE,QAAQ,CAAc,OAA0B,EAAE,OAAyB;QACzE,OAAO,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IACD,KAAK,CAAc,KAAa,EAAE,OAAyB;QACzD,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IACD,WAAW,CAAc,KAAa,EAAE,OAAmC;QACzE,OAAO,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IACD,QAAQ,CAAc,QAAoC;QACxD,OAAO,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC;IACD,KAAK,CAAc,GAAU;QAC3B,OAAO,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACF,EACD,EAAE,KAAK,EAAE,yBAAyB,EAAE,CACrC,CAAC"}
1
+ {"version":3,"file":"allocate.js","sourceRoot":"","sources":["../../src/plugins/allocate.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,QAAQ,EACR,KAAK,EACL,WAAW,EACX,QAAQ,EACR,KAAK,GAKN,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,cAAc,gBAAgB,CAAC;AAe/B,WAAW,CACT;IACE,QAAQ,CAAc,OAA0B,EAAE,OAAyB;QACzE,OAAO,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IACD,KAAK,CAAc,KAAa,EAAE,OAAyB;QACzD,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;IACD,WAAW,CAAc,KAAa,EAAE,OAAmC;QACzE,OAAO,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC3C,CAAC;IACD,QAAQ,CAAc,QAAoC;QACxD,OAAO,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC;IACD,KAAK,CAAc,GAAU;QAC3B,OAAO,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACF,EACD,EAAE,KAAK,EAAE,yBAAyB,EAAE,CACrC,CAAC"}
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { type BraintreeAmountOptions } from '../braintree.js';
5
5
  export * from '../braintree.js';
6
- declare module '../money.js' {
6
+ declare module '../index.js' {
7
7
  interface Money<C extends string> {
8
8
  /** The exact `amount` string for Braintree: `money('10', 'USD').toBraintree()` is '10.00'. */
9
9
  toBraintree(options?: BraintreeAmountOptions): string;
@@ -1 +1 @@
1
- {"version":3,"file":"braintree.d.ts","sourceRoot":"","sources":["../../src/plugins/braintree.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAe,KAAK,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAG3E,cAAc,iBAAiB,CAAC;AAEhC,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,8FAA8F;QAC9F,WAAW,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,MAAM,CAAC;KACvD;CACF"}
1
+ {"version":3,"file":"braintree.d.ts","sourceRoot":"","sources":["../../src/plugins/braintree.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAe,KAAK,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAI3E,cAAc,iBAAiB,CAAC;AAEhC,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,8FAA8F;QAC9F,WAAW,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,MAAM,CAAC;KACvD;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"braintree.js","sourceRoot":"","sources":["../../src/plugins/braintree.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,WAAW,EAA+B,MAAM,iBAAiB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AAEtD,cAAc,iBAAiB,CAAC;AAShC,WAAW,CACT;IACE,WAAW,CAAc,OAAgC;QACvD,OAAO,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,0BAA0B,EAAE,CACtC,CAAC"}
1
+ {"version":3,"file":"braintree.js","sourceRoot":"","sources":["../../src/plugins/braintree.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,WAAW,EAA+B,MAAM,iBAAiB,CAAC;AAE3E,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,cAAc,iBAAiB,CAAC;AAShC,WAAW,CACT;IACE,WAAW,CAAc,OAAgC;QACvD,OAAO,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,0BAA0B,EAAE,CACtC,CAAC"}
@@ -5,7 +5,7 @@
5
5
  import { type CashRoundOptions } from '../cash.js';
6
6
  import type { RoundingMode } from '../rounding.js';
7
7
  export * from '../cash.js';
8
- declare module '../money.js' {
8
+ declare module '../index.js' {
9
9
  interface Money<C extends string> {
10
10
  /**
11
11
  * Rounds a cash total to the local cash step (CHF 0.05, SEK 1, ...); unchanged when no rule
@@ -1 +1 @@
1
- {"version":3,"file":"cash.d.ts","sourceRoot":"","sources":["../../src/plugins/cash.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAA+B,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,cAAc,YAAY,CAAC;AAE3B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B;;;WAGG;QACH,SAAS,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAChD,uFAAuF;QACvF,gBAAgB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;KAC1E;CACF"}
1
+ {"version":3,"file":"cash.d.ts","sourceRoot":"","sources":["../../src/plugins/cash.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAA+B,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAGhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,cAAc,YAAY,CAAC;AAE3B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B;;;WAGG;QACH,SAAS,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAChD,uFAAuF;QACvF,gBAAgB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,YAAY,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;KAC1E;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"cash.js","sourceRoot":"","sources":["../../src/plugins/cash.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAyB,MAAM,YAAY,CAAC;AAChF,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AAGtD,cAAc,YAAY,CAAC;AAc3B,WAAW,CACT;IACE,SAAS,CAAc,OAA0B;QAC/C,OAAO,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC;IACD,gBAAgB,CAAc,SAAgB,EAAE,QAAuB;QACrE,OAAO,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC;CACF,EACD,EAAE,KAAK,EAAE,qBAAqB,EAAE,CACjC,CAAC"}
1
+ {"version":3,"file":"cash.js","sourceRoot":"","sources":["../../src/plugins/cash.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAyB,MAAM,YAAY,CAAC;AAEhF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,cAAc,YAAY,CAAC;AAc3B,WAAW,CACT;IACE,SAAS,CAAc,OAA0B;QAC/C,OAAO,SAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC;IACD,gBAAgB,CAAc,SAAgB,EAAE,QAAuB;QACrE,OAAO,gBAAgB,CAAC,IAAI,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IACrD,CAAC;CACF,EACD,EAAE,KAAK,EAAE,qBAAqB,EAAE,CACjC,CAAC"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type CheckoutAmountOptions } from '../checkout.js';
6
6
  export * from '../checkout.js';
7
- declare module '../money.js' {
7
+ declare module '../index.js' {
8
8
  interface Money<C extends string> {
9
9
  /**
10
10
  * The integer `amount` to send to Checkout.com: `money('5000', 'CLP').toCheckoutAmount()` is
@@ -1 +1 @@
1
- {"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../src/plugins/checkout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAgC,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAG1F,cAAc,gBAAgB,CAAC;AAE/B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B;;;WAGG;QACH,gBAAgB,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAAC;QAC1D,iEAAiE;QACjE,UAAU,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;KACnF;CACF"}
1
+ {"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../src/plugins/checkout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAgC,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAI1F,cAAc,gBAAgB,CAAC;AAE/B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B;;;WAGG;QACH,gBAAgB,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAAC;QAC1D,iEAAiE;QACjE,UAAU,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;KACnF;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/plugins/checkout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAA8B,MAAM,gBAAgB,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AAEtD,cAAc,gBAAgB,CAAC;AAc/B,WAAW,CACT;IACE,gBAAgB,CAAc,OAA+B;QAC3D,OAAO,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IACD,UAAU,CAAc,OAA+B;QACrD,OAAO,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,yBAAyB,EAAE,CACrC,CAAC"}
1
+ {"version":3,"file":"checkout.js","sourceRoot":"","sources":["../../src/plugins/checkout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAA8B,MAAM,gBAAgB,CAAC;AAE1F,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,cAAc,gBAAgB,CAAC;AAc/B,WAAW,CACT;IACE,gBAAgB,CAAc,OAA+B;QAC3D,OAAO,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC;IACD,UAAU,CAAc,OAA+B;QACrD,OAAO,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,yBAAyB,EAAE,CACrC,CAAC"}
@@ -1,9 +1,10 @@
1
1
  import type { Factor } from '../decimal.js';
2
+ import { type CurrencyInput, type RoundingInput } from '../money.js';
2
3
  import type { ProviderConvertOptions } from '../convert.js';
3
4
  import type { RateProvider } from '../provider.js';
4
5
  import type { ConvertOptions, Rate } from '../rate.js';
5
6
  export * from '../convert.js';
6
- declare module '../money.js' {
7
+ declare module '../index.js' {
7
8
  interface Money<C extends string> {
8
9
  /** Converts at a Rate, rounding once: `eur.convert(eurUsd, 'halfEven')`. */
9
10
  convert<To extends string>(rate: Rate<NoInfer<C>, To>, rounding?: RoundingInput, options?: ConvertOptions): Money<To>;
@@ -1 +1 @@
1
- {"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../src/plugins/convert.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvD,cAAc,eAAe,CAAC;AAE9B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,4EAA4E;QAC5E,OAAO,CAAC,EAAE,SAAS,MAAM,EACvB,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAC1B,QAAQ,CAAC,EAAE,aAAa,EACxB,OAAO,CAAC,EAAE,cAAc,GACvB,KAAK,CAAC,EAAE,CAAC,CAAC;QACb,4FAA4F;QAC5F,OAAO,CAAC,EAAE,SAAS,aAAa,EAC9B,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,aAAa,EACxB,OAAO,CAAC,EAAE,cAAc,GACvB,KAAK,CAAC,EAAE,CAAC,CAAC;QACb;;;WAGG;QACH,OAAO,CAAC,EAAE,SAAS,aAAa,EAC9B,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,YAAY,EACtB,QAAQ,CAAC,EAAE,aAAa,EACxB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,KAAK,CAAC,EAAE,CAAC,CAAC;KACd;CACF"}
1
+ {"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../src/plugins/convert.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAe,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAClF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvD,cAAc,eAAe,CAAC;AAE9B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,4EAA4E;QAC5E,OAAO,CAAC,EAAE,SAAS,MAAM,EACvB,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAC1B,QAAQ,CAAC,EAAE,aAAa,EACxB,OAAO,CAAC,EAAE,cAAc,GACvB,KAAK,CAAC,EAAE,CAAC,CAAC;QACb,4FAA4F;QAC5F,OAAO,CAAC,EAAE,SAAS,aAAa,EAC9B,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,aAAa,EACxB,OAAO,CAAC,EAAE,cAAc,GACvB,KAAK,CAAC,EAAE,CAAC,CAAC;QACb;;;WAGG;QACH,OAAO,CAAC,EAAE,SAAS,aAAa,EAC9B,EAAE,EAAE,EAAE,EACN,QAAQ,EAAE,YAAY,EACtB,QAAQ,CAAC,EAAE,aAAa,EACxB,OAAO,CAAC,EAAE,sBAAsB,GAC/B,KAAK,CAAC,EAAE,CAAC,CAAC;KACd;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"convert.js","sourceRoot":"","sources":["../../src/plugins/convert.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,WAAW,EAAsD,MAAM,aAAa,CAAC;AAK9F,cAAc,eAAe,CAAC;AA8B9B,WAAW,CACT;IACE,OAAO,CAAc,GAAG,IAAqC;QAC3D,OAAQ,OAAuD,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;IACjF,CAAC;CACF,EACD,EAAE,KAAK,EAAE,wBAAwB,EAAE,CACpC,CAAC"}
1
+ {"version":3,"file":"convert.js","sourceRoot":"","sources":["../../src/plugins/convert.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,WAAW,EAA0C,MAAM,aAAa,CAAC;AAKlF,cAAc,eAAe,CAAC;AA8B9B,WAAW,CACT;IACE,OAAO,CAAc,GAAG,IAAqC;QAC3D,OAAQ,OAAuD,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC;IACjF,CAAC;CACF,EACD,EAAE,KAAK,EAAE,wBAAwB,EAAE,CACpC,CAAC"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type ExactMoney } from '../exact.js';
6
6
  export * from '../exact.js';
7
- declare module '../money.js' {
7
+ declare module '../index.js' {
8
8
  interface Money<C extends string> {
9
9
  /**
10
10
  * The exact value, for chained arithmetic that rounds once: `price.exact().divide(3).round()`.
@@ -1 +1 @@
1
- {"version":3,"file":"exact.d.ts","sourceRoot":"","sources":["../../src/plugins/exact.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAGrD,cAAc,aAAa,CAAC;AAE5B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B;;WAEG;QACH,KAAK,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;KACxB;CACF"}
1
+ {"version":3,"file":"exact.d.ts","sourceRoot":"","sources":["../../src/plugins/exact.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAIrD,cAAc,aAAa,CAAC;AAE5B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B;;WAEG;QACH,KAAK,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;KACxB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"exact.js","sourceRoot":"","sources":["../../src/plugins/exact.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,KAAK,EAAmB,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AAEtD,cAAc,aAAa,CAAC;AAW5B,WAAW,CAAC;IACV,KAAK;QACH,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"exact.js","sourceRoot":"","sources":["../../src/plugins/exact.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,KAAK,EAAmB,MAAM,aAAa,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,cAAc,aAAa,CAAC;AAW5B,WAAW,CAAC;IACV,KAAK;QACH,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;CACF,CAAC,CAAC"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type Fixed } from '../fixed.js';
6
6
  export * from '../fixed.js';
7
- declare module '../money.js' {
7
+ declare module '../index.js' {
8
8
  interface Money<C extends string> {
9
9
  /**
10
10
  * The exact Fixed of this amount, at its scale: `money('12.34', 'EUR').toFixedPoint()` is
@@ -1 +1 @@
1
- {"version":3,"file":"fixed.d.ts","sourceRoot":"","sources":["../../src/plugins/fixed.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAgB,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAGvD,cAAc,aAAa,CAAC;AAE5B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B;;;;WAIG;QACH,YAAY,IAAI,KAAK,CAAC;KACvB;CACF"}
1
+ {"version":3,"file":"fixed.d.ts","sourceRoot":"","sources":["../../src/plugins/fixed.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAgB,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAIvD,cAAc,aAAa,CAAC;AAE5B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B;;;;WAIG;QACH,YAAY,IAAI,KAAK,CAAC;KACvB;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"fixed.js","sourceRoot":"","sources":["../../src/plugins/fixed.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AAEtD,cAAc,aAAa,CAAC;AAa5B,WAAW,CACT;IACE,YAAY;QACV,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACF,EACD,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAClC,CAAC"}
1
+ {"version":3,"file":"fixed.js","sourceRoot":"","sources":["../../src/plugins/fixed.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,cAAc,aAAa,CAAC;AAa5B,WAAW,CACT;IACE,YAAY;QACV,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACF,EACD,EAAE,KAAK,EAAE,sBAAsB,EAAE,CAClC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export * from '../format.js';
2
- declare module '../money.js' {
2
+ declare module '../index.js' {
3
3
  interface Money<C extends string> {
4
4
  /** Locale formatting via Intl: `price.format('de-DE')` gives "19,99 €" */
5
5
  format(locale?: string, options?: Intl.NumberFormatOptions): string;
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/plugins/format.ts"],"names":[],"mappings":"AAOA,cAAc,cAAc,CAAC;AAE7B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,0EAA0E;QAC1E,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC;QACpE,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;KAC7F;CACF"}
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/plugins/format.ts"],"names":[],"mappings":"AAQA,cAAc,cAAc,CAAC;AAE7B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,0EAA0E;QAC1E,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAAC;QACpE,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;KAC7F;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/plugins/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AAEtD,cAAc,cAAc,CAAC;AAU7B,WAAW,CACT;IACE,MAAM,CAAc,MAAe,EAAE,OAAkC;QACrE,OAAO,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;IACD,aAAa,CAAc,MAAe,EAAE,OAAkC;QAC5E,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;CACF,EACD,EAAE,KAAK,EAAE,uBAAuB,EAAE,CACnC,CAAC"}
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/plugins/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,cAAc,cAAc,CAAC;AAU7B,WAAW,CACT;IACE,MAAM,CAAc,MAAe,EAAE,OAAkC;QACrE,OAAO,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;IACD,aAAa,CAAc,MAAe,EAAE,OAAkC;QAC5E,OAAO,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C,CAAC;CACF,EACD,EAAE,KAAK,EAAE,uBAAuB,EAAE,CACnC,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /** `@ducatjs/money/klarna`: Klarna's amount view. Importing this module adds `toKlarna`. */
2
2
  import { type KlarnaAmountOptions } from '../klarna.js';
3
3
  export * from '../klarna.js';
4
- declare module '../money.js' {
4
+ declare module '../index.js' {
5
5
  interface Money<C extends string> {
6
6
  /** The integer for any Klarna amount field: `money('25', 'EUR').toKlarna()` is 2500. */
7
7
  toKlarna(options?: KlarnaAmountOptions): number;
@@ -1 +1 @@
1
- {"version":3,"file":"klarna.d.ts","sourceRoot":"","sources":["../../src/plugins/klarna.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,OAAO,EAAY,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGlE,cAAc,cAAc,CAAC;AAE7B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,wFAAwF;QACxF,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC;KACjD;CACF"}
1
+ {"version":3,"file":"klarna.d.ts","sourceRoot":"","sources":["../../src/plugins/klarna.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,OAAO,EAAY,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAIlE,cAAc,cAAc,CAAC;AAE7B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,wFAAwF;QACxF,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC;KACjD;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"klarna.js","sourceRoot":"","sources":["../../src/plugins/klarna.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,OAAO,EAAE,QAAQ,EAA4B,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AAEtD,cAAc,cAAc,CAAC;AAS7B,WAAW,CACT;IACE,QAAQ,CAAc,OAA6B;QACjD,OAAO,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,uBAAuB,EAAE,CACnC,CAAC"}
1
+ {"version":3,"file":"klarna.js","sourceRoot":"","sources":["../../src/plugins/klarna.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,OAAO,EAAE,QAAQ,EAA4B,MAAM,cAAc,CAAC;AAElE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,cAAc,cAAc,CAAC;AAS7B,WAAW,CACT;IACE,QAAQ,CAAc,OAA6B;QACjD,OAAO,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,uBAAuB,EAAE,CACnC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type PayPalAmountOptions } from '../paypal.js';
2
2
  export * from '../paypal.js';
3
- declare module '../money.js' {
3
+ declare module '../index.js' {
4
4
  interface Money<C extends string> {
5
5
  /** The exact `value` string for PayPal: `money('1000', 'HUF').toPayPalValue()` is '1000'. */
6
6
  toPayPalValue(options?: PayPalAmountOptions): string;
@@ -1 +1 @@
1
- {"version":3,"file":"paypal.d.ts","sourceRoot":"","sources":["../../src/plugins/paypal.ts"],"names":[],"mappings":"AAKA,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEjF,cAAc,cAAc,CAAC;AAE7B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,6FAA6F;QAC7F,aAAa,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC;QACrD,2DAA2D;QAC3D,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG;YAAE,aAAa,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KACnF;CACF"}
1
+ {"version":3,"file":"paypal.d.ts","sourceRoot":"","sources":["../../src/plugins/paypal.ts"],"names":[],"mappings":"AAMA,OAAO,EAA2B,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEjF,cAAc,cAAc,CAAC;AAE7B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,6FAA6F;QAC7F,aAAa,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC;QACrD,2DAA2D;QAC3D,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG;YAAE,aAAa,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KACnF;CACF"}
@@ -1,7 +1,3 @@
1
- /**
2
- * `@ducatjs/money/paypal`: PayPal's amount view. Importing this module adds `toPayPal` and
3
- * `toPayPalValue`.
4
- */
5
1
  import { extendMoney } from '../money.js';
6
2
  import { toPayPal, toPayPalValue } from '../paypal.js';
7
3
  export * from '../paypal.js';
@@ -1 +1 @@
1
- {"version":3,"file":"paypal.js","sourceRoot":"","sources":["../../src/plugins/paypal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAA4B,MAAM,cAAc,CAAC;AAEjF,cAAc,cAAc,CAAC;AAW7B,WAAW,CACT;IACE,aAAa,CAAc,OAA6B;QACtD,OAAO,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;IACD,QAAQ,CAAc,OAA6B;QACjD,OAAO,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,uBAAuB,EAAE,CACnC,CAAC"}
1
+ {"version":3,"file":"paypal.js","sourceRoot":"","sources":["../../src/plugins/paypal.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAA4B,MAAM,cAAc,CAAC;AAEjF,cAAc,cAAc,CAAC;AAW7B,WAAW,CACT;IACE,aAAa,CAAc,OAA6B;QACtD,OAAO,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;IACD,QAAQ,CAAc,OAA6B;QACjD,OAAO,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,uBAAuB,EAAE,CACnC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export * from '../prisma.js';
2
- declare module '../money.js' {
2
+ declare module '../index.js' {
3
3
  interface Money<C extends string> {
4
4
  /** A Decimal for a NUMERIC column: `m.toDecimalValue(Prisma.Decimal)`. */
5
5
  toDecimalValue<D>(Decimal: new (value: string) => D): D;
@@ -1 +1 @@
1
- {"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../src/plugins/prisma.ts"],"names":[],"mappings":"AAOA,cAAc,cAAc,CAAC;AAE7B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,0EAA0E;QAC1E,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;KACzD;CACF"}
1
+ {"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../src/plugins/prisma.ts"],"names":[],"mappings":"AAQA,cAAc,cAAc,CAAC;AAE7B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,0EAA0E;QAC1E,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,CAAC;KACzD;CACF"}
@@ -1,7 +1,3 @@
1
- /**
2
- * `@ducatjs/money/prisma`: Prisma and SQL column helpers. Importing this module adds
3
- * `toDecimalValue`.
4
- */
5
1
  import { extendMoney } from '../money.js';
6
2
  import { toDecimalValue } from '../prisma.js';
7
3
  export * from '../prisma.js';
@@ -1 +1 @@
1
- {"version":3,"file":"prisma.js","sourceRoot":"","sources":["../../src/plugins/prisma.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,cAAc,cAAc,CAAC;AAS7B,WAAW,CACT;IACE,cAAc,CAAc,OAAuC;QACjE,OAAO,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,uBAAuB,EAAE,CACnC,CAAC"}
1
+ {"version":3,"file":"prisma.js","sourceRoot":"","sources":["../../src/plugins/prisma.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,cAAc,cAAc,CAAC;AAS7B,WAAW,CACT;IACE,cAAc,CAAc,OAAuC;QACjE,OAAO,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,uBAAuB,EAAE,CACnC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type StripeAmountOptions } from '../stripe.js';
2
2
  export * from '../stripe.js';
3
- declare module '../money.js' {
3
+ declare module '../index.js' {
4
4
  interface Money<C extends string> {
5
5
  /** The integer `amount` to send to Stripe: `money('5', 'ISK').toStripeAmount()` is 500. */
6
6
  toStripeAmount(options?: StripeAmountOptions): number;
@@ -1 +1 @@
1
- {"version":3,"file":"stripe.d.ts","sourceRoot":"","sources":["../../src/plugins/stripe.ts"],"names":[],"mappings":"AAKA,OAAO,EAA4B,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAElF,cAAc,cAAc,CAAC;AAE7B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,2FAA2F;QAC3F,cAAc,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC;QACtD,+FAA+F;QAC/F,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;KAC/E;CACF"}
1
+ {"version":3,"file":"stripe.d.ts","sourceRoot":"","sources":["../../src/plugins/stripe.ts"],"names":[],"mappings":"AAMA,OAAO,EAA4B,KAAK,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAElF,cAAc,cAAc,CAAC;AAE7B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,2FAA2F;QAC3F,cAAc,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC;QACtD,+FAA+F;QAC/F,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,CAAC;KAC/E;CACF"}
@@ -1,7 +1,3 @@
1
- /**
2
- * `@ducatjs/money/stripe`: Stripe's minor-unit view. Importing this module adds `toStripe` and
3
- * `toStripeAmount`.
4
- */
5
1
  import { extendMoney } from '../money.js';
6
2
  import { toStripe, toStripeAmount } from '../stripe.js';
7
3
  export * from '../stripe.js';
@@ -1 +1 @@
1
- {"version":3,"file":"stripe.js","sourceRoot":"","sources":["../../src/plugins/stripe.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,WAAW,EAAc,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAA4B,MAAM,cAAc,CAAC;AAElF,cAAc,cAAc,CAAC;AAW7B,WAAW,CACT;IACE,cAAc,CAAc,OAA6B;QACvD,OAAO,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;IACD,QAAQ,CAAc,OAA6B;QACjD,OAAO,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,uBAAuB,EAAE,CACnC,CAAC"}
1
+ {"version":3,"file":"stripe.js","sourceRoot":"","sources":["../../src/plugins/stripe.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,cAAc,EAA4B,MAAM,cAAc,CAAC;AAElF,cAAc,cAAc,CAAC;AAW7B,WAAW,CACT;IACE,cAAc,CAAc,OAA6B;QACvD,OAAO,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvC,CAAC;IACD,QAAQ,CAAc,OAA6B;QACjD,OAAO,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;CACF,EACD,EAAE,KAAK,EAAE,uBAAuB,EAAE,CACnC,CAAC"}
@@ -3,9 +3,10 @@
3
3
  * methods below.
4
4
  */
5
5
  import type { Factor } from '../decimal.js';
6
+ import { type RoundingInput } from '../money.js';
6
7
  import { type TaxBreakdown } from '../tax.js';
7
8
  export * from '../tax.js';
8
- declare module '../money.js' {
9
+ declare module '../index.js' {
9
10
  interface Money<C extends string> {
10
11
  /** `percent`% of this, e.g. `price.percentage(15, 'halfEven')` */
11
12
  percentage(percent: Factor, rounding?: RoundingInput): Money<C>;
@@ -1 +1 @@
1
- {"version":3,"file":"tax.d.ts","sourceRoot":"","sources":["../../src/plugins/tax.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAA4C,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAExF,cAAc,WAAW,CAAC;AAE1B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,kEAAkE;QAClE,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAChE,4BAA4B;QAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAC9D,4EAA4E;QAC5E,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QACnE,8EAA8E;QAC9E,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;KACxE;CACF"}
1
+ {"version":3,"file":"tax.d.ts","sourceRoot":"","sources":["../../src/plugins/tax.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAe,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAA4C,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAExF,cAAc,WAAW,CAAC;AAE1B,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM;QAC9B,kEAAkE;QAClE,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAChE,4BAA4B;QAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QAC9D,4EAA4E;QAC5E,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QACnE,8EAA8E;QAC9E,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;KACxE;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"tax.js","sourceRoot":"","sources":["../../src/plugins/tax.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAkC,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAqB,MAAM,WAAW,CAAC;AAExF,cAAc,WAAW,CAAC;AAe1B,WAAW,CACT;IACE,UAAU,CAAc,OAAe,EAAE,QAAwB;QAC/D,OAAO,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IACD,QAAQ,CAAc,OAAe,EAAE,QAAwB;QAC7D,OAAO,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;IACD,MAAM,CAAc,OAAe,EAAE,QAAwB;QAC3D,OAAO,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACzC,CAAC;IACD,UAAU,CAAc,OAAe,EAAE,QAAwB;QAC/D,OAAO,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;CACF,EACD,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAChC,CAAC"}
1
+ {"version":3,"file":"tax.js","sourceRoot":"","sources":["../../src/plugins/tax.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAsB,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAqB,MAAM,WAAW,CAAC;AAExF,cAAc,WAAW,CAAC;AAe1B,WAAW,CACT;IACE,UAAU,CAAc,OAAe,EAAE,QAAwB;QAC/D,OAAO,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;IACD,QAAQ,CAAc,OAAe,EAAE,QAAwB;QAC7D,OAAO,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC3C,CAAC;IACD,MAAM,CAAc,OAAe,EAAE,QAAwB;QAC3D,OAAO,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IACzC,CAAC;IACD,UAAU,CAAc,OAAe,EAAE,QAAwB;QAC/D,OAAO,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC7C,CAAC;CACF,EACD,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAChC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ducatjs/money",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Exact, fast, typed Money for TypeScript: integer minor units, bigint fallback, Stripe/Adyen views, allocation, cash rounding, Prisma helpers.",
5
5
  "homepage": "https://github.com/public/ducat#readme",
6
6
  "bugs": {
@@ -1,11 +1,12 @@
1
1
  /** `@ducatjs/money/adyen`: Adyen's minor-unit view. Importing this module adds `toAdyen`. */
2
2
  import { toAdyen } from '../adyen.js';
3
- import { extendMoney, type Money } from '../money.js';
3
+ import type { Money } from '../index.js';
4
+ import { extendMoney } from '../money.js';
4
5
  import type { RoundingMode } from '../rounding.js';
5
6
 
6
7
  export * from '../adyen.js';
7
8
 
8
- declare module '../money.js' {
9
+ declare module '../index.js' {
9
10
  interface Money<C extends string> {
10
11
  /**
11
12
  * Adyen `amount` object: `money('15000', 'IDR').toAdyen()` is `{ value: 15000, currency: 'IDR'
@@ -14,11 +14,12 @@ import {
14
14
  type Tranche,
15
15
  type Weight,
16
16
  } from '../allocate.js';
17
- import { extendMoney, type Money } from '../money.js';
17
+ import type { Money } from '../index.js';
18
+ import { extendMoney } from '../money.js';
18
19
 
19
20
  export * from '../allocate.js';
20
21
 
21
- declare module '../money.js' {
22
+ declare module '../index.js' {
22
23
  interface Money<C extends string> {
23
24
  /** Splits by weights; the parts always sum to this. */
24
25
  allocate(weights: readonly Weight[], options?: AllocateOptions): Money<C>[];
@@ -2,11 +2,12 @@
2
2
  * `@ducatjs/money/braintree`: Braintree's amount view. Importing this module adds `toBraintree`.
3
3
  */
4
4
  import { toBraintree, type BraintreeAmountOptions } from '../braintree.js';
5
- import { extendMoney, type Money } from '../money.js';
5
+ import type { Money } from '../index.js';
6
+ import { extendMoney } from '../money.js';
6
7
 
7
8
  export * from '../braintree.js';
8
9
 
9
- declare module '../money.js' {
10
+ declare module '../index.js' {
10
11
  interface Money<C extends string> {
11
12
  /** The exact `amount` string for Braintree: `money('10', 'USD').toBraintree()` is '10.00'. */
12
13
  toBraintree(options?: BraintreeAmountOptions): string;
@@ -3,12 +3,13 @@
3
3
  * rounding to an increment. Importing this module adds the methods below.
4
4
  */
5
5
  import { cashRound, roundToIncrement, type CashRoundOptions } from '../cash.js';
6
- import { extendMoney, type Money } from '../money.js';
6
+ import type { Money } from '../index.js';
7
+ import { extendMoney } from '../money.js';
7
8
  import type { RoundingMode } from '../rounding.js';
8
9
 
9
10
  export * from '../cash.js';
10
11
 
11
- declare module '../money.js' {
12
+ declare module '../index.js' {
12
13
  interface Money<C extends string> {
13
14
  /**
14
15
  * Rounds a cash total to the local cash step (CHF 0.05, SEK 1, ...); unchanged when no rule
@@ -3,11 +3,12 @@
3
3
  * and `toCheckoutAmount`.
4
4
  */
5
5
  import { toCheckout, toCheckoutAmount, type CheckoutAmountOptions } from '../checkout.js';
6
- import { extendMoney, type Money } from '../money.js';
6
+ import type { Money } from '../index.js';
7
+ import { extendMoney } from '../money.js';
7
8
 
8
9
  export * from '../checkout.js';
9
10
 
10
- declare module '../money.js' {
11
+ declare module '../index.js' {
11
12
  interface Money<C extends string> {
12
13
  /**
13
14
  * The integer `amount` to send to Checkout.com: `money('5000', 'CLP').toCheckoutAmount()` is
@@ -4,14 +4,15 @@
4
4
  */
5
5
  import { convert } from '../convert.js';
6
6
  import type { Factor } from '../decimal.js';
7
- import { extendMoney, type CurrencyInput, type Money, type RoundingInput } from '../money.js';
7
+ import type { Money } from '../index.js';
8
+ import { extendMoney, type CurrencyInput, type RoundingInput } from '../money.js';
8
9
  import type { ProviderConvertOptions } from '../convert.js';
9
10
  import type { RateProvider } from '../provider.js';
10
11
  import type { ConvertOptions, Rate } from '../rate.js';
11
12
 
12
13
  export * from '../convert.js';
13
14
 
14
- declare module '../money.js' {
15
+ declare module '../index.js' {
15
16
  interface Money<C extends string> {
16
17
  /** Converts at a Rate, rounding once: `eur.convert(eurUsd, 'halfEven')`. */
17
18
  convert<To extends string>(
@@ -3,11 +3,12 @@
3
3
  * `Money#exact`.
4
4
  */
5
5
  import { exact, type ExactMoney } from '../exact.js';
6
- import { extendMoney, type Money } from '../money.js';
6
+ import type { Money } from '../index.js';
7
+ import { extendMoney } from '../money.js';
7
8
 
8
9
  export * from '../exact.js';
9
10
 
10
- declare module '../money.js' {
11
+ declare module '../index.js' {
11
12
  interface Money<C extends string> {
12
13
  /**
13
14
  * The exact value, for chained arithmetic that rounds once: `price.exact().divide(3).round()`.
@@ -3,11 +3,12 @@
3
3
  * Money. Importing this module adds `Money#toFixedPoint()`.
4
4
  */
5
5
  import { moneyToFixed, type Fixed } from '../fixed.js';
6
- import { extendMoney, type Money } from '../money.js';
6
+ import type { Money } from '../index.js';
7
+ import { extendMoney } from '../money.js';
7
8
 
8
9
  export * from '../fixed.js';
9
10
 
10
- declare module '../money.js' {
11
+ declare module '../index.js' {
11
12
  interface Money<C extends string> {
12
13
  /**
13
14
  * The exact Fixed of this amount, at its scale: `money('12.34', 'EUR').toFixedPoint()` is
@@ -3,11 +3,12 @@
3
3
  * below.
4
4
  */
5
5
  import { format, formatToParts } from '../format.js';
6
- import { extendMoney, type Money } from '../money.js';
6
+ import type { Money } from '../index.js';
7
+ import { extendMoney } from '../money.js';
7
8
 
8
9
  export * from '../format.js';
9
10
 
10
- declare module '../money.js' {
11
+ declare module '../index.js' {
11
12
  interface Money<C extends string> {
12
13
  /** Locale formatting via Intl: `price.format('de-DE')` gives "19,99 €" */
13
14
  format(locale?: string, options?: Intl.NumberFormatOptions): string;
@@ -1,10 +1,11 @@
1
1
  /** `@ducatjs/money/klarna`: Klarna's amount view. Importing this module adds `toKlarna`. */
2
2
  import { toKlarna, type KlarnaAmountOptions } from '../klarna.js';
3
- import { extendMoney, type Money } from '../money.js';
3
+ import type { Money } from '../index.js';
4
+ import { extendMoney } from '../money.js';
4
5
 
5
6
  export * from '../klarna.js';
6
7
 
7
- declare module '../money.js' {
8
+ declare module '../index.js' {
8
9
  interface Money<C extends string> {
9
10
  /** The integer for any Klarna amount field: `money('25', 'EUR').toKlarna()` is 2500. */
10
11
  toKlarna(options?: KlarnaAmountOptions): number;
@@ -2,12 +2,13 @@
2
2
  * `@ducatjs/money/paypal`: PayPal's amount view. Importing this module adds `toPayPal` and
3
3
  * `toPayPalValue`.
4
4
  */
5
- import { extendMoney, type Money } from '../money.js';
5
+ import type { Money } from '../index.js';
6
+ import { extendMoney } from '../money.js';
6
7
  import { toPayPal, toPayPalValue, type PayPalAmountOptions } from '../paypal.js';
7
8
 
8
9
  export * from '../paypal.js';
9
10
 
10
- declare module '../money.js' {
11
+ declare module '../index.js' {
11
12
  interface Money<C extends string> {
12
13
  /** The exact `value` string for PayPal: `money('1000', 'HUF').toPayPalValue()` is '1000'. */
13
14
  toPayPalValue(options?: PayPalAmountOptions): string;
@@ -2,12 +2,13 @@
2
2
  * `@ducatjs/money/prisma`: Prisma and SQL column helpers. Importing this module adds
3
3
  * `toDecimalValue`.
4
4
  */
5
- import { extendMoney, type Money } from '../money.js';
5
+ import type { Money } from '../index.js';
6
+ import { extendMoney } from '../money.js';
6
7
  import { toDecimalValue } from '../prisma.js';
7
8
 
8
9
  export * from '../prisma.js';
9
10
 
10
- declare module '../money.js' {
11
+ declare module '../index.js' {
11
12
  interface Money<C extends string> {
12
13
  /** A Decimal for a NUMERIC column: `m.toDecimalValue(Prisma.Decimal)`. */
13
14
  toDecimalValue<D>(Decimal: new (value: string) => D): D;
@@ -2,12 +2,13 @@
2
2
  * `@ducatjs/money/stripe`: Stripe's minor-unit view. Importing this module adds `toStripe` and
3
3
  * `toStripeAmount`.
4
4
  */
5
- import { extendMoney, type Money } from '../money.js';
5
+ import type { Money } from '../index.js';
6
+ import { extendMoney } from '../money.js';
6
7
  import { toStripe, toStripeAmount, type StripeAmountOptions } from '../stripe.js';
7
8
 
8
9
  export * from '../stripe.js';
9
10
 
10
- declare module '../money.js' {
11
+ declare module '../index.js' {
11
12
  interface Money<C extends string> {
12
13
  /** The integer `amount` to send to Stripe: `money('5', 'ISK').toStripeAmount()` is 500. */
13
14
  toStripeAmount(options?: StripeAmountOptions): number;
@@ -3,12 +3,13 @@
3
3
  * methods below.
4
4
  */
5
5
  import type { Factor } from '../decimal.js';
6
- import { extendMoney, type Money, type RoundingInput } from '../money.js';
6
+ import type { Money } from '../index.js';
7
+ import { extendMoney, type RoundingInput } from '../money.js';
7
8
  import { addTax, discount, extractTax, percentage, type TaxBreakdown } from '../tax.js';
8
9
 
9
10
  export * from '../tax.js';
10
11
 
11
- declare module '../money.js' {
12
+ declare module '../index.js' {
12
13
  interface Money<C extends string> {
13
14
  /** `percent`% of this, e.g. `price.percentage(15, 'halfEven')` */
14
15
  percentage(percent: Factor, rounding?: RoundingInput): Money<C>;