How to test a page and verify all the links and images on the page are not broken(using protractor javascript)

How to test a page and verify all the links and images on the page are not broken(using protractor javascript)

I am looking for a solution in javascript and protractor and I do not know where to start.