UNPKG

regstr

Version:

JSON.stringify objects with RegExp properties and then JSON.parse json string resulted back into original objects. Converts RegExp object to be serializable - into pair of strings (key,value). Could be used for RegExp being bilaterally stringified and ge

22 lines (21 loc) 563 B
/** * shows list of testing entities in console output. Test applied utility. * @param {Array<number|RegExp|Array<any>|Object>} oTst array of testing * entities specified * @return {void} */ exports.showTestEntities=function (oTst){ var m=0; oTst.forEach((e,i) => { if (e[0].length>m) { m=e[0].length; } }); console.log(m); oTst.forEach( e => { var k=m-e[0].length; var f = ()=>{var s=" ";return ()=> s=s+" "};f1=f();for(i=0; i<=k; i++){var ss=f1()}; console.log( e[0] + ss +":",e[1]); }); return; }