diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-04-28 11:15:51 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-04-28 11:15:51 +0200 |
commit | 4763f1342c1b63d2f43ae2f5060b93d4c09271fd (patch) | |
tree | 5ef83232fa187532efe01f59ce3d794476d56b60 /lib/models | |
parent | 9413e53b001c3a7ee9d07a362a7bdd69df4d4c1e (diff) | |
download | gitbook-4763f1342c1b63d2f43ae2f5060b93d4c09271fd.zip gitbook-4763f1342c1b63d2f43ae2f5060b93d4c09271fd.tar.gz gitbook-4763f1342c1b63d2f43ae2f5060b93d4c09271fd.tar.bz2 |
Add base modifiers for summary as SummaryModifier
Diffstat (limited to 'lib/models')
-rw-r--r-- | lib/models/summary.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/models/summary.js b/lib/models/summary.js index 079c535..444c191 100644 --- a/lib/models/summary.js +++ b/lib/models/summary.js @@ -66,6 +66,17 @@ Summary.prototype.getByPath = function(filePath) { }; /** + Return the first article + + @return {Article} +*/ +Summary.prototype.getFirstArticle = function() { + return this.getArticle(function(article) { + return true; + }); +}; + +/** Render summary as text @return {Promise<String>} |