@dxos/util 0.7.5-labs.c0e040f → 0.7.5-labs.d199c0f

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];
@@ -2043,6 +2046,7 @@ export {
2043
2046
  byPosition,
2044
2047
  capitalize,
2045
2048
  chunkArray,
2049
+ clamp,
2046
2050
  compareMulti,
2047
2051
  compareObject,
2048
2052
  compareScalar,