MCPcopy Create free account
hub / github.com/apitable/apitable / numbersBetween

Function numbersBetween

packages/core/src/utils/number.ts:238–243  ·  view source on GitHub ↗
(left: number, right: number)

Source from the content-addressed store, hash-verified

236// left: 5, right: 8
237// @return [6, 7];
238export function numbersBetween(left: number, right: number) {
239 const _left = Math.min(left, right);
240 const _right = Math.max(left, right);
241 const diff = _right - _left - 1;
242 return Array.from({ length: diff }).map((_, index) => _left + index + 1);
243}
244
245// Convert the number to the correct value not NaN;
246export function noNaN(n: number) {

Callers 2

checkVersionMethod · 0.90

Calls 2

maxMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected