UNPKG

ix

Version:

The Interactive Extensions for JavaScript

12 lines (10 loc) 268 B
import { toInteger } from './tointeger'; const maxSafeInteger = Math.pow(2, 53) - 1; /** * @ignore */ export function toLength(value) { const len = toInteger(value); return Math.min(Math.max(len, 0), maxSafeInteger); } //# sourceMappingURL=tolength.mjs.map