epfl-unit-api
Advanced tools
+1
-1
| { | ||
| "name": "epfl-unit-api", | ||
| "version": "4.0.0", | ||
| "version": "4.0.1", | ||
| "description": "EPFL Unit API", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
+1
-1
@@ -114,4 +114,4 @@ <p align="center"> | ||
| (c) William Belle, 2019-2023. | ||
| (c) William Belle, 2019-2024. | ||
| See the [LICENSE](LICENSE) file for more details. |
+2
-6
| /* | ||
| * (c) William Belle, 2019-2023. | ||
| * (c) William Belle, 2019-2024. | ||
| * See the LICENSE file for more details. | ||
@@ -14,6 +14,2 @@ */ | ||
| const buildCodeUrl = (code, language) => { | ||
| return UNITS_URL + '?acro=' + code + '&hl=' + language; | ||
| }; | ||
| const findUnitByName = (unit, language = 'en') => { | ||
@@ -25,3 +21,3 @@ const url = buildUnitUrl(unit, language); | ||
| const findUnitByCode = (code, language = 'en') => { | ||
| const url = buildCodeUrl(code, language); | ||
| const url = buildUnitUrl(code, language); | ||
| return getUnit(url); | ||
@@ -28,0 +24,0 @@ }; |
15528
-0.67%27
-10%