@flowgram.ai/utils 0.1.0-alpha.8 → 0.1.0-alpha.9

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/index.js CHANGED
@@ -1841,7 +1841,6 @@ var Cache;
1841
1841
  return cache;
1842
1842
  },
1843
1843
  getMore(count, autoDelete = true) {
1844
- var _a;
1845
1844
  if (count === cache.length) {
1846
1845
  } else if (count > cache.length) {
1847
1846
  let added = count - cache.length;
@@ -1850,7 +1849,7 @@ var Cache;
1850
1849
  added--;
1851
1850
  }
1852
1851
  } else if (autoDelete) {
1853
- const deleteLimit = (_a = opts.deleteLimit) != null ? _a : 0;
1852
+ const deleteLimit = opts.deleteLimit ?? 0;
1854
1853
  if (cache.length - count > deleteLimit) {
1855
1854
  const deleted = cache.splice(count);
1856
1855
  deleted.forEach((el) => el.dispose && el.dispose());
@@ -1866,12 +1865,11 @@ var Cache;
1866
1865
  const newCache = [];
1867
1866
  const findedMap = /* @__PURE__ */ new Map();
1868
1867
  cache.forEach((item) => {
1869
- var _a;
1870
1868
  const finded = items.find((i) => i.key === item.key);
1871
1869
  if (finded) {
1872
1870
  findedMap.set(item.key, item);
1873
1871
  } else {
1874
- (_a = item.dispose) == null ? void 0 : _a.call(item);
1872
+ item.dispose?.();
1875
1873
  }
1876
1874
  });
1877
1875
  items.forEach((item) => {
@@ -1893,12 +1891,11 @@ var Cache;
1893
1891
  const newCache = [];
1894
1892
  const findedMap = /* @__PURE__ */ new Map();
1895
1893
  cache.forEach((cacheItem) => {
1896
- var _a;
1897
1894
  const finded = items.find((ref) => ref === cacheItem.key);
1898
1895
  if (finded) {
1899
1896
  findedMap.set(cacheItem.key, cacheItem);
1900
1897
  } else {
1901
- (_a = cacheItem.dispose) == null ? void 0 : _a.call(cacheItem);
1898
+ cacheItem.dispose?.();
1902
1899
  }
1903
1900
  });
1904
1901
  items.forEach((item) => {
@@ -1978,11 +1975,11 @@ var SchemaDecoration;
1978
1975
  return {
1979
1976
  type: "object",
1980
1977
  properties: {
1981
- ...baseDecoration == null ? void 0 : baseDecoration.properties,
1978
+ ...baseDecoration?.properties,
1982
1979
  ...properties
1983
1980
  },
1984
1981
  mixinDefaults: {
1985
- ...baseDecoration == null ? void 0 : baseDecoration.mixinDefaults,
1982
+ ...baseDecoration?.mixinDefaults,
1986
1983
  ...mixinDefaults
1987
1984
  }
1988
1985
  };