tgindex
JavaScript
@javascriptКнигианглийский

A resourceful newsletter featuring the latest and most important news, articles, books and updates in the world of #javascript 🚀 Don't miss our Quizzes! Let's chat: @nairihar

Последний пост
15:33
Последнее чтение
07:51
Постов за неделю
19
Всего постов
27
Тип
открытый
Язык
английский
Категория
Книги
В каталоге с
13 авг.
Подписчики
31 312
−9 за 3 дн.
Сутки
−5
−0,02%
Неделя
 
Месяц
 
Просмотров на пост
1 440
24 постов
Вовлечённость
4,6%
к подписчикам
Постов в день
2,7
всего 27
Упоминаний
2
каналов
Охват размещения
оценка
1/24сутки в ленте
1 187
1/48двое суток
1 360
1/72трое суток
1 467

Оценка по просмотрам недавних постов: пост набирает почти всё за первые сутки.

Посты

  • 15:3361473

    Did you know JavaScript supports a third type of comment (beyond // and /* */)? 😉 Mat Marquis shows off hashbang comments in a short YouTube video. And yes, they're in the language spec!

  • видео или голосовое, без подписи

  • CHALLENGE function test() { try { console.log(y); } catch (e) { return e.constructor.name; } } let result1 = test(); let y = 'hoisted'; console.log(result1, typeof y, y);

  • 14 авг.1 00047

    👀 anydoc: Convert 14 Document Formats into Markdown A Rust-powered library (with Node.js and WASM bindings) that converts Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and PDF documents into Markdown. I tried it on a 1,600 page PDF and it took less than 2 seconds. There's also an in-browser demo to try it out. GitHub repo. Firecrawl

  • видео или голосовое, без подписи

  • 14 авг.1 0221

    CHALLENGE const arr = [1, 2, 3, 4, 5]; arr[Symbol.iterator] = function* () { for (let i = 0; i < 3; i++) yield arr[i] * 2; }; console.log([...arr], JSON.stringify(arr));

  • 13 авг.1 19912

    🤟 Node.js 26.7.0 (Current) Released Landing just two days after 26.6, coverage reports can now include files your tests didn't touch with --test-coverage-include-all, FFI and SQLite pick up crash fixes, and Perfetto tracing support lands, though you'll need a custom build to use it. Antoine du Hamel

  • 13 авг.1 27823

    видео или голосовое, без подписи

  • 13 авг.1 21273

    CHALLENGE class Money { #amount; constructor(amount) { this.#amount = amount; } [Symbol.toPrimitive](hint) { if (hint === 'number') return this.#amount; if (hint === 'string') return `$${this.#amount}`; return `Money(${this.#amount})`; } } const m = new Money(42); console.log(`${m}`, m + 8, m == 42);

  • 12 авг.1 32183

    ↗️ TanStack Charts: A New Chart Grammar Option In the past few weeks, TanStack has been rapidly iterating on a new, framework-neutral way to declaratively specify a large number of chart-related visualizations in JavaScript. Output renders to SVG or canvas and can be styled as you wish. Here's a comparison against other established options. TanStack

  • 12 авг.1 3563

    видео или голосовое, без подписи

  • 12 авг.1 27551

    CHALLENGE const str = "2024-01-15"; const result = str.replace(/(\d+)-(\d+)-(\d+)/, "$3/$2/$1"); const s2 = "abc".padStart(6, "12"); const s3 = [..."hello"].reverse().join(""); console.log(result, s2, s3);

  • 11 авг.1 52442

    👀 Next.js 16.3 Released The newly expanded Next.js team (now including Dan Abramov and 𝕏 Pete Hunt!) has dropped the latest version of the popular React framework, complete with faster builds, optional TypeScript 7 type checking, faster SSR, Instant Navigations, AI improvements, and more. The Next.js Team

  • 11 авг.1 5543

    видео или голосовое, без подписи

  • 11 авг.1 5302

    CHALLENGE function memoize(fn) { const cache = new Map(); return (...args) => { const key = JSON.stringify(args); if (cache.has(key)) return cache.get(key); const result = fn(...args); cache.set(key, result); return result; }; } let calls = 0; const add = memoize((a, b) => { calls++; return a + b; }); const r1 = add(1, 2); const r2 = add(2, 1); const r3 = add(1, 2); console.log(r1, r2, r3, calls);

  • 10 авг.1 66871

    видео или голосовое, без подписи

  • 10 авг.1 49562

    CHALLENGE const Loggable = { log() { return `[${this.constructor.name}] ${this.toString()}`; } }; class Base { toString() { return 'Base instance'; } } Object.setPrototypeOf(Base.prototype, Loggable); class Derived extends Base { toString() { return 'Derived instance'; } } const b = new Base(); const d = new Derived(); console.log(b.log(), d.log(), Object.getPrototypeOf(Derived.prototype) === Base.prototype);

  • 9 авг.1 63711

    видео или голосовое, без подписи

  • 9 авг.1 64821

    CHALLENGE class Config { constructor(options = {}) { this.retries = options.retries ?? 3; this.timeout = options.timeout ?? 1000; } } const cfg1 = new Config({ retries: 0, timeout: null }); const cfg2 = new Config({ retries: undefined, timeout: false }); cfg1.retries ??= 99; cfg2.timeout ??= 99; console.log(cfg1.retries, cfg1.timeout, cfg2.retries, cfg2.timeout);

  • 8 авг.1 77281

    видео или голосовое, без подписи