We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trimStart
trimLeft
trimEnd
trimRight
[1, 2, , [4, 5]].flat() // [1, 2, 4, 5] [1, 2, [3, [4, 5]]].flat(2) // [1, 2, 3, 4, 5] [1, [2, [3]]].flat(Infinity) // [1, 2, 3]
// 相当于 [[2, 4], [3, 6], [4, 8]].flat() [2, 3, 4].flatMap((x) => [x, x * 2]) // [2, 4, 3, 6, 4, 8]
Object.fromEntries()方法是Object.entries()的逆操作,用于将一个键值对数组转为对象。
Object.fromEntries()
Object.entries()
const sym = Symbol('foo') String(sym) // "Symbol(foo)" sym.toString() // "Symbol(foo)" sym.description // "foo"
Function.prototype.toString()方法返回函数代码本身,以前会省略注释和空格,修改后,明确要求返回一模一样的原始代码。
Function.prototype.toString()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
String.prototype
trimStart
trimLeft
trimEnd
trimRight
Array.prototype
数组的排序稳定性
Object.fromEntries()
Object.fromEntries()
方法是Object.entries()
的逆操作,用于将一个键值对数组转为对象。Symbol.prototype.description
try { } catch { }
直接输入 U+2028 和 U+2029
JSON.stringify() 的改进
fn.toString()的改进
Function.prototype.toString()
方法返回函数代码本身,以前会省略注释和空格,修改后,明确要求返回一模一样的原始代码。参考资料
The text was updated successfully, but these errors were encountered: