Skip to content

Commit

Permalink
docs: ✏️ use right names
Browse files Browse the repository at this point in the history
  • Loading branch information
touv committed Dec 24, 2021
1 parent db78fa8 commit 22e1005
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
18 changes: 15 additions & 3 deletions docs/plugin-libpostal.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ npm install @ezs/libpostal
#### Table of Contents

- [expandAddress](#expandaddress)
- [expandAddressWith](#expandaddresswith)
- [parseAddress](#parseaddress)
- [parseAddress](#parseaddress-1)
- [parseAddressWith](#parseaddresswith)

### expandAddress

Expand All @@ -27,10 +28,10 @@ This will contain a standardized version of the address.

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**

### parseAddress
### expandAddressWith

Takes a field of object containing an address to return the same object except for the field containing the address.
This will contain the different fields found in the address.
This will contain a standardized version of the address.

#### Parameters

Expand All @@ -44,3 +45,14 @@ Takes a string containing an address to return an object.
This will contain the different fields present in the address.

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**

### parseAddressWith

Takes a field of object containing an address to return the same object except for the field containing the address.
This will contain the different fields found in the address.

#### Parameters

- `path` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** path to the chosen field

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
18 changes: 15 additions & 3 deletions packages/libpostal/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ npm install @ezs/libpostal
#### Table of Contents

- [expandAddress](#expandaddress)
- [expandAddressWith](#expandaddresswith)
- [parseAddress](#parseaddress)
- [parseAddress](#parseaddress-1)
- [parseAddressWith](#parseaddresswith)

### expandAddress

Expand All @@ -27,10 +28,10 @@ This will contain a standardized version of the address.

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**

### parseAddress
### expandAddressWith

Takes a field of object containing an address to return the same object except for the field containing the address.
This will contain the different fields found in the address.
This will contain a standardized version of the address.

#### Parameters

Expand All @@ -44,3 +45,14 @@ Takes a string containing an address to return an object.
This will contain the different fields present in the address.

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**

### parseAddressWith

Takes a field of object containing an address to return the same object except for the field containing the address.
This will contain the different fields found in the address.

#### Parameters

- `path` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** path to the chosen field

Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
2 changes: 1 addition & 1 deletion packages/libpostal/src/expand-address-with.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const expand = (input) => ({
.reduce((obj, cur) => ({ ...obj, [cur.component]: cur.value }), {}),
});

/*
/**
* Takes a field of object containing an address to return the same object except for the field containing the address.
* This will contain a standardized version of the address.
*
Expand Down
2 changes: 1 addition & 1 deletion packages/libpostal/src/parse-address-with.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const parse = (input) => ({
* Takes a field of object containing an address to return the same object except for the field containing the address.
* This will contain the different fields found in the address.
*
* @name parseAddress
* @name parseAddressWith
* @param {String} [path] path to the chosen field
* @returns {Object}
*/
Expand Down

0 comments on commit 22e1005

Please sign in to comment.