ข้ามไปเนื้อหาหลัก

#javascript 51

รายการ Projects, Resources และ Notes ทั้งหมดที่มี tag นี้

Projects 2

active

Schema Markup Generator

Web tool สร้าง JSON-LD structured data สำหรับ e-commerce — Product, BreadcrumbList, Organization schema พร้อม copy-paste

อ่านเพิ่ม →

active

Web Component UI Kit

ชุด UI components ที่สร้างด้วย Custom Elements ล้วน — Button, Badge, Tooltip, Dialog — ใช้ร่วมกับทุก framework หรือ vanilla HTML

อ่านเพิ่ม →

Resources 26

reference

Browser Web APIs — ResizeObserver, Clipboard, Broadcast Channel, Web Workers

Web APIs ที่ใช้บ่อยและมักถูกมองข้าม: ResizeObserver, MutationObserver, Clipboard, Broadcast Channel, Web Workers

อ่านเพิ่ม →

guide

Fetch API Patterns — Data Fetching, AbortController, Retry

Patterns สำหรับ fetch ข้อมูล: timeout, retry, AbortController, error handling, caching headers, streaming response

อ่านเพิ่ม →

guide

GSAP Animation Guide — คู่มือ Animation ที่ทุก Frontend ควรรู้

GSAP คืออะไร ทำงานยังไง และวิธีใช้งานจริงในโปรเจกต์ — ตั้งแต่ gsap.to() พื้นฐานไปถึง ScrollTrigger และ Timeline

อ่านเพิ่ม →

guide

HTML Forms & Native Validation

Native HTML5 form validation, Constraint Validation API, custom error messages, และ patterns สำหรับ accessible forms

อ่านเพิ่ม →

guide

Browser Storage — localStorage, sessionStorage, IndexedDB

เปรียบเทียบและใช้งาน browser storage: localStorage สำหรับ simple KV, IndexedDB สำหรับ structured data ขนาดใหญ่

อ่านเพิ่ม →

guide

Intersection Observer API — Lazy Load, Scroll Animations, Infinite Scroll

ใช้ IntersectionObserver ตรวจว่า element เข้า/ออก viewport โดยไม่ต้องใช้ scroll event

อ่านเพิ่ม →

guide

JavaScript Closures และ Scope — เข้าใจจริง ไม่ใช่แค่ท่อง

Scope chain, lexical environment, closures ทำงานยังไง, และ use cases จริงที่เจอบ่อย

อ่านเพิ่ม →

reference

JavaScript Date & Intl API — จัดการวันที่และการแสดงผลหลายภาษา

วิธีใช้ Date object, Intl.DateTimeFormat, Intl.NumberFormat, Intl.RelativeTimeFormat และ Temporal API สำหรับจัดการวันที่ใน JavaScript โดยไม่ต้องใช้ library

อ่านเพิ่ม →

reference

JavaScript Design Patterns

Design patterns ที่ใช้บ่อยใน JavaScript/TypeScript: Singleton, Observer, Factory, Strategy, Command, และ Module pattern

อ่านเพิ่ม →

guide

JavaScript Error Handling — try/catch, Custom Errors, Result Pattern

Patterns สำหรับจัดการ errors ใน JavaScript/TypeScript: custom error classes, error chaining, Result type, async error handling

อ่านเพิ่ม →

guide

JavaScript Generators และ Iterators — Lazy Sequences

function*, yield, iterators protocol และ use cases จริง: infinite sequences, async generators, pipeline

อ่านเพิ่ม →

reference

JavaScript Modern APIs (2023–2025)

APIs ใหม่ที่ใช้ได้ใน modern browsers และ Node.js: Object.groupBy, Array methods ใหม่, structuredClone, Promise.withResolvers, และอื่นๆ

อ่านเพิ่ม →

reference

JavaScript Modules (ESM) — Import/Export ที่ควรรู้

เข้าใจ ES Modules, named exports, default exports, dynamic import(), re-exports และการใช้ร่วมกับ TypeScript และ Astro

อ่านเพิ่ม →

reference

JavaScript Promises & Async/Await — จัดการ Asynchronous อย่างถูกต้อง

อธิบาย Promise chain, async/await, error handling, Promise.all/race/allSettled และ pitfalls ที่พบบ่อยเมื่อเขียน async JavaScript ใน TypeScript

อ่านเพิ่ม →

reference

JavaScript Proxy & Reflect

Proxy ดักจับ operations บน object (get, set, delete) และ Reflect ให้ default behavior — ใช้สร้าง reactive data, validation, lazy loading

อ่านเพิ่ม →

reference

Node.js File System — fs/promises, path, Common Patterns

