📜  javascript 中 lodash 省略的替代方法 - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:50.508000             🧑  作者: Mango

代码示例1
const omitSingle = (key, { [key]: _, ...obj }) => obj
const profile = { name: 'Maria', age: 30 }

const result = omitSingle('name', profile)

console.log(result)