-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: release more functions and improved documentation
- Loading branch information
Showing
13 changed files
with
533 additions
and
410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,6 @@ elUtils is a **zero-dependency** modern package, written in TypeScript, strongly | |
|
||
Check all the [available functions here](#api) (by module category). | ||
|
||
<!-- | ||
todo: runs on many JavaScript runtimes (such as node, deno and bun) | ||
https://paka.dev/npm/@tsevdos/[email protected]/api | ||
--> | ||
|
||
## Installation | ||
|
||
```shell | ||
|
@@ -37,6 +32,10 @@ const { getAdministrativeRegions, getDays, ... } = require("@tsevdos/el-utils"); | |
console.log(getAdministrativeRegions()); | ||
``` | ||
|
||
## Demo | ||
|
||
Check **all the available functions** on this [**code sandbox**](https://codesandbox.io/p/sandbox/elutils-demo-r8sphg). | ||
|
||
## API<a id='api'></a> | ||
|
||
The library is currently split into the following modules: | ||
|
@@ -49,12 +48,23 @@ The library is currently split into the following modules: | |
- [getAdministrativeUnits()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getAdministrativeUnits) | ||
- [getAdministrativeUnitById()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getAdministrativeUnitById) | ||
- [getMunicipalities()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getMunicipalities) | ||
- [getCities()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getCities) | ||
- [searchCityByName()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#searchCityByName) | ||
- [getCityById()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getCityById) | ||
- [getCityAdministrativeDivision()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getCityAdministrativeDivision) | ||
- [getGeographicRegions()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getGeographicRegions) | ||
- [getGeographicRegionById()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getGeographicRegionById) | ||
- [getPrefectures()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getPrefectures) | ||
- [getPrefectureById()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getPrefectureById) | ||
- [getAllPostalCodes()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getAllPostalCodes) | ||
- [findByPostalCode()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#findByPostalCode) | ||
- [getAllTaxOffices()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getAllTaxOffices) | ||
- [getTaxOfficeById()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getTaxOfficeById) | ||
- [getTaxOfficesByRegionId()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getTaxOfficesByRegionId) | ||
- [getTaxOfficesByUnitId()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getTaxOfficesByUnitId) | ||
- [getTaxOfficesByMunicipalityId()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getTaxOfficesByMunicipalityId) | ||
- [getTaxOfficesByPostalCode()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#getTaxOfficesByPostalCode) | ||
- [searchTaxOffice()](https://github.com/tsevdos/elUtils/blob/main/docs/geoUtils.md#searchTaxOffice) | ||
|
||
- [**`validationUtils`**](https://github.com/tsevdos/elUtils/blob/main/docs/validationUtils.md) | ||
|
||
|
@@ -86,4 +96,4 @@ If you like the project but just don't have time to contribute, that's fine. The | |
|
||
## License | ||
|
||
MIT© [John Tsevdos](http://tsevdos.me) | ||
MIT© [John Tsevdos](https://tsevdos.me) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# LanguageUtils | ||
|
||
The `LanguageUtils` module provides utility functions for handling Greek text. These functions help in normalizing Greek text by removing accents, spaces, and special characters, and converting the text to uppercase for comparison purposes. | ||
|
||
## Table of Contents | ||
|
||
- [convertsGreekTextToComparableUpperCase](#convertsgreektexttocomparableuppercase) | ||
- [compareGreekStrings](#comparegreekstrings) | ||
|
||
--- | ||
|
||
### convertsGreekTextToComparableUpperCase()<a id='convertsGreekTextToComparableUpperCase'></a> | ||
|
||
**Description**: Removes accents, spaces, and special characters from the input string and converts it to uppercase (for easier comparison). | ||
|
||
**Parameters:** | ||
|
||
- **`input`** (`string`): The Greek text to be converted. | ||
|
||
## **Return Type**: The normalized and uppercased string. | ||
|
||
--- | ||
|
||
### compareGreekStrings()<a id='compareGreekStrings'></a> | ||
|
||
**Description**: Compares two Greek strings by normalizing them (removing accents, spaces, and special characters) and converting them to uppercase. | ||
|
||
**Parameters:** | ||
|
||
- **`stringA`** (`string`): The first Greek string to compare. | ||
- **`stringB`** (`string`): The second Greek string to compare. | ||
|
||
## **Return Type**: `true` if the normalized strings are equal, `false` otherwise. |
Oops, something went wrong.