tc39 / proposal-flatMap

proposal for flatten and flatMap on arrays
https://tc39.github.io/proposal-flatMap
214 stars 19 forks source link

`thisCtx` in FlattenIntoArray should default to `target` #6

Closed bevacqua closed 7 years ago

bevacqua commented 8 years ago

From reading the spec, currently FlattenIntoArray doesn't default to target as the this argument in .flatMap(fn).

michaelficarra commented 7 years ago

No, it should default to undefined, causing the this value of the mapper function to be the global object. This is the same behaviour as Array.prototype.map. Closing.