Skip to content

Commit 1e1290a

Browse files
committed
compacted the usage section together and added info for Bun
1 parent a140fff commit 1e1290a

1 file changed

Lines changed: 11 additions & 18 deletions

File tree

README.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,22 @@ arithmetic on IP addresses and subnets.
1515

1616
## Usage
1717

18-
### Node.js
18+
### Installation
1919

20-
Install from NPM:
20+
Install the package using your preferred environment:
2121

2222
```sh
23+
# Node.js
2324
npm install @cldn/ip
24-
```
25-
26-
Import and use:
27-
28-
```ts
29-
import { IPv4, IPv6, Subnet } from "@cldn/ip";
30-
```
31-
32-
### Deno
33-
34-
Add from JSR:
3525

36-
```sh
26+
# Deno
3727
deno add jsr:@cldn/ip
28+
29+
# Bun
30+
bun install @cldn/ip
3831
```
3932

40-
Import and use:
33+
### Import
4134

4235
```ts
4336
import { IPv4, IPv6, Subnet } from "@cldn/ip";
@@ -46,10 +39,10 @@ import { IPv4, IPv6, Subnet } from "@cldn/ip";
4639
### Browsers
4740

4841
For browser usage, it is recommended to use a bundler like
49-
[Vite](https://vitejs.dev/), or [Webpack](https://webpack.js.org/). If you are
50-
using a bundler, follow the same usage as for Node.js.
42+
[Vite](https://vitejs.dev/) or [Webpack](https://webpack.js.org/). If using a
43+
bundler, import as above.
5144

52-
Alternatively, you can import the library as a
45+
Alternatively, load as a
5346
[JavaScript module](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules)
5447
from [ESM>CDN](https://esm.sh/):
5548

0 commit comments

Comments
 (0)