Alex Chen
Front-end & Node.js Developer
เกี่ยวกับ
Alex is a front-end and Node.js developer with extensive experience building web applications and developer tooling. He is passionate about web standards, browser APIs, and the JavaScript ecosystem. In his spare time he contributes to open-source projects and writes about modern JavaScript patterns, performance optimisation, and everything related to the web platform.
บทความโดย Alex Chen
จัดรูปแบบ JSON ใน JavaScript ด้วย JSON.stringify(data, null, 2). ครอบคลุม replacer, BigInt, Date, ไฟล์ Node.js, CLI และ fast-json-stringify.
คู่มือครบถ้วนสำหรับ decode Base64 ใน JavaScript — atob(), Buffer.from(), URL-safe, JWT และวิธีหลีกเลี่ยง 4 ข้อผิดพลาดที่ทำให้ข้อความ UTF-8 เสียหาย
เข้ารหัส URL ใน JavaScript ด้วย encodeURIComponent(), encodeURI() และ URLSearchParams. ตัวอย่าง Fetch API, qs, ข้อผิดพลาดทั่วไป. Node.js 10+.
ถอดรหัส URL ใน JavaScript: decodeURIComponent(), decodeURI() และ URLSearchParams — ตัวอย่างโค้ด การจัดการข้อผิดพลาด และแนวทางปฏิบัติที่ดีที่สุด
คู่มือ Base64 ใน JavaScript: btoa(), Buffer.from(), Base64 URL-safe, Unicode, เข้ารหัสไฟล์ และข้อผิดพลาดสี่อย่างที่พบบ่อย พร้อมตัวอย่าง production.