Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
docs: Update README to include Cloudflare Workers compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
arv committed Nov 19, 2024
1 parent e8cc73d commit faeb97d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,20 @@ yarn add xxhash-wasm

The global `xxhash` will be available.

### Cloudflare Workers

If you are using [Cloudflare
Workers](https://developers.cloudflare.com/workers/) (workerd) you can use the installed
npm package as is. The `xxhash-wasm` package is compatible with Cloudflare Workers.

```javascript
import xxhash from "xxhash-wasm";
```

Importing it will pick the correct file base on the [conditional
import](https://developers.cloudflare.com/workers/wrangler/bundling/#conditional-exports)
from the package.json.

## Usage

The WebAssembly is contained in the JavaScript bundle, so you don't need to
Expand Down

0 comments on commit faeb97d

Please sign in to comment.