From cb3a43ed8a1799dbf6cc94bea9c234ca1e20e209 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samy=20Pess=C3=A9?= Date: Tue, 24 Mar 2015 08:49:22 +0100 Subject: [PATCH] Add string representation for books --- lib/book.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/book.js b/lib/book.js index a9bc40cca..bdd4dfccd 100644 --- a/lib/book.js +++ b/lib/book.js @@ -94,6 +94,11 @@ var Book = function(root, context, parent) { _.bindAll(this); }; +// Return string representation +Book.prototype.toString = function() { + return "[Book "+this.root+"]"; +}; + // Initialize and parse the book: config, summary, glossary Book.prototype.parse = function() { var that = this;