@dxos/util 0.7.5-labs.ea4b4c2 → 0.7.5-labs.f400bbc

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.
@@ -1359,6 +1359,9 @@ var range = (n, mapper) => {
1359
1359
  var rangeFromTo = (from, to, mapper) => {
1360
1360
  return mapper == null ? range(to - from, (i) => i + from) : range(to - from, (i) => mapper(i + from));
1361
1361
  };
1362
+ var clamp = (value, min, max) => {
1363
+ return Math.min(Math.max(value, min), max);
1364
+ };
1362
1365
 
1363
1366
  // packages/common/util/src/reducers.ts
1364
1367
  var accessBy = (value, accessor) => typeof accessor === "function" ? accessor(value) : value[accessor];
@@ -1876,8 +1879,7 @@ var stringifyTree = (node, ancestors = [], rows = []) => {
1876
1879
 
1877
1880
  // packages/common/util/src/types.ts
1878
1881
  var isNotFalsy = (value) => !!value;
1879
- var nonNullable = (value) => value !== null && value !== void 0;
1880
- var isNotNullOrUndefined = (value) => value != null;
1882
+ var isNonNullable = (value) => value != null;
1881
1883
  var doAsync = async (fn) => fn();
1882
1884
  var getProviderValue = (provider, arg) => {
1883
1885
  return typeof provider === "function" ? provider(arg) : provider;
@@ -2044,6 +2046,7 @@ export {
2044
2046
  byPosition,
2045
2047
  capitalize,
2046
2048
  chunkArray,
2049
+ clamp,
2047
2050
  compareMulti,
2048
2051
  compareObject,
2049
2052
  compareScalar,
@@ -2084,8 +2087,8 @@ export {
2084
2087
  intersection,
2085
2088
  iosCheck,
2086
2089
  isNode,
2090
+ isNonNullable,
2087
2091
  isNotFalsy,
2088
- isNotNullOrUndefined,
2089
2092
  joinTables,
2090
2093
  jsonKeyReplacer,
2091
2094
  jsonReplacer,
@@ -2099,7 +2102,6 @@ export {
2099
2102
  mapValues,
2100
2103
  median,
2101
2104
  mobileAndTabletCheck,
2102
- nonNullable,
2103
2105
  numericalValues,
2104
2106
  omit,
2105
2107
  orderKeys,