@bbn/bbn 1.0.34 → 1.0.36

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/bundle.js CHANGED
@@ -2147,7 +2147,6 @@
2147
2147
  }
2148
2148
  const typesList = [];
2149
2149
  (0, each_10.each)(type, (t) => {
2150
- var _a;
2151
2150
  if (t === String) {
2152
2151
  t = 'string';
2153
2152
  }
@@ -2167,7 +2166,7 @@
2167
2166
  t = 'function';
2168
2167
  }
2169
2168
  if ((0, isFunction_5.isFunction)(t)) {
2170
- typesList.push(t.name || ((_a = t.constructor) === null || _a === void 0 ? void 0 : _a.name) || t.toString());
2169
+ typesList.push(t.name || t.constructor?.name || t.toString());
2171
2170
  if (value instanceof t) {
2172
2171
  ok = true;
2173
2172
  return false;
@@ -4605,7 +4604,7 @@
4605
4604
  Object.defineProperty(exports, "__esModule", { value: true });
4606
4605
  exports.makeReactive = void 0;
4607
4606
  const makeReactive = function (obj, onSet, parent, parentProp) {
4608
- const parentString = (parent === null || parent === void 0 ? void 0 : parent.$cid) || '';
4607
+ const parentString = parent?.$cid || '';
4609
4608
  const prefix = '__bbn_' + (parentString ? parentString + '_' : '');
4610
4609
  if (obj && typeof obj === 'object' && [undefined, Object, Array].includes(obj.constructor)) {
4611
4610
  if (obj.__bbnIsProxy && obj.__bbnParent === parent) {
@@ -4646,7 +4645,7 @@
4646
4645
  }
4647
4646
  if (key === '__bbnRoot') {
4648
4647
  let root = obj;
4649
- while (root && (root === null || root === void 0 ? void 0 : root.__bbnTarget)) {
4648
+ while (root && root?.__bbnTarget) {
4650
4649
  root = root.__bbnTarget;
4651
4650
  }
4652
4651
  return root;
@@ -6241,7 +6240,7 @@
6241
6240
  Object.defineProperty(exports, "__cjsModule", { value: true });
6242
6241
  Object.defineProperty(exports, "default", { value: require(name) });
6243
6242
  }
6244
- catch (_a) {
6243
+ catch {
6245
6244
  throw Error(['module "', name, '" not found.'].join(''));
6246
6245
  }
6247
6246
  };
@@ -12,7 +12,6 @@ const checkType = function (value, type, msg, ...logs) {
12
12
  }
13
13
  const typesList = [];
14
14
  each(type, (t) => {
15
- var _a;
16
15
  if (t === String) {
17
16
  t = 'string';
18
17
  }
@@ -32,7 +31,7 @@ const checkType = function (value, type, msg, ...logs) {
32
31
  t = 'function';
33
32
  }
34
33
  if (isFunction(t)) {
35
- typesList.push(t.name || ((_a = t.constructor) === null || _a === void 0 ? void 0 : _a.name) || t.toString());
34
+ typesList.push(t.name || t.constructor?.name || t.toString());
36
35
  if (value instanceof t) {
37
36
  ok = true;
38
37
  return false;
@@ -7,7 +7,7 @@ import { warning } from './warning';
7
7
  import { isFunction } from './isFunction';
8
8
  import { isSame } from './isSame';
9
9
  const makeReactive = function (obj, onSet, parent, parentProp) {
10
- const parentString = (parent === null || parent === void 0 ? void 0 : parent.$cid) || '';
10
+ const parentString = parent?.$cid || '';
11
11
  const prefix = '__bbn_' + (parentString ? parentString + '_' : '');
12
12
  if (obj && typeof obj === 'object' && [undefined, Object, Array].includes(obj.constructor)) {
13
13
  if (obj.__bbnIsProxy && obj.__bbnParent === parent) {
@@ -48,7 +48,7 @@ const makeReactive = function (obj, onSet, parent, parentProp) {
48
48
  }
49
49
  if (key === '__bbnRoot') {
50
50
  let root = obj;
51
- while (root && (root === null || root === void 0 ? void 0 : root.__bbnTarget)) {
51
+ while (root && root?.__bbnTarget) {
52
52
  root = root.__bbnTarget;
53
53
  }
54
54
  return root;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbn/bbn",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "description": "Javascript toolkit",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",