НС
Например, от virtual dom сейчас нет пользы в скорости, только вред и неудобные события.
А та часть сахара, что нужна, уже существует в виде отдельных библиотек.
Size: a a a
НС
НС
НС
НС
НС
НС
t
function range(current, end, step = 1) {
if(current && !end) {
end = current;
current = 0;
}
const isStepPositive = current < end;
if(!isStepPositive) {
step = -step
}
return {[Symbol.iterator]: () => ({
next() {
const previous = current;
return (isStepPositive ? current < end : current > end)
? { value: (current = current + step, previous), done: false }
: { done: true };
}
})
}
}
S
function range(current, end, step = 1) {
if(current && !end) {
end = current;
current = 0;
}
const isStepPositive = current < end;
if(!isStepPositive) {
step = -step
}
return {[Symbol.iterator]: () => ({
next() {
const previous = current;
return (isStepPositive ? current < end : current > end)
? { value: (current = current + step, previous), done: false }
: { done: true };
}
})
}
}
L
function range(current, end, step = 1) {
if(current && !end) {
end = current;
current = 0;
}
const isStepPositive = current < end;
if(!isStepPositive) {
step = -step
}
return {[Symbol.iterator]: () => ({
next() {
const previous = current;
return (isStepPositive ? current < end : current > end)
? { value: (current = current + step, previous), done: false }
: { done: true };
}
})
}
}
L
t
L
t
L
t