@kaspernj/api-maker 1.0.139 → 1.0.140

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/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  ]
17
17
  },
18
18
  "name": "@kaspernj/api-maker",
19
- "version": "1.0.139",
19
+ "version": "1.0.140",
20
20
  "description": "",
21
21
  "main": "index.js",
22
22
  "repository": {
@@ -54,6 +54,15 @@ module.exports = class MoneyFormatter {
54
54
  return moneyCurrency
55
55
  }
56
56
 
57
+ static isMoney(value) {
58
+ if (value instanceof Money) return true
59
+
60
+ if (typeof value == "object" && value && Object.keys(value).length == 2 && value.amount && value.currency)
61
+ return true
62
+
63
+ return false
64
+ }
65
+
57
66
  constructor (money, args = {}) {
58
67
  this.args = args
59
68
  this.money = money