arithmetic-operations-for/naturals-big-endian

View on GitHub
src/core/array/_alloc.js

Summary

Maintainability
A
0 mins
Test Coverage
import assert from 'assert';

/**
 * Allocate a new limb array.
 *
 * @param {number} n The size of the array to allocate.
 *
 * @return {number[]} The new limb array.
 */
export default function _alloc(n) {
    assert(n >= 0);

    return new Array(n);
}