> 2. If the last parameter is boolean, then it's created as
> includeNonEnumerable:
>
> Object.assign(desc, source1[, source2, ... sourceN, includeNonEnumerable);
>
> Example;
>
> Object.assign({a: 10}, {b: 20}, Object.defineProperties({}, {c: {value:
> 30}}), true); // {a: 10, b: 20, c: 30}

That's a slightly dangerous path due to the so-called "Boolean Trap".
See e.g. http://ariya.ofilabs.com/2011/08/hall-of-api-shame-boolean-trap.html.


-- 
Ariya Hidayat, http://ariya.ofilabs.com
http://twitter.com/ariyahidayat
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to