const xxx = ([...str]) => [...new Set(Array.from(
{ length: str.length * 10 },
(n, i) => str.map((m, j) => (j === (i / 10 | 0)) ? i % 10 : m).join('')
))];
function xxx(str) {
const arr = str.split('');
const result = [ str ];
for (const [ i, n ] of arr.entries()) {
for (let j = 0; j < 10; j++) {
if (j !== +n) {
arr[i] = j;
result.push(arr.join(''));
}
}
arr[i] = n;
}
return result;
}