This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Return a table string representation of the matrix | |
* @param {Array} matrix The matrix | |
* @param {String} prop The property to print | |
*/ | |
function stringifyMatrix(matrix, prop = "originalValue") { | |
return matrix | |
.map((e) => e.map((e) => (prop === "" ? String(e) : e[prop]))) | |
.join("\n") | |
.replace(/\,/g, " "); |
OlderNewer