Newman api ability to write an assert

In a newman.run.on event is there an ability to write an an assertion. I need to compare downloaded files and report if they are equal or not.