- ✅
Object.keys
- 🚫
Object.entries
- 测试代码
- ✅
const data = JSON.parse('{ "foo": 123, "bar": 456, ... }')
- 🚫
const data = { foo: 123, bar: 456, ... }
- tool:
babel-plugin-object-to-json-parse
- reference: https://youtu.be/ff4fgQxPaO0
- ✅
new Set()
- 🚫
{}
- 测试代码
- ✅
new Map()
- 🚫
{}