อ่าน เขียน คัดลอก ลบไฟล์และ directory ด้วย fs/promises และ path module — patterns ที่ใช้บ่อยใน scripts

อ่านเพิ่ม →

guide

Node.js Streams — Readable, Writable, Transform, Pipeline

จัดการข้อมูลปริมาณมากด้วย Node.js Streams: pipe, pipeline, Transform streams, backpressure, และ async iteration

อ่านเพิ่ม →

reference

Regular Expressions ใน JavaScript — Pattern Matching ที่ใช้ได้จริง

Regex patterns ที่ใช้บ่อยใน JavaScript และ TypeScript รวม flags, character classes, groups, lookahead/lookbehind และ use cases จริงสำหรับ validation และ parsing

อ่านเพิ่ม →

reference

Vite Config Guide — Plugins, Alias, Build Options

vite.config.ts ตั้งแต่ alias, resolve, plugins จนถึง build optimization และ dev server options

อ่านเพิ่ม →

guide

Vitest — Unit Testing สำหรับ TypeScript และ Vite Projects

Vitest คือ test runner ที่เร็วที่สุดสำหรับ Vite-based projects — setup วิธีเขียน test และ pattern ที่ใช้จริง

อ่านเพิ่ม →

reference

Web Components & Custom Elements

สร้าง reusable components ด้วย browser APIs โดยตรง: Custom Elements, Shadow DOM, HTML Templates — ไม่ต้องการ framework

อ่านเพิ่ม →

reference

HTMX — HTML Attributes แทน JavaScript สำหรับ Dynamic UI

คู่มือ HTMX — ทำ AJAX, WebSocket และ SSE ด้วย HTML attributes โดยไม่เขียน JavaScript

อ่านเพิ่ม →

guide

Cloudflare Workers — Serverless บน Edge Network

คู่มือ Cloudflare Workers — เขียน serverless function ที่รันบน 300+ edge locations พร้อม KV, D1, R2 storage

อ่านเพิ่ม →

reference

Bun Runtime — JavaScript runtime ที่เร็วกว่า Node

คู่มือ Bun — runtime ที่รวม bundler, test runner และ package manager ไว้ด้วยกัน ใช้แทน Node + npm ได้เลย

อ่านเพิ่ม →

reference

Web Storage — localStorage, sessionStorage และ IndexedDB

เปรียบเทียบ storage options ใน browser — localStorage, sessionStorage, IndexedDB และเมื่อไหร่ควรใช้อะไร

อ่านเพิ่ม →

guide

Service Workers — Cache Strategy สำหรับ Static Site

คู่มือ Service Worker สำหรับ offline caching, stale-while-revalidate และ cache management บน static site

อ่านเพิ่ม →

Notes 19

note

Array.at() อ่าน element จากท้าย array ได้โดยไม่ต้องคำนวณ index

arr.at(-1) อ่าน element สุดท้าย — สะอาดกว่า arr[arr.length - 1] มาก

อ่านเพิ่ม →

note

crypto.randomUUID() — สร้าง UUID v4 ใน browser และ Node.js โดยไม่ต้องลง library

Web Crypto API มี randomUUID() ในตัว — ไม่ต้อง import uuid หรือ nanoid เพื่อแค่สร้าง unique ID

อ่านเพิ่ม →

note

structuredClone() deep copy ที่ถูกต้องกว่า JSON trick

ลืม JSON.parse(JSON.stringify()) ไปได้เลย — structuredClone() รองรับ Date, Map, Set และ type อื่นๆ ได้ถูกต้อง

อ่านเพิ่ม →

note

Object.groupBy — จัดกลุ่ม array ใน ES2024 โดยไม่ต้องเขียน reduce

Object.groupBy(array, keyFn) แทน reduce ที่ verbose — ส่งคืน object ที่ key คือค่าที่ groupBy และ value คือ array ของ items ในกลุ่มนั้น

อ่านเพิ่ม →

note

Promise.allSettled ไม่หยุดแม้ promise ตัวใดตัวหนึ่ง reject

Promise.all หยุดทันทีเมื่อมี reject — Promise.allSettled รอทุกตัวจบแล้วค่อยรายงานผลแยก fulfilled/rejected

อ่านเพิ่ม →

Books 4

You Don't Know JS (series)

Kyle Simpson · 2015

อ่านแล้ว ★★★★★

Eloquent JavaScript

Marijn Haverbeke · 2018

อ่านแล้ว ★★★★☆

JavaScript: The Good Parts

Douglas Crockford · 2008

อ่านแล้ว ★★★☆☆

Programming TypeScript

Boris Cherny · 2019

Backlog