@onehat/data 1.22.46 → 1.22.48

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/data",
3
- "version": "1.22.46",
3
+ "version": "1.22.48",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -304,6 +304,10 @@ export default class Schema extends EventEmitter {
304
304
  return propertyDefinition.name === propertyName;
305
305
  }));
306
306
 
307
+ if (!found) {
308
+ throw Error('Property "' + propertyName + '" not found in schema "' + this.name + '".');
309
+ }
310
+
307
311
  if (this.model?.validator?.fields && this.model.validator.fields[propertyName]) {
308
312
  found.validator = this.model?.validator?.fields[propertyName];
309
313
  }
@@ -30,6 +30,10 @@ class Formatters {
30
30
  return numeral(value).format('0,000');
31
31
  }
32
32
 
33
+ static FormatIntNoCommas = (value) => {
34
+ return numeral(value).format('0');
35
+ }
36
+
33
37
  static FormatBoolAsYesNo = (value) => {
34
38
  let ret;
35
39
  if (_.isNil(value)) {