Skip to content

Commit 22a3047

Browse files
committed
docs: Add consistent sentences
1 parent 72c8463 commit 22a3047

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ const ipinfoWrapper = new IPinfoWrapper("MY_TOKEN");
4242
```
4343

4444
> [!TIP]
45-
> If you are using ESM instead of CommonJS you can use `import`:
45+
> If you are using ESM instead of CommonJS you can use `import`.
4646
> ```
4747
> import { IPinfoWrapper } from "node-ipinfo";
4848
> ```
4949
50-
2. Perform a lookup for an IP address or ASN
50+
2. Perform a lookup for an IP address or ASN.
5151
5252
```typescript
5353
const ipinfo = await ipinfoWrapper.lookupIp("1.1.1.1");
@@ -68,7 +68,7 @@ const ipAddress = process.argv[2] || "1.1.1.1";
6868
ipinfoWrapper.lookupIp(ipAddress).then((ipinfo) => console.log(ipinfo));
6969
```
7070

71-
2. Run `ipinfo.js` (without an IP) to lookup 1.1.1.1
71+
2. Run `ipinfo.js` (without an IP) to lookup 1.1.1.1.
7272

7373
```shell
7474
node ipinfo.js
@@ -77,7 +77,8 @@ node ipinfo.js
7777
// ...
7878
```
7979
80-
3. Run `ipinfo.js` with an IP to lookup
80+
3. Run `ipinfo.js` with an IP to lookup, like `2.2.2.2` `8.8.8.8` or
81+
[your IP](https://ipinfo.io/what-is-my-ip).
8182
8283
```shell
8384
node ipinfo.js 2.2.2.2
@@ -88,14 +89,13 @@ node ipinfo.js 2.2.2.2
8889
8990
</details>
9091
91-
92-
9392
#### Best practices
9493
9594
Each `lookup` method will throw an error when the lookup does not complete
9695
successfully. A program that performs a lookup should catch errors unless it is
9796
desirable for the error to bubble up. For example, if your program is performing
98-
a lookup to find the country code of an IP:
97+
a lookup to find the country code of an IP you can return "N/A" when catching an
98+
error.
9999
100100
```typescript
101101
const countryCode = ipinfoWrapper

0 commit comments

Comments
 (0)