(function(app) {
  app.BooksSortPipe = ng.core
    .Pipe({
      name: 'sort'
    })
    .Class({
      constructor: function() {},
      transform: function(books) {          
        var sortOnName = function(book1, book2) {
          return book1.name.localeCompare(book2.name);
        }                                           
        
        return books.slice().sort(sortOnName);
      }
    });
})(window.app || (window.app = {}));