@hestia-earth/glossary 0.91.0 → 0.91.1
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/index.js
CHANGED
|
@@ -7,7 +7,8 @@ const loadResource = (filename) => require(`./resources/${filename}`);
|
|
|
7
7
|
* @param {string} key The key in the resource file.
|
|
8
8
|
* @returns {any} The data associated with the `key`.
|
|
9
9
|
*/
|
|
10
|
-
const loadResourceKey = (filename, key) =>
|
|
10
|
+
const loadResourceKey = (filename, key) =>
|
|
11
|
+
key ? loadResource(filename)[key] : loadResource(filename);
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Converts the iso31662 code to the [term.name](https://hestia.earth/schema/Term#name) from the HESTIA Glossary.
|