es6 默认选项参数

es6 default options param

在"Understanding ECMAScript6"、

[The] default object needs to have all the same information as the destructured parameters (with the same defaults, to ensure consistent behavior), like the one in this version of the setCookie() function:

function setCookie(name, value,
    {
        secure = false,
        path = "/",
        domain = "example.com",
        expires = new Date(Date.now() + 360000000)
    } = {
        secure: false,
        path: "/",
        domain: "example.com",
        expires: new Date(Date.now() + 360000000)
    }
) {
    // ...
}

我的问题是为什么不直接将解构对象设置为一个空对象?为什么它需要是一个具有相同信息的对象?我无法从复制默认值中感知到任何 "win"。

的确,这是重复的,没有必要;对照 https://github.com/nzakas/understandinges6/issues/255