Skip to content

Commit

Permalink
fix(deps): leverage geocode glossary
Browse files Browse the repository at this point in the history
  • Loading branch information
uladkasach committed Dec 12, 2024
1 parent 5674430 commit fa033a5
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 13 deletions.
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"dependencies": {
"@ehmpathy/error-fns": "1.3.7",
"domain-glossaries": "1.0.0",
"domain-glossary-geocode": "1.0.1",
"domain-objects": "0.24.2",
"type-fns": "1.19.0",
"zipcodes": "8.0.0"
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ enable static-type checks for postcodes
- `isPostcode`

declare useful procedures to operate on postcodes
- e.g., `getGeocodeOfPostcode`
- e.g., `getCentroidOfPostcode`


# install
Expand Down Expand Up @@ -42,6 +42,6 @@ const postcode: Postcode = isPostcode.assure('33127');
### get the geocode of a postcode

```ts
const centroid: Geocode = getGeocodeOfPostcode('33127')
const centroid: Geocode = getCentroidOfPostcode('33127')
```

10 changes: 0 additions & 10 deletions src/domain/Geocode.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { UnexpectedCodePathError } from '@ehmpathy/error-fns';
import { Geocode } from 'domain-glossary-geocode';
import zipcodes from 'zipcodes';

import { Geocode } from './domain/Geocode';
import { Postcode } from './domain/Postcode';

export const getCentroidOfPostcode = (input: Postcode): Geocode => {
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './domain/Postcode';
export * from './getCentroidOfPostcode';

0 comments on commit fa033a5

Please sign in to comment.