1const { Tween, update, Easing } = window.TWEEN 2 3const run = (countFromEl, countToEl) => { 4 if (countFromEl === null && countToEl === null) { 5 return 6 } 7 8 const countTo = countToEl.value 9 10 const num = { value: 0 } 11 12 const updateValue = ({ value }) => { 13 countFromEl.textContent = new Intl.NumberFormat('en-UK', { 14 maximumFractionDigits: 0 15 }).format(value) 16 } 17 18 const animate = () => { 19 if (update()) { 20 requestAnimationFrame(animate) 21 } 22 } 23 24 const tween = new Tween(num) 25 26 tween 27 .to({ value: Number.parseInt(countTo, 10) }, 2000) 28 .easing(Easing.Quadratic.Out) 29 .onUpdate((res) => { 30 updateValue(res) 31 }) 32 .start() 33 34 requestAnimationFrame(animate) 35} 36 37const countToEl = document.querySelector('input[name=count]') 38const countFromEl = document.querySelector('.js-count') 39run(countFromEl, countToEl)
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.