# unset
# Description
移除 object 对象 path 路径上的属性。
# Params
(object, path)
# Return
Boolean
# Depend
import baseUnset from './.internal/baseUnset.js'
# Code
function unset(object, path) {
return object == null ? true : baseUnset(object, path)
}
# Analyze
如果 object
为 null
或者 undefined
,返回 ture ,否则调用 baseUnset
# Example
const a = {a:1,b:2}
unset(a, 'b')
console.log(a) // { a: 1 }