Skip to content

Commit c1341c1

Browse files
committed
docs: "when should i use this?"
Signed-off-by: Lexus Drumgold <[email protected]>
1 parent a35292c commit c1341c1

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

.dictionary.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ larsgw
2727
lcov
2828
micnncim
2929
mkbuild
30+
mlly
3031
nocheck
3132
npmrc
3233
nums

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![vitest](https://img.shields.io/badge/-vitest-6e9f18?style=flat&logo=vitest&logoColor=ffffff)](https://vitest.dev/)
88
[![yarn](https://img.shields.io/badge/-yarn-2c8ebb?style=flat&logo=yarn&logoColor=ffffff)](https://yarnpkg.com/)
99

10-
Utilities for creating [Node.js errors][1]
10+
Create [Node.js errors][1]
1111

1212
## Contents
1313

@@ -21,15 +21,21 @@ Utilities for creating [Node.js errors][1]
2121

2222
## What is this?
2323

24-
This package provides utilities for creating [Node.js errors][1].
24+
This package provides an API for creating [Node.js errors][1].
2525

2626
## When should I use this?
2727

28-
**TODO**: Update documentation.
28+
This package is designed to help developers build [ponyfills][2] and utilities like [`mlly`][3] by providing a universal
29+
API for creating [Node.js errors][1].
30+
31+
### Differences between Node.js
32+
33+
- **Does not capture larger stack traces**: The Node.js API temporarily overrides [`Error.stackTraceLimit`][4] to
34+
[capture larger stack traces][5]. This is **not** implemented to maintain browser compatibility.
2935

3036
## Install
3137

32-
This package is [ESM only][2].
38+
This package is [ESM only][6].
3339

3440
```sh
3541
yarn add @flex-development/errnode
@@ -58,12 +64,16 @@ yarn add @flex-development/errnode@flex-development/errnode
5864

5965
## Types
6066

61-
This package is fully typed with [TypeScript][3].
67+
This package is fully typed with [TypeScript][7].
6268

6369
## Contribute
6470

6571
See [`CONTRIBUTING.md`](CONTRIBUTING.md).
6672

6773
[1]: https://nodejs.org/api/errors.html#nodejs-error-codes
68-
[2]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
69-
[3]: https://www.typescriptlang.org
74+
[2]: https://github.com/sindresorhus/ponyfill
75+
[3]: https://github.com/flex-development/mlly
76+
[4]: https://nodejs.org/api/errors.html#errorstacktracelimit
77+
[5]: https://github.com/nodejs/node/blob/v19.3.0/lib/internal/errors.js#L484-L496
78+
[6]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
79+
[7]: https://www.typescriptlang.org

0 commit comments

Comments
 (0)