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 的文章
在 JavaScript 中使用 JSON.stringify(data, null, 2) 格式化 JSON。涵盖 replacer、BigInt、Date、Node.js 文件、CLI 和 fast-json-stringify。无需安装。
在 JavaScript 中使用 atob()、Buffer.from() 和 js-base64 安全解码 Base64 数据。涵盖 UTF-8 恢复、JWT 解码、URL 安全变体、Node.js 流和常见错误。
深入学习 JavaScript URL 编码:encodeURIComponent()、encodeURI() 与 URLSearchParams 的使用场景、字符参考表、Fetch 示例及四种常见生产 bug 的修复方法。
详解 JavaScript URL 解码:decodeURIComponent()、decodeURI() 与 URLSearchParams 的区别,+ 号与空格转换规则,安全的 try/catch 用法,以及生产环境中最常见的四种错误及修复方法。适用于 Node.js 与浏览器环境。
深入讲解 JavaScript Base64 编码方法:btoa()、Buffer.from() 及 TextEncoder。涵盖 Unicode 处理、URL 安全变体、文件编码、CLI 用法和四个常见错误,附完整代码示例。