Skip to content

Commit

Permalink
Add notice for modern Node.js versions
Browse files Browse the repository at this point in the history
Signed-off-by: Jon Koops <[email protected]>
  • Loading branch information
jonkoops committed Oct 24, 2024
1 parent e5f5400 commit 6f3ed49
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ with the following differences:
* Provides the fallback list when using tools like `browserify` without pulling
in the `http` shim module.

> [!NOTE]
> This module is largely a wrapper of [`http.METHODS`](https://nodejs.org/api/http.html#httpmethods) from Node.js core with backwards compatibility for Node.js versions older than 0.11.8, making it mostly unnecessary for use in new projects. For newer Node.js versions, the following code is equivalent to using this module:
```js
import { METHODS } from 'node:http'

const methods = METHODS.map(() => method.toLowerCase())
```

## Install

This is a [Node.js](https://nodejs.org/en/) module available through the
Expand Down

0 comments on commit 6f3ed49

Please sign in to comment.