summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2021-02-19 15:41:49 -0500
committerBrian Cully <bjc@kublai.com>2021-02-19 15:41:49 -0500
commit1a34ebb6117fd45485b24d6f857850e9c3f293fa (patch)
treeede3d9091527ab5e23f45e1882c41dfb33bea9bf
parenta5e378e2b4c075f09d3293ccc301f0e504cb20d7 (diff)
downloadmolsim2-1a34ebb6117fd45485b24d6f857850e9c3f293fa.tar.gz
molsim2-1a34ebb6117fd45485b24d6f857850e9c3f293fa.zip
Add GenomeList.penultimate
-rw-r--r--genome-list.mjs8
1 files changed, 8 insertions, 0 deletions
diff --git a/genome-list.mjs b/genome-list.mjs
index 8969a8c..c057d34 100644
--- a/genome-list.mjs
+++ b/genome-list.mjs
@@ -18,6 +18,14 @@ class GenomeList {
return undefined
}
}
+
+ get penultimate() {
+ if (this.genomes.length > 1) {
+ return this.genomes[this.genomes.length - 2]
+ } else {
+ return undefined
+ }
+ }
}
export default GenomeList