📅  最后修改于: 2022-03-11 14:47:50.508000             🧑  作者: Mango
const omitSingle = (key, { [key]: _, ...obj }) => obj
const profile = { name: 'Maria', age: 30 }
const result = omitSingle('name', profile)
console.log(result)