LCOV - code coverage report
Current view: top level - src/core/primitives/array - array.js (source / functions) Hit Total Coverage
Test: cov_profile.lcov Lines: 12 12 100.0 %
Date: 2021-12-16 00:47:58 Functions: 3 3 100.0 %
Branches: 6 6 100.0 %

           Branch data     Line data    Source code
       1                 :         42 : const array = (seeded, qty, input, processor = (i) => i) => {
       2            [ + ]:         90 :   // TODO: I think the processor pattern is used a couple of times, can it be generalised?
       3                 :         90 :   const myProcessor = typeof processor === "string"
       4                 :         90 :     ? (i) => i.join(processor)
       5            [ + ]:         90 :     : processor;
       6            [ + ]:         90 :   const quantity = typeof qty === "object" && qty.constructor === Object
       7            [ + ]:         90 :     ? seeded.number(qty)
       8            [ + ]:         90 :     : seeded.recurse(seeded.clone(), qty);
       9            [ + ]:         90 :   return myProcessor(seeded.recurse(seeded, Array(quantity).fill(input)));
      10                 :         42 : };
      11                 :         42 : 
      12                 :         21 : export default array;

Generated by: LCOV version 1.15