Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

docs(toh-5): use Array.prototype.find() instead of filter #1801

Closed
wants to merge 1 commit into from
Closed

docs(toh-5): use Array.prototype.find() instead of filter #1801

wants to merge 1 commit into from

Conversation

kutyel
Copy link

@kutyel kutyel commented Jul 1, 2016

We are in TypeScript, so we can avoid worrying about ECMAScript methods being implemented or not (as find() is already implemented in TypeScript) and, personally, my eyes hurt when I see a filter() returning its first element [0] without checking if it returned something before.

We are in TypeScript, so we cain avoid worrying about ECMAScript methods being implemented or not (as `find()` is already implemented in TypeScript) and, personally, my eyes hurt when I see a `filter()` returning its first element `[0]' without checking if it returned something before.
@kutyel kutyel changed the title Use Array.prototype.find() instead of filter docs(toh-5): use Array.prototype.find() instead of filter Jul 1, 2016
wardbell added a commit to IdeaBlade/angular.io that referenced this pull request Jul 2, 2016
@wardbell
Copy link
Contributor

wardbell commented Jul 2, 2016

I agree. And many thanks!

But why stop with this file? Fix 'em all. That's what I did with #1816 which supersedes your PR here.

@wardbell wardbell closed this Jul 2, 2016
@kutyel kutyel deleted the patch-1 branch July 3, 2016 10:15
@kutyel
Copy link
Author

kutyel commented Jul 3, 2016

Thanks @wardbell! I agree with you as well.

Nevertheless, I really would have liked to make the change myself, to feel that I was doing my bit... 😉

@wardbell
Copy link
Contributor

wardbell commented Jul 3, 2016

Oh. Sorry. But you really did the most important thing by calling it out. The rest took me 15 minutes. Thanks again.

@kutyel
Copy link
Author

kutyel commented Jul 3, 2016

Ok, don't worry! You're welcome! 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants