@onehat/data 1.19.40 → 1.19.41

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.19.40",
3
+ "version": "1.19.41",
4
4
  "description": "JS data modeling package with adapters for many storage mediums.",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -53,6 +53,13 @@ export default class BooleanProperty extends Property {
53
53
  return Parsers.ParseBool(this.parsedValue); // Use a Parser instead of a Formatter to make sure we submit it as an actual boolean primitive value
54
54
  }
55
55
 
56
+ toggle = () => {
57
+ if (this.isDestroyed) {
58
+ throw Error('this.toggle is no longer valid. Property has been destroyed.');
59
+ }
60
+ this.parsedValue = !this.parsedValue;
61
+ }
62
+
56
63
  };
57
64
 
58
65
  BooleanProperty.className = 'Boolean';