entropy-source/pseudo-random

View on GitHub
src/fill.js

Summary

Maintainability
B
4 hrs
Test Coverage

Function fill has 53 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const fill = (prng, array, i, j) => {
    switch (array.constructor) {
        case ArrayBuffer: {
            return _fill(nextUint8, new Uint8Array(array), i, j);
        }
Severity: Major
Found in src/fill.js - About 2 hrs to fix

    Avoid too many return statements within this function.
    Open

                return _fill(nextBigUint64, prng, array, i, j);
    Severity: Major
    Found in src/fill.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return _fill(nextFloat32, prng, array, i, j);
      Severity: Major
      Found in src/fill.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return _fill(nextFloat64, prng, array, i, j);
        Severity: Major
        Found in src/fill.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return _fill(nextBigInt64, prng, array, i, j);
          Severity: Major
          Found in src/fill.js - About 30 mins to fix

            There are no issues that match your filters.

            Category
            Status