Axel Rauschmayer wrote:
It's not too late for find and findIndex, and they do fit the pattern.

Is an options object as the last parameter out of the question? For find(), I’d love to have the option to specify a result other than `undefined` if the value isn’t found. Such a result would be an option, as would be `thisValue`.

If there's a pigeon-hole problem where thisArg and notFound fight, then maybe -- but there's another object allocation, and we're not really following any existing pattern at this point. Option objects are common but not in built-in APIs, esp. not in the Array generic methods.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to