Kevin Smith (2014-05-31T20:58:31.000Z)
In addition to what Allen said, you could also do something like this:

    function setCookie(name, value, { secure, path, domain, expires } =
cookieDefaults) { }

where `cookieDefaults` is defined elsewhere.

Or you could do something like:

    function setCookie(name, value, { secure = false, path = ".", domain =
"", expires = now() } = {}) { }

where you are specifying default initializers within the destructuring
pattern.

​Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140531/fe597ee2/attachment.html>
domenic at domenicdenicola.com (2014-06-10T19:00:43.664Z)
In addition to what Allen said, you could also do something like this:

    function setCookie(name, value, { secure, path, domain, expires } = cookieDefaults) { }

where `cookieDefaults` is defined elsewhere.

Or you could do something like:

    function setCookie(name, value, { secure = false, path = ".", domain = "", expires = now() } = {}) { }

where you are specifying default initializers within the destructuring
pattern.