TIL that Array.prototype.flatMap callbacks can return non-arrays and they'll be treated the same as if they were an array of that one item i.e. flattened into the target array.
I don't think I like that.
pic.twitter.com/IeWpt9P7mC
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
Purely from an untyped "its sugar for map + flat" it absolutely makes sense, but that's only because JS is untyped and allows arrays to contain any values. having flatMap() itself allow this behavior feels gross and a footgun to me, similar to Promise::then(cb)
I'm just bitching lol I hate untagged union returns.
I was really hoping that it would recursively call flatMap on every element so that I could ruin import() combined with Promise.all().
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.