ECMAScript 2019
Object 的新 API
obj = { abc: 1, def: 2, ghij: 3 };
res = Object.fromEntries(
Object.entries(obj)
.filter(([ key, val ]) => key.length === 3)
.map(([ key, val ]) => [ key, val * 2 ])
);
// res is { 'abc': 2, 'def': 4 }Array 的新 API
String 的新 API
JSON.stringify 对 unicode 字符集进行优化
JSON.stringify 对 unicode 字符集进行优化最后更新于