Skip to content

Commit 78eb761

Browse files
committed
Add API parity tables
Since the Node.js version implemented by this module differs for each API, a table might be helpful to inform users what APIs they can use (and to keep track of what is still to be done).
1 parent 4e89abc commit 78eb761

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

+41
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,47 @@ To use `util.promisify` and `util.callbackify`, Promises must already be availab
3434

3535
See the [Node.js util docs][util]. `util` currently supports the Node 8 LTS API. However, some of the methods are outdated. The `inspect` and `format` methods included in this module are a lot more simple and barebones than the ones in Node.js.
3636

37+
The below table lists the parity of each API with the Node.js version. At the time of writing, the most recent Node.js release is 12.1.0. Any entries with that version are considered up to date; the others may be missing features or bugfixes. See the "History" sections for each API in the [Node.js util docs][util] to learn about the changes that were not yet ported to this module.
38+
39+
> A version marked "<1.2.3" means that changes introduced in Node.js 1.2.3 were _not_ yet ported to this module.
40+
41+
| API | Matching Version |
42+
|-|-|
43+
| `callbackify` | 12.1.0 |
44+
| `debuglog` | 0.11.3 |
45+
| `format` | <8.4.0 |
46+
| `formatWithOptions` | missing |
47+
| `getSystemErrorName` | missing |
48+
| `inherits` | 12.1.0 |
49+
| `inspect` | <6.0.0 |
50+
| `isDeepStrictEqual` | missing |
51+
| `promisify` | 12.1.0 |
52+
| `TextDecoder` | missing |
53+
| `TextEncoder` | missing |
54+
| `types` | missing |
55+
56+
`util` also contains deprecated Node.js APIs. `_extend` and `log` were deprecated in v6, while the `is*` family of functions was deprecated in v4. All these APIs are up to date:
57+
58+
| Deprecated API | Matching Version |
59+
|-|-|
60+
| `_extend` | 6.0.0 |
61+
| `isArray` | 4.0.0 |
62+
| `isBoolean` | 4.0.0 |
63+
| `isBuffer` | 4.0.0 |
64+
| `isDate` | 4.0.0 |
65+
| `isError` | 4.0.0 |
66+
| `isFunction` | 4.0.0 |
67+
| `isNull` | 4.0.0 |
68+
| `isNullOrUndefined` | 4.0.0 |
69+
| `isNumber` | 4.0.0 |
70+
| `isObject` | 4.0.0 |
71+
| `isPrimitive` | 4.0.0 |
72+
| `isRegExp` | 4.0.0 |
73+
| `isString` | 4.0.0 |
74+
| `isSymbol` | 4.0.0 |
75+
| `isUndefined` | 4.0.0 |
76+
| `log` | 6.0.0 |
77+
3778
## Contributing
3879

3980
PRs are very welcome! The main way to contribute to `util` is by porting features, bugfixes and tests from Node.js. Ideally, code contributions to this module are copy-pasted from Node.js and transpiled to ES5, rather than reimplemented from scratch. Matching the Node.js code as closely as possible makes maintenance simpler when new changes land in Node.js.

0 commit comments

Comments
 (0)