@ca-plant-list/ca-plant-list 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/taxon.js +7 -7
- package/package.json +1 -1
package/lib/taxon.js
CHANGED
@@ -47,6 +47,11 @@ class Taxon {
|
|
47
47
|
}
|
48
48
|
}
|
49
49
|
|
50
|
+
getBaseFileName() {
|
51
|
+
// Convert spaces to "-" and remove ".".
|
52
|
+
return this.#name.replaceAll( " ", "-" ).replaceAll( ".", "" );
|
53
|
+
}
|
54
|
+
|
50
55
|
getCalfloraName() {
|
51
56
|
if ( this.#cfSyn ) {
|
52
57
|
return this.#cfSyn;
|
@@ -83,13 +88,8 @@ class Taxon {
|
|
83
88
|
return Genera.getFamily( this.#genus );
|
84
89
|
}
|
85
90
|
|
86
|
-
getFileName( ext ) {
|
87
|
-
return
|
88
|
-
}
|
89
|
-
|
90
|
-
static getFileName( name, ext = "html" ) {
|
91
|
-
// Convert spaces to "-" and remove ".".
|
92
|
-
return name.replaceAll( " ", "-" ).replaceAll( ".", "" ) + "." + ext;
|
91
|
+
getFileName( ext = "html" ) {
|
92
|
+
return this.getBaseFileName() + "." + ext;
|
93
93
|
}
|
94
94
|
|
95
95
|
getGenus() {
|