@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.
Files changed (2) hide show
  1. package/lib/taxon.js +7 -7
  2. 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 Taxon.getFileName( this.getName(), ext );
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() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ca-plant-list/ca-plant-list",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Tools to create Jekyll files for a website listing plants in an area of California.",
5
5
  "license": "MIT",
6
6
  "repository": {