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

           Branch data     Line data    Source code
       1                 :         12 : // TODO: should regex be part of core?
       2            [ + ]:         12 : 
       3                 :         12 : const regex = (RandExp) =>
       4                 :          0 :   (seeded, regex = /[A-F0-9]{16}/) => {
       5            [ + ]:          0 :     const myRandExp = new RandExp(RegExp(regex));
       6                 :          0 :     // redefine RandExp's random number generator to use Fiona's prng
       7                 :          0 :     myRandExp.randInt = (a, b) => a + Math.floor(seeded.random() * (1 + b - a));
       8                 :          0 :     // return the randomly generated string, not the RandExp object
       9                 :          0 :     return myRandExp.gen();
      10                 :          0 :   };
      11                 :         12 : 
      12                 :          6 : export default regex;

Generated by: LCOV version 1.15