Published
Edited
Aug 6, 2021
Importers
Insert cell
# For Humans, Please
Insert cell
Insert cell
humanize = function (textoriginal) {
let textocorrigido = textoriginal;

for (let k in converttable) {
textocorrigido = textocorrigido.replaceAll(k, converttable[k]);
}

return textocorrigido;
}
Insert cell
test = humanize("testing "Á" and çã")
Insert cell
humanizeAll = function (arr) {
let newarr = [];
for (let z = 0; z < arr.length; z++) {
newarr[z] = {};
for (let k in arr[z]) {
newarr[z][k] = humanize(arr[z][k]);
}
}

return newarr;
}
Insert cell
testArray = [
{
name: "Mark &aelig;",
profession: "&auml; Pilot &auml;"
},
{
name: "Roger &Icirc;",
profession: "physi&THORN;cian &THORN;"
},
{
name: "Rose &Aring;",
profession: "&eacute; CEO"
}
]
Insert cell
xpto = humanizeAll(testArray)
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more