Skip to content

Commit 5ef006f

Browse files
committed
📝 Add Guide for Node.js users
1 parent 9b6876f commit 5ef006f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,24 @@ const a: unknown = "Hello";
136136
const _: string = maybe(a, is.String) ?? "default value";
137137
```
138138

139+
## Node.js (npm)
140+
141+
To use `unknownutil` in [Node.js][nodejs], install `unknownutil` like
142+
143+
```console
144+
npm i unknownutil
145+
```
146+
147+
Then import `is`, `assert`, `ensure`, and `maybe` like:
148+
149+
```typescript, ignore
150+
import { assert, ensure, is, maybe } from "unknownutil";
151+
152+
// ...
153+
```
154+
155+
[nodejs]: https://nodejs.org/
156+
139157
## Migration
140158

141159
See [GitHub Wiki](https://github.com/lambdalisue/deno-unknownutil/wiki) for

0 commit comments

Comments
 (0)