@bbn/bbn 2.0.16 → 2.0.18

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/dist/date.js CHANGED
@@ -787,7 +787,9 @@ class bbnDateTool {
787
787
  __classPrivateFieldSet(this, _bbnDateTool_value, new Date(), "f");
788
788
  }
789
789
  else if (inputFormat) {
790
- __classPrivateFieldSet(this, _bbnDateTool_value, bbnDateTool.parse(value, inputFormat), "f");
790
+ if (this.matchFormat(value, inputFormat)) {
791
+ __classPrivateFieldSet(this, _bbnDateTool_value, bbnDateTool.parse(value, inputFormat), "f");
792
+ }
791
793
  }
792
794
  else {
793
795
  if (t === 'number' || (isNumber(value) && value !== '')) {
@@ -820,14 +822,16 @@ class bbnDateTool {
820
822
  __classPrivateFieldSet(this, _bbnDateTool_value, new Date(...value), "f");
821
823
  }
822
824
  }
823
- if (__classPrivateFieldGet(this, _bbnDateTool_value, "f") === undefined) {
824
- const obj = {};
825
- return new Proxy(this, {
826
- get: (target, prop) => {
827
- return undefined;
828
- }
829
- });
830
- }
825
+ /*
826
+ if (this.#value === undefined) {
827
+ const obj = {};
828
+ return new Proxy(this, {
829
+ get: (target, prop) => {
830
+ if (prop === 'isValid')
831
+ return undefined;
832
+ }
833
+ });
834
+ }*/
831
835
  }
832
836
  parse(input, format) {
833
837
  const d = bbnDateTool.parse(input, format);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "2.0.16",
3
+ "version": "2.0.18",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",